diff --git a/media/mojo/services/gpu_mojo_media_client_cros.cc b/media/mojo/services/gpu_mojo_media_client_cros.cc index 2b6a4ff277d5f..23df084240c34 100644 --- a/media/mojo/services/gpu_mojo_media_client_cros.cc +++ b/media/mojo/services/gpu_mojo_media_client_cros.cc @@ -52,7 +52,11 @@ VideoDecoderType GetPreferredLinuxDecoderImplementation( // to using the VDA implementation. if (!base::FeatureList::IsEnabled(kUseChromeOSDirectVideoDecoder)) return VideoDecoderType::kVda; +#if BUILDFLAG(USE_VAAPI) return VideoDecoderType::kVaapi; +#elif BUILDFLAG(USE_V4L2_CODEC) + return VideoDecoderType::kV4L2; +#endif } #endif // BUILDFLAG(IS_CHROMEOS) @@ -97,6 +101,11 @@ VideoDecoderType GetActualPlatformDecoderImplementation( } } } + case VideoDecoderType::kV4L2: { + return gpu_preferences.gr_context_type == gpu::GrContextType::kGL + ? VideoDecoderType::kV4L2 + : VideoDecoderType::kUnknown; + } default: return VideoDecoderType::kUnknown; }