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

Side by Side Diff: media/base/android/media_source_player.cc

Issue 1344133002: MediaCodecPlayer implementation - stage 7 (DRM) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mtplayer-drm-prepare
Patch Set: Renamed a variable Created 5 years, 2 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/base/android/media_drm_bridge.cc ('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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/base/android/media_source_player.h" 5 #include "media/base/android/media_source_player.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 void MediaSourcePlayer::OnDemuxerDurationChanged(base::TimeDelta duration) { 258 void MediaSourcePlayer::OnDemuxerDurationChanged(base::TimeDelta duration) {
259 duration_ = duration; 259 duration_ = duration;
260 } 260 }
261 261
262 void MediaSourcePlayer::OnMediaCryptoReady( 262 void MediaSourcePlayer::OnMediaCryptoReady(
263 MediaDrmBridge::JavaObjectPtr /* media_crypto */, 263 MediaDrmBridge::JavaObjectPtr /* media_crypto */,
264 bool /* needs_protected_surface */) { 264 bool /* needs_protected_surface */) {
265 // Callback parameters are ignored in this player. They are intended for 265 // Callback parameters are ignored in this player. They are intended for
266 // MediaCodecPlayer which uses a different threading scheme. 266 // MediaCodecPlayer which uses a different threading scheme.
267 DCHECK(!drm_bridge_->GetMediaCrypto().is_null()); 267 DCHECK(!drm_bridge_->GetMediaCrypto().is_null());
268 drm_bridge_->SetMediaCryptoReadyCB(MediaDrmBridge::MediaCryptoReadyCB());
269 268
270 // Retry decoder creation if the decoders are waiting for MediaCrypto. 269 // Retry decoder creation if the decoders are waiting for MediaCrypto.
271 RetryDecoderCreation(true, true); 270 RetryDecoderCreation(true, true);
272 } 271 }
273 272
274 void MediaSourcePlayer::SetCdm(BrowserCdm* cdm) { 273 void MediaSourcePlayer::SetCdm(BrowserCdm* cdm) {
275 // Currently we don't support DRM change during the middle of playback, even 274 // Currently we don't support DRM change during the middle of playback, even
276 // if the player is paused. 275 // if the player is paused.
277 // TODO(qinmin): support DRM change after playback has started. 276 // TODO(qinmin): support DRM change after playback has started.
278 // http://crbug.com/253792. 277 // http://crbug.com/253792.
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 // support setMediaKeys(0) (see http://crbug.com/330324), or when we release 817 // support setMediaKeys(0) (see http://crbug.com/330324), or when we release
819 // MediaDrm when the video is paused, or when the device goes to sleep (see 818 // MediaDrm when the video is paused, or when the device goes to sleep (see
820 // http://crbug.com/272421). 819 // http://crbug.com/272421).
821 audio_decoder_job_->SetDrmBridge(NULL); 820 audio_decoder_job_->SetDrmBridge(NULL);
822 video_decoder_job_->SetDrmBridge(NULL); 821 video_decoder_job_->SetDrmBridge(NULL);
823 cdm_registration_id_ = 0; 822 cdm_registration_id_ = 0;
824 drm_bridge_ = NULL; 823 drm_bridge_ = NULL;
825 } 824 }
826 825
827 } // namespace media 826 } // namespace media
OLDNEW
« no previous file with comments | « media/base/android/media_drm_bridge.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698