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

Side by Side Diff: content/browser/media/media_interface_proxy.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 | « content/browser/media/media_interface_proxy.h ('k') | content/common/memory_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "content/browser/media/media_interface_proxy.h" 5 #include "content/browser/media/media_interface_proxy.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 28 matching lines...) Expand all
39 39
40 // |interface_factory_ptr_| will be lazily connected in 40 // |interface_factory_ptr_| will be lazily connected in
41 // GetMediaInterfaceFactory(). 41 // GetMediaInterfaceFactory().
42 } 42 }
43 43
44 MediaInterfaceProxy::~MediaInterfaceProxy() { 44 MediaInterfaceProxy::~MediaInterfaceProxy() {
45 DVLOG(1) << __FUNCTION__; 45 DVLOG(1) << __FUNCTION__;
46 DCHECK(thread_checker_.CalledOnValidThread()); 46 DCHECK(thread_checker_.CalledOnValidThread());
47 } 47 }
48 48
49 void MediaInterfaceProxy::CreateDemuxer(media::mojom::DemuxerRequest request) {
50 DCHECK(thread_checker_.CalledOnValidThread());
51 GetMediaInterfaceFactory()->CreateDemuxer(std::move(request));
52 }
53
54 void MediaInterfaceProxy::CreateSourceBuffer(
55 media::mojom::SourceBufferRequest request) {
56 DCHECK(thread_checker_.CalledOnValidThread());
57 GetMediaInterfaceFactory()->CreateSourceBuffer(std::move(request));
58 }
59
49 void MediaInterfaceProxy::CreateAudioDecoder( 60 void MediaInterfaceProxy::CreateAudioDecoder(
50 media::mojom::AudioDecoderRequest request) { 61 media::mojom::AudioDecoderRequest request) {
51 DCHECK(thread_checker_.CalledOnValidThread()); 62 DCHECK(thread_checker_.CalledOnValidThread());
52 GetMediaInterfaceFactory()->CreateAudioDecoder(std::move(request)); 63 GetMediaInterfaceFactory()->CreateAudioDecoder(std::move(request));
53 } 64 }
54 65
55 void MediaInterfaceProxy::CreateVideoDecoder( 66 void MediaInterfaceProxy::CreateVideoDecoder(
56 media::mojom::VideoDecoderRequest request) { 67 media::mojom::VideoDecoderRequest request) {
57 DCHECK(thread_checker_.CalledOnValidThread()); 68 DCHECK(thread_checker_.CalledOnValidThread());
58 GetMediaInterfaceFactory()->CreateVideoDecoder(std::move(request)); 69 GetMediaInterfaceFactory()->CreateVideoDecoder(std::move(request));
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 service_manager::Connector* connector = 138 service_manager::Connector* connector =
128 ServiceManagerConnection::GetForProcess()->GetConnector(); 139 ServiceManagerConnection::GetForProcess()->GetConnector();
129 connector->BindInterface("media", &media_service); 140 connector->BindInterface("media", &media_service);
130 media_service->CreateInterfaceFactory(MakeRequest(&interface_factory_ptr_), 141 media_service->CreateInterfaceFactory(MakeRequest(&interface_factory_ptr_),
131 std::move(interfaces)); 142 std::move(interfaces));
132 interface_factory_ptr_.set_connection_error_handler(base::Bind( 143 interface_factory_ptr_.set_connection_error_handler(base::Bind(
133 &MediaInterfaceProxy::OnConnectionError, base::Unretained(this))); 144 &MediaInterfaceProxy::OnConnectionError, base::Unretained(this)));
134 } 145 }
135 146
136 } // namespace content 147 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/media/media_interface_proxy.h ('k') | content/common/memory_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698