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

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

Issue 2067073002: media: Run mojo media application in GPU process on desktop by default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: media: Run mojo media application in GPU process on desktop by default Created 4 years, 6 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/service_factory_impl.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/service_factory_impl.h" 5 #include "media/mojo/services/service_factory_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/threading/thread_task_runner_handle.h" 8 #include "base/threading/thread_task_runner_handle.h"
9 #include "media/base/media_log.h" 9 #include "media/base/media_log.h"
10 #include "media/mojo/services/mojo_media_client.h" 10 #include "media/mojo/services/mojo_media_client.h"
(...skipping 22 matching lines...) Expand all
33 ServiceFactoryImpl::ServiceFactoryImpl( 33 ServiceFactoryImpl::ServiceFactoryImpl(
34 mojo::InterfaceRequest<mojom::ServiceFactory> request, 34 mojo::InterfaceRequest<mojom::ServiceFactory> request,
35 shell::mojom::InterfaceProvider* interfaces, 35 shell::mojom::InterfaceProvider* interfaces,
36 scoped_refptr<MediaLog> media_log, 36 scoped_refptr<MediaLog> media_log,
37 std::unique_ptr<shell::ShellConnectionRef> connection_ref, 37 std::unique_ptr<shell::ShellConnectionRef> connection_ref,
38 MojoMediaClient* mojo_media_client) 38 MojoMediaClient* mojo_media_client)
39 : binding_(this, std::move(request)), 39 : binding_(this, std::move(request)),
40 #if defined(ENABLE_MOJO_CDM) 40 #if defined(ENABLE_MOJO_CDM)
41 interfaces_(interfaces), 41 interfaces_(interfaces),
42 #endif 42 #endif
43 #if defined(ENABLE_MOJO_AUDIO_DECODER) || defined(ENABLE_MOJO_CDM) || \
44 defined(ENABLE_MOJO_RENDERER)
45 mojo_media_client_(mojo_media_client),
46 #endif
47 media_log_(media_log), 43 media_log_(media_log),
48 connection_ref_(std::move(connection_ref)) { 44 connection_ref_(std::move(connection_ref)),
45 mojo_media_client_(mojo_media_client) {
49 DVLOG(1) << __FUNCTION__; 46 DVLOG(1) << __FUNCTION__;
47 DCHECK(mojo_media_client_);
50 } 48 }
51 49
52 ServiceFactoryImpl::~ServiceFactoryImpl() { 50 ServiceFactoryImpl::~ServiceFactoryImpl() {
53 DVLOG(1) << __FUNCTION__; 51 DVLOG(1) << __FUNCTION__;
54 } 52 }
55 53
56 // mojom::ServiceFactory implementation. 54 // mojom::ServiceFactory implementation.
57 55
58 void ServiceFactoryImpl::CreateAudioDecoder( 56 void ServiceFactoryImpl::CreateAudioDecoder(
59 mojo::InterfaceRequest<mojom::AudioDecoder> request) { 57 mojo::InterfaceRequest<mojom::AudioDecoder> request) {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 CdmFactory* ServiceFactoryImpl::GetCdmFactory() { 134 CdmFactory* ServiceFactoryImpl::GetCdmFactory() {
137 if (!cdm_factory_) { 135 if (!cdm_factory_) {
138 cdm_factory_ = mojo_media_client_->CreateCdmFactory(interfaces_); 136 cdm_factory_ = mojo_media_client_->CreateCdmFactory(interfaces_);
139 LOG_IF(ERROR, !cdm_factory_) << "CdmFactory not available."; 137 LOG_IF(ERROR, !cdm_factory_) << "CdmFactory not available.";
140 } 138 }
141 return cdm_factory_.get(); 139 return cdm_factory_.get();
142 } 140 }
143 #endif // defined(ENABLE_MOJO_CDM) 141 #endif // defined(ENABLE_MOJO_CDM)
144 142
145 } // namespace media 143 } // namespace media
OLDNEW
« no previous file with comments | « media/mojo/services/service_factory_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698