FFmpeg函数简单分析:avformat_find_stream_info()
2017-06-26 09:47
741 查看
本文简单分析FFmpeg中一个常用的函数:avformat_find_stream_info()。该函数可以读取一部分视音频数据并且获得一些相关的信息。avformat_find_stream_info()的声明位于libavformat\avformat.h,如下所示。
[cpp] view
plain copy
/**
* 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.
*/
int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options);
简单解释一下它的参数的含义:
ic:输入的AVFormatContext。
options:额外的选项,目前没有深入研究过。
函数正常执行后返回值大于等于0。
[cpp] view
plain copy
/**
* 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.
*/
int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options);
简单解释一下它的参数的含义:
ic:输入的AVFormatContext。
options:额外的选项,目前没有深入研究过。
函数正常执行后返回值大于等于0。
相关文章推荐
- ffmpeg学习七:avformat_find_stream_info函数源码分析
- FFmpeg源代码简单分析:avformat_find_stream_info()
- FFmpeg源代码简单分析:avformat_find_stream_info()
- (转)FFmpeg源代码简单分析:avformat_find_stream_info()
- FFmpeg源代码简单分析:avformat_find_stream_info()
- FFMPEG函数avformat_find_stream_info()
- 图解FFMPEG打开媒体的函数avformat_open_input&avformat_find_stream_info
- FFmpeg avformat_find_stream_info函数优化
- FFmpeg函数avformat_find_stream_info()
- ffmpeg源码分析--8.avformat_find_stream_info及一些参数的确定
- FFmpeg(4)-使用avformat_find_stream_info()来探测获取封装格式的上下文信息
- ffmpeg源码跟踪笔记之avformat_find_stream_info
- FFmpeg函数简单分析:avformat_close_input()
- 解决 ffmpeg 在avformat_find_stream_info执行时间太长
- avformat_find_stream_info函数卡住问题
- FFMPEG avformat_find_stream_info替换
- 针对ffmpeg做rtsp客户端时,avformat_find_stream_info长时间等待问题
- 解决 ffmpeg 在avformat_find_stream_info执行时间太长
- 解决 ffmpeg 在avformat_find_stream_info执行时间太长
- FFMEPG函数avformat_find_stream_info作用