ffmpeg 接口整理

 

 

av_register_all();注册所有组件 4.0已经启用

acdevice_register_all() ;对设备进行注册,比如 V4L2等

avformat_network_init();初始化网络库以及网络加密协议相关的库(比如openssl)
封装格式相关
avformat_alloc_context();负责申请一个AVFormatContext结构的内存,并进行简单初始化 avformat_free_context();释放该结构里的所有东西以及该结构本身 avformat_close_input();关闭解复用器。关闭后就不再需要使用avformat_free_context 进行释放。 avformat_open_input();打开输入视频文件 avformat_find_stream_info():获取视频文件信息 av_read_frame(); 读取音视频包 avformat_seek_file(); 定位文件 av_seek_frame():定位文件

 

 

解码器相关
avcodec_alloc_context3():分配解码器上下文
avcodec_find_decoder():根据ID查找解码器
avcodec_find_decoder_by_name():根据解码器名字
avcodec_open2():打开编解码器
avcodec_decode_video2():解码一帧视频数据  已弃用
avcodec_decode_audio4():解码一帧音频数据  已弃用
avcodec_send_packet():发送编码数据包
avcodec_receive_frame():接收解码后数据
avcodec_free_context():释放解码器上下文,包含了avcodec_close()
avcodec_close():关闭解码器

 

posted @ 2020-07-02 11:28  出来打酱油  阅读(498)  评论(0编辑  收藏  举报