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

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

Issue 1021723003: Android: Never automatically enter fullscreen when media playback starts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 (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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // values at millisecond resolution. 114 // values at millisecond resolution.
115 return duration_ < 115 return duration_ <
116 base::TimeDelta::FromMilliseconds(std::numeric_limits<int32>::max()); 116 base::TimeDelta::FromMilliseconds(std::numeric_limits<int32>::max());
117 } 117 }
118 118
119 void MediaSourcePlayer::Start() { 119 void MediaSourcePlayer::Start() {
120 DVLOG(1) << __FUNCTION__; 120 DVLOG(1) << __FUNCTION__;
121 121
122 playing_ = true; 122 playing_ = true;
123 123
124 bool request_fullscreen = IsProtectedSurfaceRequired();
xhwang 2015/03/20 18:07:44 MediaSourcePlayer::IsProtectedSurfaceRequired() is
ddorwin 2015/03/20 18:45:25 Done. Thanks.
125 #if defined(VIDEO_HOLE)
126 // Skip to request fullscreen when hole-punching is used.
127 request_fullscreen = request_fullscreen &&
128 !manager()->ShouldUseVideoOverlayForEmbeddedEncryptedVideo();
129 #endif // defined(VIDEO_HOLE)
130 if (request_fullscreen)
131 manager()->RequestFullScreen(player_id());
132
133 StartInternal(); 124 StartInternal();
134 } 125 }
135 126
136 void MediaSourcePlayer::Pause(bool is_media_related_action) { 127 void MediaSourcePlayer::Pause(bool is_media_related_action) {
137 DVLOG(1) << __FUNCTION__; 128 DVLOG(1) << __FUNCTION__;
138 129
139 // Since decoder jobs have their own thread, decoding is not fully paused 130 // Since decoder jobs have their own thread, decoding is not fully paused
140 // until all the decoder jobs call MediaDecoderCallback(). It is possible 131 // until all the decoder jobs call MediaDecoderCallback(). It is possible
141 // that Start() is called while the player is waiting for 132 // that Start() is called while the player is waiting for
142 // MediaDecoderCallback(). In that case, decoding will continue when 133 // MediaDecoderCallback(). In that case, decoding will continue when
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 // support setMediaKeys(0) (see http://crbug.com/330324), or when we release 807 // support setMediaKeys(0) (see http://crbug.com/330324), or when we release
817 // MediaDrm when the video is paused, or when the device goes to sleep (see 808 // MediaDrm when the video is paused, or when the device goes to sleep (see
818 // http://crbug.com/272421). 809 // http://crbug.com/272421).
819 audio_decoder_job_->SetDrmBridge(NULL); 810 audio_decoder_job_->SetDrmBridge(NULL);
820 video_decoder_job_->SetDrmBridge(NULL); 811 video_decoder_job_->SetDrmBridge(NULL);
821 cdm_registration_id_ = 0; 812 cdm_registration_id_ = 0;
822 drm_bridge_ = NULL; 813 drm_bridge_ = NULL;
823 } 814 }
824 815
825 } // namespace media 816 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698