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

Side by Side Diff: media/mojo/services/utility_mojo_media_client.cc

Issue 2643743002: Mojify demuxers and allow running {Chunk/FFmpeg}Demuxer in a Utility Process (Closed)
Patch Set: Rebase and make sure to unbind mojom::DemuxerPtr on the bound thread during termination Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « media/mojo/services/utility_mojo_media_client.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/mojo/services/utility_mojo_media_client.h" 5 #include "media/mojo/services/utility_mojo_media_client.h"
6 6
7 #include "base/threading/thread_task_runner_handle.h" 7 #include "base/threading/thread_task_runner_handle.h"
8 #include "media/audio/null_audio_sink.h" 8 #include "media/audio/null_audio_sink.h"
9 #include "media/base/media.h" 9 #include "media/base/media.h"
10 #include "media/base/video_decoder.h" 10 #include "media/base/video_decoder.h"
11 #include "media/filters/default_demuxer_factory.h"
11 #include "media/mojo/common/mojo_shared_buffer_video_frame.h" 12 #include "media/mojo/common/mojo_shared_buffer_video_frame.h"
12 #include "media/mojo/common/mojo_video_frame_provider.h" 13 #include "media/mojo/common/mojo_video_frame_provider.h"
13 #include "media/mojo/common/mojo_video_frame_provider_factory.h" 14 #include "media/mojo/common/mojo_video_frame_provider_factory.h"
14 #include "media/mojo/services/mojo_audio_renderer_sink_adapter.h" 15 #include "media/mojo/services/mojo_audio_renderer_sink_adapter.h"
15 #include "media/mojo/services/mojo_video_renderer_sink_adapter.h" 16 #include "media/mojo/services/mojo_video_renderer_sink_adapter.h"
16 #include "media/renderers/default_renderer_factory.h" 17 #include "media/renderers/default_renderer_factory.h"
17 #include "media/renderers/gpu_video_accelerator_factories.h" 18 #include "media/renderers/gpu_video_accelerator_factories.h"
18 19
19 #if !defined(DISABLE_FFMPEG_VIDEO_DECODERS) 20 #if !defined(DISABLE_FFMPEG_VIDEO_DECODERS)
20 #include "media/filters/ffmpeg_video_decoder.h" 21 #include "media/filters/ffmpeg_video_decoder.h"
21 #endif 22 #endif
22 23
24 #if !defined(MEDIA_DISABLE_LIBVPX)
25 #include "media/filters/vpx_video_decoder.h"
26 #endif
27
23 namespace media { 28 namespace media {
24 29
25 UtilityMojoMediaClient::UtilityMojoMediaClient( 30 UtilityMojoMediaClient::UtilityMojoMediaClient(
26 scoped_refptr<base::SingleThreadTaskRunner> utility_task_runner) 31 scoped_refptr<base::SingleThreadTaskRunner> utility_task_runner)
27 : utility_task_runner_(std::move(utility_task_runner)) {} 32 : utility_task_runner_(std::move(utility_task_runner)) {}
28 33
29 UtilityMojoMediaClient::~UtilityMojoMediaClient() {} 34 UtilityMojoMediaClient::~UtilityMojoMediaClient() {}
30 35
31 void UtilityMojoMediaClient::Initialize(service_manager::Connector* connector) { 36 void UtilityMojoMediaClient::Initialize(service_manager::Connector* connector) {
32 InitializeMediaLibrary(); 37 InitializeMediaLibrary();
(...skipping 28 matching lines...) Expand all
61 std::unique_ptr<RendererFactory> UtilityMojoMediaClient::CreateRendererFactory( 66 std::unique_ptr<RendererFactory> UtilityMojoMediaClient::CreateRendererFactory(
62 const scoped_refptr<MediaLog>& media_log) { 67 const scoped_refptr<MediaLog>& media_log) {
63 std::unique_ptr<VideoFrameProviderFactory> video_frame_provider_factory( 68 std::unique_ptr<VideoFrameProviderFactory> video_frame_provider_factory(
64 new MojoVideoFrameProviderFactory()); 69 new MojoVideoFrameProviderFactory());
65 return base::MakeUnique<DefaultRendererFactory>( 70 return base::MakeUnique<DefaultRendererFactory>(
66 std::move(media_log), nullptr, 71 std::move(media_log), nullptr,
67 DefaultRendererFactory::GetGpuFactoriesCB(), 72 DefaultRendererFactory::GetGpuFactoriesCB(),
68 std::move(video_frame_provider_factory)); 73 std::move(video_frame_provider_factory));
69 } 74 }
70 75
76 std::unique_ptr<DemuxerFactory> UtilityMojoMediaClient::CreateDemuxerFactory(
77 const scoped_refptr<MediaLog>& media_log) {
78 return base::MakeUnique<DefaultDemuxerFactory>(std::move(media_log));
79 }
80
71 } // namespace media 81 } // namespace media
OLDNEW
« no previous file with comments | « media/mojo/services/utility_mojo_media_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698