voidavcodecInfo(){av_register_all();AVCodec*c_temp=av_codec_next(NULL);while(c_temp!=NULL){if(c_temp->encode2!=NULL){switch(c_temp->type){caseAVMEDIA_TYPE_VIDEO:printf("[video encode] %10s\n",c_temp->name);break;caseAVMEDIA_TYPE_AUDIO:printf("[audio encode] %10s\n",c_temp-...
AV_CODEC_ID_MPEG1VIDEO, AV_CODEC_ID_MPEG2VIDEO, ///< preferred ID for MPEG-1/2 video decoding AV_CODEC_ID_MPEG2VIDEO_XVMC, AV_CODEC_ID_H261, AV_CODEC_ID_H263, AV_CODEC_ID_RV10, AV_CODEC_ID_RV20, AV_CODEC_ID_MJPEG, AV_CODEC_ID_MJPEGB, AV_CODEC_ID_LJPEG, AV_CODEC_ID...
AVMEDIA_TYPE_DATA,///< Opaque data information usually continuousAVMEDIA_TYPE_SUBTITLE,AVMEDIA_TYPE_ATTACHMENT,///< Opaque data information usually sparseAVMEDIA_TYPE_NB}; 2.enum AVCodecID id AVCodecID定义如下: enumAVCodecID { AV_CODEC_ID_NONE,/*video codecs*/AV_CODEC_ID_MPEG1VIDEO, AV_...
通过av_hwdevice_get_type_name 方法可以将这些枚举值转换成对应的字符串,比如 AV_HWDEVICE_TYPE_MEDIACODEC 对应的字符串就是 mediacodec ,其实在源码里面也是有的: staticconstchar*consthw_type_names[]={ [AV_HWDEVICE_TYPE_CUDA]="cuda", [AV_HWDEVICE_TYPE_DRM]="drm", [AV_HWDEVICE_TYPE_DXVA2]=...
AVCodec *c_temp = av_codec_next(NULL); while (c_temp != NULL) { if (c_temp->decode != NULL) { sprintf(info, "%s[Dec]", info); } else { sprintf(info, "%s[Enc]", info); } switch (c_temp->type) { case AVMEDIA_TYPE_VIDEO: ...
enumAVMediaType type; enumCodecID id; /** * Codec capabilities. * see CODEC_CAP_* */ intcapabilities; constAVRational *supported_framerates;///< array of supported framerates, or NULL if any, array is terminated by {0,0} constenumPixelFormat *pix_fmts;///< array of supported pixel ...
1.注册所有编解码器:av_register_all(); 2.声明一个AVCodec类型的指针,比如说AVCodecfirst_c; 3.调用av_codec_next()函数,即可获得指向链表下一个解码器的指针,循环往复可以获得所有解码器的信息。注意,如果想要获得指向第一个解码器的指针,则需要将该函数的参数设置为NULL。
enum AVMediaType type; enum CodecID id; /** * Codec capabilities. * see CODEC_CAP_* */ int capabilities; const AVRational *supported_framerates; ///< array of supported framerates, or NULL if any, array is terminated by {0,0} ...
charinfo[40000]={0};AVCodec*c_temp=av_codec_next(NULL);while(c_temp!=NULL){if(c_temp->decode!=NULL){sprintf(info,"%s[Dec]",info);}else{sprintf(info,"%s[Enc]",info);}switch(c_temp->type){caseAVMEDIA_TYPE_VIDEO:sprintf(info,"%s[Video]",info);break;caseAVMEDIA_TYPE_AUDIO:sprin...
AVCodec *c_temp = av_codec_next(NULL); while(c_temp !=NULL) { if(c_temp->decode !=NULL) { sprintf(info,"%s[Dec]", info); }else{ sprintf(info,"%s[Enc]", info); } switch(c_temp->type) { caseAVMEDIA_TYPE_VIDEO: sprintf(info,"%s[Video]", info); ...