FFmpeg
FFmpeg源码分析
chaisy971124568
这个作者很懒,什么都没留下…
展开
-
FFmpeg源码分析:AVInputFormat结构体
一个真正快乐的人,是能够享受他的创造的人。那些像海绵一样,只取不予的人,只会失去快乐。AVInputFormat结构体用来表示输入文件容器格式,着重于功能函数,一个文件容器格式对应着一个AVInputFormat结构。通过以下两种方式进行设置:当通过avformat_open_input函数设置时,需要对filename的值进行探测 如果上一步骤探测失败,则会对filename指定的文件或协议进行探测 也可以通过av_find_input_format函数获取输入文件容器格式举例如下:.原创 2020-12-16 10:31:05 · 325 阅读 · 0 评论 -
FFmpeg源码分析:avio_open2
一个真正快乐的人,是能够享受他的创造的人。那些像海绵一样,只取不予的人,只会失去快乐。avio_open2函数是用来打开输入输出文件,包括普通的文件、rtmp、udp、https等。ffmpeg用来管理输入输出文件数据结构是AVIOContext。一、函数参数解析int avio_open2(AVIOContext **s, const char *url, int flags, const AVIOInterruptCB *int_cb, AVDicti.原创 2020-11-30 22:07:31 · 861 阅读 · 0 评论 -
FFmpeg源码分析:AVCodecContext结构体
当你和别人相处的时候,也应该像你在读书一样,一定要集中精力。读书的时候,要将全部的精力都集中到书本的内容当中;与别人相处的时候,将注意力倾注到自己的所见所闻里,这一点是很重要的。AVCodecContext结构体主要用来对音视频数据进行编解码,一般与AVFormatContext结构结合使用。...原创 2020-11-27 22:06:08 · 117 阅读 · 0 评论 -
FFmpeg源码分析:avformat_open_input
函数原型/** * 打开输入流并读取文件头。此时解码器还未打开。 * 该流必须通过avformat_close_input()函数关闭。 * * @param ps 用户提供的指针,类型为AVFormatContext,可以事先通过avformat_alloc_context()进行分配。 * 如果该ps指向的值为NULL,则avformat_open_input会调用avformat_alloc_context()进行分配。 * 注意当avform原创 2020-11-18 19:16:00 · 794 阅读 · 0 评论 -
FFmpeg源码分析:AVFormatContext结构体
伟大人物所达到和保持的高度,并非是心血来潮一蹴而就,而是在晚上当同伴都入睡的时候,他们正努力向上攀原创 2020-11-19 17:11:17 · 1986 阅读 · 0 评论 -
FFmpeg源码分析: av_read_frame
目录函数声明函数声明/** * 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 ret.原创 2020-11-19 17:10:14 · 254 阅读 · 0 评论 -
FFmpeg实战:从设备采集音频
//// Created by wiggers on 2020/11/14.//#include <libavutil/log.h>#include <libavformat/avformat.h>#include <libavdevice/avdevice.h>#include <stdio.h>#include <assert.h>static void simple_capture_audio(){ /* .原创 2020-11-19 10:34:05 · 557 阅读 · 0 评论 -
FFmpeg源码分析:av_packet_alloc
函数声明/** * Allocate an AVPacket and set its fields to default values. The resulting * struct must be freed using av_packet_free(). * 分配AVPacket内存并设置成员变量的默认值。该函数的返回值必须通过av_packet_free进行释放。 * * @return An AVPacket filled with default values or NULL o原创 2020-11-18 23:45:42 · 1103 阅读 · 0 评论 -
FFmpeg源码分析:avformat_find_stream_info
函数声明/** * 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原创 2020-11-18 23:37:28 · 252 阅读 · 1 评论