Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(515)

Unified Diff: media/renderers/default_renderer_factory.cc

Issue 1899363002: Finish plumbing MojoVideoDecoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Windows needs some more headers, apaprently. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/mojo/services/test_mojo_media_client.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/renderers/default_renderer_factory.cc
diff --git a/media/renderers/default_renderer_factory.cc b/media/renderers/default_renderer_factory.cc
index f18c381807b038426cf380fadb9218879bf795d2..0a65a550596c7de5a144620a2133ded1cb933ba4 100644
--- a/media/renderers/default_renderer_factory.cc
+++ b/media/renderers/default_renderer_factory.cc
@@ -72,20 +72,22 @@ ScopedVector<VideoDecoder> DefaultRendererFactory::CreateVideoDecoders(
// Create our video decoders and renderer.
ScopedVector<VideoDecoder> video_decoders;
- // Prefer an external decoder since one will only exist if it is hardware
- // accelerated.
- if (decoder_factory_)
- decoder_factory_->CreateVideoDecoders(media_task_runner, &video_decoders);
-
// |gpu_factories_| requires that its entry points be called on its
// |GetTaskRunner()|. Since |pipeline_| will own decoders created from the
// factories, require that their message loops are identical.
DCHECK(!gpu_factories ||
(gpu_factories->GetTaskRunner() == media_task_runner.get()));
- if (gpu_factories)
+ // Prefer an external decoder since one will only exist if it is hardware
+ // accelerated.
+ if (gpu_factories) {
+ if (decoder_factory_) {
+ decoder_factory_->CreateVideoDecoders(media_task_runner, gpu_factories,
+ &video_decoders);
+ }
video_decoders.push_back(
new GpuVideoDecoder(gpu_factories, request_surface_cb));
+ }
#if !defined(MEDIA_DISABLE_LIBVPX)
video_decoders.push_back(new VpxVideoDecoder());
« no previous file with comments | « media/mojo/services/test_mojo_media_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698