Commit 27296030 authored by Chih-Yu Huang's avatar Chih-Yu Huang Committed by Commit Bot

media/mojo: Remove fallback of ChromeOS VideoDecoder.

We plan to enable new VideoDecoder implementation per board, instead
of enable all boards at the same time. We won't enable boards that are
not supported yet.
This CL remove the fallback video decoder. Then we could catch any
initialize or runtime failure of new VideoDecoder implementation.

BUG=chromium:984482
TEST=open crosvideo.appspot.com on Kevin and Eve

Change-Id: I03026057b317ffde5436d8eb53c579ed18210bd8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1734833Reviewed-by: default avatarDan Sanders <sandersd@chromium.org>
Commit-Queue: Chih-Yu Huang <akahuang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#684211}
parent f5112cb4
...@@ -221,7 +221,6 @@ std::unique_ptr<VideoDecoder> GpuMojoMediaClient::CreateVideoDecoder( ...@@ -221,7 +221,6 @@ std::unique_ptr<VideoDecoder> GpuMojoMediaClient::CreateVideoDecoder(
MaybeRenderEarlyManager::Create(gpu_task_runner_))); MaybeRenderEarlyManager::Create(gpu_task_runner_)));
#elif defined(OS_CHROMEOS) #elif defined(OS_CHROMEOS)
std::unique_ptr<VideoDecoder> cros_video_decoder;
if (base::FeatureList::IsEnabled(kChromeosVideoDecoder)) { if (base::FeatureList::IsEnabled(kChromeosVideoDecoder)) {
#if BUILDFLAG(USE_V4L2_CODEC) || BUILDFLAG(USE_VAAPI) #if BUILDFLAG(USE_V4L2_CODEC) || BUILDFLAG(USE_VAAPI)
auto frame_pool = std::make_unique<PlatformVideoFramePool>(); auto frame_pool = std::make_unique<PlatformVideoFramePool>();
...@@ -233,23 +232,11 @@ std::unique_ptr<VideoDecoder> GpuMojoMediaClient::CreateVideoDecoder( ...@@ -233,23 +232,11 @@ std::unique_ptr<VideoDecoder> GpuMojoMediaClient::CreateVideoDecoder(
media_gpu_channel_manager_, media_gpu_channel_manager_,
command_buffer_id->channel_token, command_buffer_id->channel_token,
command_buffer_id->route_id)); command_buffer_id->route_id));
cros_video_decoder = ChromeosVideoDecoderFactory::Create( video_decoder = ChromeosVideoDecoderFactory::Create(
task_runner, std::move(frame_pool), std::move(frame_converter)); task_runner, std::move(frame_pool), std::move(frame_converter));
#endif // BUILDFLAG(USE_V4L2_CODEC) || BUILDFLAG(USE_VAAPI) #endif // BUILDFLAG(USE_V4L2_CODEC) || BUILDFLAG(USE_VAAPI)
} }
if (cros_video_decoder) {
video_decoder = std::move(cros_video_decoder);
} else {
video_decoder = VdaVideoDecoder::Create(
task_runner, gpu_task_runner_, media_log->Clone(),
target_color_space, gpu_preferences_, gpu_workarounds_,
base::BindRepeating(&GetCommandBufferStub, gpu_task_runner_,
media_gpu_channel_manager_,
command_buffer_id->channel_token,
command_buffer_id->route_id));
}
#elif defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX) #elif defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX)
video_decoder = VdaVideoDecoder::Create( video_decoder = VdaVideoDecoder::Create(
task_runner, gpu_task_runner_, media_log->Clone(), target_color_space, task_runner, gpu_task_runner_, media_log->Clone(), target_color_space,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment