av_read_frame()函数详解:
来源:互联网 发布:淘宝服装拍摄价格 编辑:程序博客网 时间:2024/06/14 15:53
av_read_frame()函数 官方API:
源码:
/** * Return the next frame of a stream. * This function returns what is stored in the file, and does not validate * that what is there are valid frames for the decoder. It will split what is * stored in the file into frames and return one for each call. It will not * omit invalid data between valid frames so as to give the decoder the maximum * information possible for decoding. * * If pkt->buf is NULL, then the packet is valid until the next * av_read_frame() or until avformat_close_input(). Otherwise the packet * is valid indefinitely. In both cases the packet must be freed with * av_free_packet when it is no longer needed. For video, the packet contains * exactly one frame. For audio, it contains an integer number of frames if each * frame has a known fixed size (e.g. PCM or ADPCM data). If the audio frames * have a variable size (e.g. MPEG audio), then it contains one frame. * * pkt->pts, pkt->dts and pkt->duration are always set to correct * values in AVStream.time_base units (and guessed if the format cannot * provide them). pkt->pts can be AV_NOPTS_VALUE if the video format * has B-frames, so it is better to rely on pkt->dts if you do not * decompress the payload. * * @return 0 if OK, < 0 on error or end of file */int av_read_frame(AVFormatContext *s, AVPacket *pkt);
读出当前流数据,并存于AVPacket包中,
如果当前流为视频帧,则只读出一帧,
如果当前流为音频帧,根据音频格式读取固定的数据。
读取成功 流数据自动指向下一帧,
如果AVPacket包内存为空 读取失败,则读取无效,等待 av_read_frame()或者avformat_close_input()处理
0 0
- av_read_frame()函数详解:
- av_read_frame
- av_read_frame()
- av_read_frame
- av_read_frame()
- ffmpeg 函数简单分析 : av_read_frame()
- FFMPeg代码分析:AVPacket结构体和av_read_frame函数
- FFMPeg代码分析:av_read_frame()函数的内部构造
- FFMPeg代码分析:AVPacket结构体和av_read_frame函数
- 关于ffmpeg,av_read_frame函数返回值小于0的错误
- ffmpeg源码简析(八)解码 av_read_frame(),avcodec_decode_video2(),avformat_close_input()
- FFmpeg-av_read_frame
- av_read_frame解析
- ffmpeg框架阅读笔记一:读取数据帧函数 int av_read_frame(AVFormatContext *s, AVPacket *pkt)
- [源码]av_read_frame()+自定义IO读取函数-->>内存and实时视频流的RTMP推流
- ffmpeg框架阅读笔记一:读取数据帧函数 int av_read_frame(AVFormatContext *s, AVPacket *pkt)
- ffmpeg开发系列--av_read_frame()
- ffmpeg的av_read_frame学习
- 【STL】bitset示例
- Java基础知识总结:集合与泛型(下)
- crack me160题 第十题(序号100)Acid_Cool_178 记录
- ajax 加载小案例
- 【STL】ptrdiff_t示例
- av_read_frame()函数详解:
- uva11549 Calculator Conundrum【解法二】
- redhat nfs配置
- C语言中的一些关键字(十一)
- 洛谷 P1462 通往奥格瑞玛的道路
- StrangeIoc MVCS框架第一课:初步理解
- Google浏览器如何离线查看Android文档
- leetcode---House Robber---动规
- 函数可变形参整理:vsprintf和vs_list详解