FFMPEG学习----遍历所支持的解码器
来源:互联网 发布:手机里php视频怎么打开 编辑:程序博客网 时间:2024/05/10 21:06
1.注册所有编解码器:av_register_all();
2.声明一个AVCodec类型的指针,比如说AVCodec* p;
3.调用av_codec_next()函数,即可获得指向链表下一个解码器的指针,循环往复可以获得所有解码器的信息。注意,如果想要获得指向第一个解码器的指针,则需要将该函数的参数设置为NULL。
/**
* If c is NULL, returns the first registered codec,
* if c is non-NULL, returns the next registered codec after c,
* or NULL if c is the last one.
*/
int main(void){char *info = (char *)malloc(40000);memset(info, 0, 40000);av_register_all();AVCodec *c_temp = av_codec_next(NULL);while (c_temp != NULL){if (c_temp->decode != NULL){strcat(info, "[Decode]");}else{strcat(info, "[Encode]");}switch (c_temp->type){case AVMEDIA_TYPE_VIDEO:strcat(info, "[Video]");break;case AVMEDIA_TYPE_AUDIO:strcat(info, "[Audeo]");break;default:strcat(info, "[Other]");break;}sprintf(info, "%s %10s\n", info, c_temp->name);c_temp = c_temp->next;}puts(info);free(info);return 0;}
.....
[Decode][Video] libvpx
[Encode][Video] libvpx-vp9
[Decode][Video] libvpx-vp9
[Encode][Audeo] libwavpack
[Encode][Video] libwebp
[Encode][Video] libx264
[Encode][Video] libx264rgb
[Encode][Video] libx265
[Encode][Video] libxavs
[Encode][Video] libxvid
[Decode][Video] bintext
[Decode][Video] xbin
[Decode][Video] idf
[Encode][Video] h264_qsv
[Encode][Video] hevc_qsv
[Encode][Video] mpeg2_qsv
- FFMPEG学习----遍历所支持的解码器
- FFMPEG学习----遍历所支持的封装格式
- 基于FFMPEG的音频解码器
- FFmpeg的HEVC解码器源代码简单分析:解码器主干部分
- FFmpeg MP3解码器的研究与优化
- FFMPEG 增加 AVS+ 视频解码 支持-第二篇:ffmpeg中注册cavsp解码器
- ffmpeg解码器优化
- ffmpeg解码器优化
- ffmpeg h264解码器提取
- ffmpeg解码器优化
- ffmpeg解码器优化
- FFMPEG - 视频解码器
- ffmpeg视频解码器
- ffmpeg打开视频解码器
- FFmpeg的H.264解码器源代码简单分析:解码器主干部分
- 在ffmpeg中增加libavformat库所支持格式的媒体文件
- 在ffmpeg中增加libavformat库所支持格式的媒体文件
- 在ffmpeg中增加libavformat库所支持格式的媒体文件
- HDU-5753 Permutation Bo(期望)(概率)
- Java学习(六)
- leetcode No206. Reverse Linked List
- opencv里的cvmat,cvarr, mat等类型之间联系与转化
- RecyclerView 瀑布流 嵌套ScrollView解决方案
- FFMPEG学习----遍历所支持的解码器
- DP-Max Sum
- 读吧.net书网整站程序 v3.0 绿色版
- 尼姆博奕
- jQuery,javascript获得网页的高度和宽度
- 学习iOS的第七天
- 双机高可用、负载均衡、MySQL(读写分离、主从自动切换)架构设计
- Activity生命周期
- 测试udp 端口是否开放