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

Side by Side Diff: chromecast/browser/media/media_pipeline_host.cc

Issue 894173002: Adds hook for content embedders to get media::BrowserCdm*. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes CmaMessageFilterHost callback reference, rebase Created 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chromecast/browser/media/media_pipeline_host.h" 5 #include "chromecast/browser/media/media_pipeline_host.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 DCHECK(thread_checker_.CalledOnValidThread()); 146 DCHECK(thread_checker_.CalledOnValidThread());
147 media_pipeline_->SetPlaybackRate(playback_rate); 147 media_pipeline_->SetPlaybackRate(playback_rate);
148 } 148 }
149 149
150 void MediaPipelineHost::SetVolume(TrackId track_id, float volume) { 150 void MediaPipelineHost::SetVolume(TrackId track_id, float volume) {
151 DCHECK(thread_checker_.CalledOnValidThread()); 151 DCHECK(thread_checker_.CalledOnValidThread());
152 CHECK(track_id == kAudioTrackId); 152 CHECK(track_id == kAudioTrackId);
153 media_pipeline_->GetAudioPipeline()->SetVolume(volume); 153 media_pipeline_->GetAudioPipeline()->SetVolume(volume);
154 } 154 }
155 155
156 void MediaPipelineHost::SetCdm( 156 void MediaPipelineHost::SetCdm(::media::BrowserCdm* cdm) {
157 int render_process_id, int render_frame_id, int cdm_id) {
158 DCHECK(thread_checker_.CalledOnValidThread()); 157 DCHECK(thread_checker_.CalledOnValidThread());
159 158 media_pipeline_->SetCdm(cdm);
160 // TODO(gunsch): crbug.com/444930. Find a way to get
161 // content::BrowserCdmManager since it is not under content/public/.
162 NOTIMPLEMENTED();
163 } 159 }
164 160
165 void MediaPipelineHost::NotifyPipeWrite(TrackId track_id) { 161 void MediaPipelineHost::NotifyPipeWrite(TrackId track_id) {
166 DCHECK(thread_checker_.CalledOnValidThread()); 162 DCHECK(thread_checker_.CalledOnValidThread());
167 MediaTrackMap::iterator it = media_track_map_.find(track_id); 163 MediaTrackMap::iterator it = media_track_map_.find(track_id);
168 if (it == media_track_map_.end()) 164 if (it == media_track_map_.end())
169 return; 165 return;
170 166
171 MediaTrackHost* media_track_host = it->second; 167 MediaTrackHost* media_track_host = it->second;
172 if (!media_track_host->pipe_write_cb.is_null()) 168 if (!media_track_host->pipe_write_cb.is_null())
173 media_track_host->pipe_write_cb.Run(); 169 media_track_host->pipe_write_cb.Run();
174 } 170 }
175 171
176 } // namespace media 172 } // namespace media
177 } // namespace chromecast 173 } // namespace chromecast
178 174
OLDNEW
« no previous file with comments | « chromecast/browser/media/media_pipeline_host.h ('k') | content/browser/media/cdm/browser_cdm_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698