open_input_file函数调用结构图(转)
open_input_file函数调用结构图(有些重复的函数调用就略掉了,大致是按流程往下的)。
函数大致说明:
AVFormatContext *avformat_alloc_context(void);
函数介绍:
Allocate an AVFormatContext.
avformat_free_context() can be used to free the context and everything
allocated by the framework within it.
说明:为AVFormatContext分配空间,并设置缺省值,申请的空间用avformat_free_context()释放。
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags);
*
* Note: If AV_DICT_DONT_STRDUP_KEY or AV_DICT_DONT_STRDUP_VAL is set,
* these arguments will be freed on error.
*
* @param pm pointer to a pointer to a dictionary struct. If *pm is NULL
* a dictionary struct is allocated and put in *pm.
* @param key entry key to add to *pm (will be av_strduped depending on flags)
* @param value entry value to add to *pm (will be av_strduped depending on flags).
* Passing a NULL value will cause an existing entry to be deleted.
* @return >= 0 on success otherwise an error code <0
说明:设置给定的AVDictionary数组,会覆盖已经存在的数据。
static AVCodec *find_codec_or_die(const char *name, enum AVMediaType type, int encoder)
函数说明:寻找编码器,找不到就退出程序。
AVDictionaryEntry *av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags);
int avformat_open_input(AVFormatContext **ps, const char *filename, AVInputFormat *fmt, AVDictionary **options);
* Open an input stream and read the header. The codecs are not opened.
* The stream must be closed with avformat_close_input().
*
* @param ps Pointer to user-supplied AVFormatContext (allocated by avformat_alloc_context).
* May be a pointer to NULL, in which case an AVFormatContext is allocated by this
* function and written into ps.
* Note that a user-supplied AVFormatContext will be freed on failure.
* @param filename Name of the stream to open.
* @param fmt If non-NULL, this parameter forces a specific input format.
* Otherwise the format is autodetected.
* @param options A dictionary filled with AVFormatContext and demuxer-private options.
* On return this parameter will be destroyed and replaced with a dict containing
* options that were not found. May be NULL.
*
* @return 0 on success, a negative AVERROR on failure.
*
* @note If you want to use custom IO, preallocate the format context and set its pb field.
*/
static AVCodec *choose_decoder(OptionsContext *o, AVFormatContext *s, AVStream *st)
AVDictionary **setup_find_stream_info_opts(AVFormatContext *s, AVDictionary *codec_opts);
* Setup AVCodecContext options for avformat_find_stream_info().
*
* Create an array of dictionaries, one dictionary for each stream
* contained in s.
* Each dictionary will contain the options from codec_opts which can
* be applied to the corresponding stream codec context.
*
* @return pointer to the created array of dictionaries, NULL if it
* cannot be created
*/
int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options);
* Read packets of a media file to get stream information. This
* is useful for file formats with no headers such as MPEG. This
* function also computes the real framerate in case of MPEG-2 repeat
* frame mode.
* The logical file position is not changed by this function;
* examined packets may be buffered for later processing.
*
* @param ic media file handle
* @param options If non-NULL, an ic.nb_streams long array of pointers to
* dictionaries, where i-th member contains options for
* codec corresponding to i-th stream.
* On return each dictionary will be filled with options that were not found.
* @return >=0 if OK, AVERROR_xxx on error
*
* @note this function isn't guaranteed to open all the codecs, so
* options being non-empty at return is a perfectly normal behavior.
*
* @todo Let the user decide somehow what information is needed so that
* we do not waste time getting stuff the user does not need.
*/
static void add_input_streams(OptionsContext *o, AVFormatContext *ic)
* list of input streams. */
void av_dump_format(AVFormatContext *ic, int index, const char *url, int is_output);
* Print detailed information about the input or output format, such as
* duration, bitrate, streams, container, programs, metadata, side data,
* codec and time base.
*
* @param ic the context to analyze
* @param index index of the stream to dump information about
* @param url the URL to print, such as source or destination file
* @param is_output Select whether the specified context is an input(0) or output(1)
*/
static AVDictionary *strip_specifiers(AVDictionary *dict)
open_input_file函数调用结构图(转)的更多相关文章
- 转:RTMPdump使用相关
在FFMPEG中使用libRTMP的经验 FFMPEG在编译的时候可以选择支持RTMP的类库libRTMP.这样ffmpeg就可以支持rtmp://, rtmpt://, rtmpe://, rtmp ...
- ffmpeg.c简单的结构功能分析(平局)
当转码的研究看前一阵子FFmpeg资源. 因为ffmpeg.c与此相反的较长的代码.而有相当一部分人AVFilter相关代码(这部分已经不太熟悉),所以学习之前FFmpeg时间,还没有好好看看它的源代 ...
- FFmpeg资料来源简单分析:libswscale的sws_getContext()
===================================================== FFmpeg库函数的源代码的分析文章: [骨架] FFmpeg源码结构图 - 解码 FFmp ...
- FFmpeg源码简单分析:libswscale的sws_scale()
===================================================== FFmpeg的库函数源码分析文章列表: [架构图] FFmpeg源码结构图 - 解码 FFm ...
- RTMPdump(libRTMP)源代码分析 4: 连接第一步——握手(Hand Shake)
===================================================== RTMPdump(libRTMP) 源代码分析系列文章: RTMPdump 源代码分析 1: ...
- FFmpeg源代码简单分析:libswscale的sws_scale()
===================================================== FFmpeg的库函数源代码分析文章列表: [架构图] FFmpeg源代码结构图 - 解码 F ...
- FFmpeg源代码简单分析:libswscale的sws_getContext()
===================================================== FFmpeg的库函数源代码分析文章列表: [架构图] FFmpeg源代码结构图 - 解码 F ...
- FFmpeg源代码简单分析:日志输出系统(av_log()等)
===================================================== FFmpeg的库函数源代码分析文章列表: [架构图] FFmpeg源代码结构图 - 解码 F ...
- FFmpeg源代码简单分析:avformat_open_input()
===================================================== FFmpeg的库函数源代码分析文章列表: [架构图] FFmpeg源代码结构图 - 解码 F ...
随机推荐
- pyDay8
内容来自廖雪峰的官方网站. List Comprehensions 1 >>> list(range(1, 3)) [1, 2] 2 >>> L = [] > ...
- 《Java入门第二季》第四章 多态
Java 中的多态1.引用的多态:意思就是父类的句柄既可以持有本类的对象,也可以持有子类的对象. 2.方法的多态:注意点是当父类句柄持有子类对象的时候,无法调用子类特有的方法. 多态中的引用类型转换1 ...
- MySQL测试工具之-tpcc
首先安装tpcc 官网地址:https://github.com/Percona-Lab/tpcc-mysql [root@test3 src]# unzip tpcc-mysql-master.zi ...
- 项目:Android平台txt阅读软件
项目:Android平台txt阅读软件 项目组成员:20145107李长达.20145110屠轶成.20145120黄玄曦.20145122程智崟 Need: 从古至今,阅读都是人类生活中的一大部分, ...
- Ubuntu屏幕录制工具【转】
本文转载自:https://blog.csdn.net/Draonly/article/details/74898031 原文参考:https://www.sysgeek.cn/simplescree ...
- TortoiseGit 访问https远程仓库,上报SSL证书错误解决方法
报错 在使用TortoiseGit时,clone自己搭建的gitlab报如错SSL certificate problem: self signed certificate 原因:自行搭建的gitla ...
- Anaconda ubuntu16.04 Cuda 8.0安装pytorch
Pytorch 安装 Pytorch安装真的太让人省心了,在anaconda的环境下进行安装,只需要一个命令 具体命令请查看官网pytorch 找到适合你的版本进行安装 本机环境: anaconda3 ...
- vue2.0中v-on绑定自定义事件
vue中父组件通过prop传递数据给子组件,而想要将子组件的数据传递给父组件,则可以通过自定义事件的绑定. 每个Vue实例都实现了[事件接口],即: 1.使用 $on(eventName) 监听事件 ...
- 将 R 整合到 markdown 中
markdown 易于写入和读取,具有编写报告的必要功能,例如简单的文本格式,嵌入图片.链接.表.引用.数学公式以及代码块.虽然在 markdown 中编写纯文本很容易,但是创建具有许多图片和表格的报 ...
- Codeforces 909C Python Indentation:树状数组优化dp
题目链接:http://codeforces.com/contest/909/problem/C 题意: Python是没有大括号来标明语句块的,而是用严格的缩进来体现. 现在有一种简化版的Pytho ...