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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 // values at millisecond resolution. | 116 // values at millisecond resolution. |
117 return duration_ < | 117 return duration_ < |
118 base::TimeDelta::FromMilliseconds(std::numeric_limits<int32>::max()); | 118 base::TimeDelta::FromMilliseconds(std::numeric_limits<int32>::max()); |
119 } | 119 } |
120 | 120 |
121 void MediaSourcePlayer::Start() { | 121 void MediaSourcePlayer::Start() { |
122 DVLOG(1) << __FUNCTION__; | 122 DVLOG(1) << __FUNCTION__; |
123 | 123 |
124 playing_ = true; | 124 playing_ = true; |
125 | 125 |
126 if (IsProtectedSurfaceRequired()) | 126 bool request_fullscreen = IsProtectedSurfaceRequired(); |
| 127 #if defined(VIDEO_HOLE) |
| 128 // Skip to request fullscreen when hole-punching is used. |
| 129 request_fullscreen = request_fullscreen && |
| 130 !manager()->ShouldUseVideoOverlayForEmbeddedEncryptedVideo(); |
| 131 #endif // defined(VIDEO_HOLE) |
| 132 if (request_fullscreen) |
127 manager()->RequestFullScreen(player_id()); | 133 manager()->RequestFullScreen(player_id()); |
128 | 134 |
129 StartInternal(); | 135 StartInternal(); |
130 } | 136 } |
131 | 137 |
132 void MediaSourcePlayer::Pause(bool is_media_related_action) { | 138 void MediaSourcePlayer::Pause(bool is_media_related_action) { |
133 DVLOG(1) << __FUNCTION__; | 139 DVLOG(1) << __FUNCTION__; |
134 | 140 |
135 // Since decoder jobs have their own thread, decoding is not fully paused | 141 // Since decoder jobs have their own thread, decoding is not fully paused |
136 // until all the decoder jobs call MediaDecoderCallback(). It is possible | 142 // until all the decoder jobs call MediaDecoderCallback(). It is possible |
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
751 // release MediaDrm when the video is paused, or when the device goes to | 757 // release MediaDrm when the video is paused, or when the device goes to |
752 // sleep (see http://crbug.com/272421). | 758 // sleep (see http://crbug.com/272421). |
753 NOTREACHED() << "CDM detachment not supported."; | 759 NOTREACHED() << "CDM detachment not supported."; |
754 DCHECK(drm_bridge_); | 760 DCHECK(drm_bridge_); |
755 audio_decoder_job_->SetDrmBridge(NULL); | 761 audio_decoder_job_->SetDrmBridge(NULL); |
756 video_decoder_job_->SetDrmBridge(NULL); | 762 video_decoder_job_->SetDrmBridge(NULL); |
757 drm_bridge_ = NULL; | 763 drm_bridge_ = NULL; |
758 } | 764 } |
759 | 765 |
760 } // namespace media | 766 } // namespace media |
OLD | NEW |