OLD | NEW |
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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 if (playing_) | 397 if (playing_) |
398 StartInternal(); | 398 StartInternal(); |
399 } | 399 } |
400 | 400 |
401 void MediaSourcePlayer::SetDrmBridge(MediaDrmBridge* drm_bridge) { | 401 void MediaSourcePlayer::SetDrmBridge(MediaDrmBridge* drm_bridge) { |
402 // Currently we don't support DRM change during the middle of playback, even | 402 // Currently we don't support DRM change during the middle of playback, even |
403 // if the player is paused. | 403 // if the player is paused. |
404 // TODO(qinmin): support DRM change after playback has started. | 404 // TODO(qinmin): support DRM change after playback has started. |
405 // http://crbug.com/253792. | 405 // http://crbug.com/253792. |
406 if (GetCurrentTime() > base::TimeDelta()) { | 406 if (GetCurrentTime() > base::TimeDelta()) { |
407 LOG(INFO) << "Setting DRM bridge after playback has started. " | 407 VLOG(0) << "Setting DRM bridge after playback has started. " |
408 << "This is not well supported!"; | 408 << "This is not well supported!"; |
409 } | 409 } |
410 | 410 |
411 drm_bridge_ = drm_bridge; | 411 drm_bridge_ = drm_bridge; |
412 | 412 |
413 if (drm_bridge_->GetMediaCrypto().is_null()) { | 413 if (drm_bridge_->GetMediaCrypto().is_null()) { |
414 drm_bridge_->SetMediaCryptoReadyCB(base::Bind( | 414 drm_bridge_->SetMediaCryptoReadyCB(base::Bind( |
415 &MediaSourcePlayer::OnMediaCryptoReady, weak_this_.GetWeakPtr())); | 415 &MediaSourcePlayer::OnMediaCryptoReady, weak_this_.GetWeakPtr())); |
416 return; | 416 return; |
417 } | 417 } |
418 | 418 |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
954 | 954 |
955 void MediaSourcePlayer::ClearPendingEvent(PendingEventFlags event) { | 955 void MediaSourcePlayer::ClearPendingEvent(PendingEventFlags event) { |
956 DVLOG(1) << __FUNCTION__ << "(" << GetEventName(event) << ")"; | 956 DVLOG(1) << __FUNCTION__ << "(" << GetEventName(event) << ")"; |
957 DCHECK_NE(event, NO_EVENT_PENDING); | 957 DCHECK_NE(event, NO_EVENT_PENDING); |
958 DCHECK(IsEventPending(event)) << GetEventName(event); | 958 DCHECK(IsEventPending(event)) << GetEventName(event); |
959 | 959 |
960 pending_event_ &= ~event; | 960 pending_event_ &= ~event; |
961 } | 961 } |
962 | 962 |
963 } // namespace media | 963 } // namespace media |
OLD | NEW |