文章目录
一、ffmpeg基本流程图

1.1、av_register_all()
包含头文件:#include “libavformat/avformat.h”
作用:初始化 libavformat和注册所有的muxers、demuxers和protocols。基本所有的ffmpeg第一步都是它。
1.2、avformat_open_input()
作用:打开对应的文件
原函数:avformat_open_input(AVFormatContext **ps, const char *filename,AVInputFormat *fmt, AVDictionary **options)
AVFormatContext **ps:一般是avformat_alloc_context()申请的一个空间指针地址,类似于文件描述符,然后通过操作文件描述符来操作你打开的文件。
const char *filename:就是你要打开的文件名。
AVInputFormat *fmt:一般都写成NULL.
AVDictionary **options:附加选项写为NULL.
使用方法:
if (avformat_open_input(&pFormatCtx,url,NULL,NULL)!=0){

最低0.47元/天 解锁文章
1636

被折叠的 条评论
为什么被折叠?



