FFmpeg 源代码:avcodec_find_decoder()和avcodec_find_decoder_by_name()
生活随笔
收集整理的這篇文章主要介紹了
FFmpeg 源代码:avcodec_find_decoder()和avcodec_find_decoder_by_name()
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
avcodec_find_decoder()用于通過codec id 查找FFmpeg的解碼器
avcodec_find_decoder_by_name()用于通過codec name 查找FFmpeg的解碼器
avcodec_find_decoder()和avcodec_find_decoder_by_name() 的聲明位于libavcodec\codec.h,如下:
/*** Find a registered decoder with a matching codec ID.** @param id AVCodecID of the requested decoder* @return A decoder if one was found, NULL otherwise.*/ const AVCodec *avcodec_find_decoder(enum AVCodecID id);/*** Find a registered decoder with the specified name.** @param name name of the requested decoder* @return A decoder if one was found, NULL otherwise.*/ const AVCodec *avcodec_find_decoder_by_name(const char *name);avcodec_find_decoder()函數的參數是一個解碼器的ID,返回查找到的解碼器(沒有找到就返回NULL)
avcodec_find_decoder_by_name()函數的參數是一個解碼器的名稱,返回查找到的解碼器(沒有找到就返回NULL)
<總結
以上是生活随笔為你收集整理的FFmpeg 源代码:avcodec_find_decoder()和avcodec_find_decoder_by_name()的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: [ffmpeg] 解码API
- 下一篇: FFmpeg 源代码:avcodec_f