04 2014 档案
摘要:dir=opendir(dir_buf);ptr=readdir(dir);//ptr为一个结构体 direntclosedir(dir); 1.存储目录中的文件信息(文件名、扩展名等等)#include struct dirent{ long d_ino; /inode number 索引节点...
阅读全文
摘要:#!/bin/shcase `uname -s` in"FreeBSD") PLATFORM="freebsd" ;;"Linux") PLATFORM="linux" ;;"Darwin") PLATFORM="macos" ;;"SunOS") PLATFORM="solaris" ;;*) e...
阅读全文
摘要:从项目文档中发现一个很实用的makefile模板 makefile写出来容易,但要达到专业可用,着实困难.以后就用这个了,妈妈再也不用担心我的make了 # --------------------------------------------------------------------...
阅读全文
摘要:我们知道,ffmpeg可以读取本地文件, 网络数据http,ftp, udp, http, rtsp等, 但是这些都只需要一个简单的-i参数,后面接所需要的数据地址就可以了.之所以如此方便, 是因为ffmpeg的open_intput_file()等函数封装了很多特性,以至于我们不需要关注这些细...
阅读全文
摘要:Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".Have you been asked this question in an intervi...
阅读全文
摘要:ommon.h(30) : fatal error C1189: #error : missing -D__STDC_CONSTANT_MACROS / #define __STDC_CONSTANT_MACROS原因:FFmpeg is written in C99, thus some feat...
阅读全文
摘要:#include #define err(str) \ fprintf (stderr, "Error occurred in: %s, line %d. Msg: %s\n", \ __FILE__, __LINE__, str);其实还可以扩展1. 将错误写入日志2. 日志中包含信息...
阅读全文
摘要:对应最新版ffmpeg2.1首先上传一张整体的函数表,1.参数分析部分:ffmpeg_parse_options();网络处理部分也包含在其中,对应这个函数里面的open_files()整个核心函数transcode()见上图2. 进入到transcode()中,初始化工作transcode_ini...
阅读全文
摘要:Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ ...
阅读全文