Hi All,
Does anyone know the plan of VP9 SW(software) decoder in Chromium? Could ffmpeg be used as VP9 software decoder in Chrome?
I found that Chromium integrates both libvpx and ffmpeg as VP9 SW decoders and it uses libvpx as VP9 SW decoder by default currently.
if (gpu_factories_.get())
video_decoders.push_back(new GpuVideoDecoder(gpu_factories_));
#if !defined(MEDIA_DISABLE_LIBVPX)
video_decoders.push_back(new VpxVideoDecoder(media_task_runner_));
#endif // !defined(MEDIA_DISABLE_LIBVPX)
video_decoders.push_back(new FFmpegVideoDecoder(media_task_runner_));
Chromium put all video decoders in a vector called “video_decoders” in a sort order. When the first decoder does not work, it will use the next one. We could observe that Chromium will first check GpuVideoDecoder, then VpxVideoDecoder and FFmpegVideoDecoder.
Here libvpx is wrapped by a macro called “MEDIA_DISABLE_LIBVPX”, which is controlled by a build flag called “media_use_libvpx”. I disabled libvpx by modifying the build configuration and found that FFmpegVideoDecoder will be used as VP9 software decoder. However, it will fail in function "bool FFmpegVideoDecoder::ConfigureDecoder(bool low_delay) ". It seems ffmpeg is not well integrated as Chromium VP9 software decoder. Then why does chromium put ffmpeg in the VP9 video decoder list? Any comments?
Thanks very much!