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

Side by Side Diff: content/browser/media/android/browser_media_player_manager.cc

Issue 378543002: Skip to enter the fullscreen automatically when hole-punching is enabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "content/browser/media/android/browser_media_player_manager.h" 5 #include "content/browser/media/android/browser_media_player_manager.h"
6 6
7 #include "base/android/scoped_java_ref.h" 7 #include "base/android/scoped_java_ref.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "content/browser/android/content_view_core_impl.h" 9 #include "content/browser/android/content_view_core_impl.h"
10 #include "content/browser/media/android/browser_demuxer_android.h" 10 #include "content/browser/media/android/browser_demuxer_android.h"
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 void BrowserMediaPlayerManager::RequestFullScreen(int player_id) { 313 void BrowserMediaPlayerManager::RequestFullScreen(int player_id) {
314 if (fullscreen_player_id_ == player_id) 314 if (fullscreen_player_id_ == player_id)
315 return; 315 return;
316 316
317 if (fullscreen_player_id_ != -1) { 317 if (fullscreen_player_id_ != -1) {
318 // TODO(qinmin): Determine the correct error code we should report to WMPA. 318 // TODO(qinmin): Determine the correct error code we should report to WMPA.
319 OnError(player_id, MediaPlayerAndroid::MEDIA_ERROR_DECODE); 319 OnError(player_id, MediaPlayerAndroid::MEDIA_ERROR_DECODE);
320 return; 320 return;
321 } 321 }
322 322
323 #if defined(VIDEO_HOLE)
324 // Skip to enter the fullscreen automatically when hole-punching is enabled.
325 RendererPreferences* prefs = web_contents_->GetMutableRendererPrefs();
326 if (prefs->use_video_overlay_for_embedded_encrypted_video)
327 return;
xhwang 2014/07/07 16:18:33 Can you put this check in MediaSourcePlayer? e.g.
ycheo (away) 2014/07/08 12:40:09 Done.
328 #endif
329
323 Send(new MediaPlayerMsg_RequestFullscreen(RoutingID(), player_id)); 330 Send(new MediaPlayerMsg_RequestFullscreen(RoutingID(), player_id));
324 } 331 }
325 332
326 #if defined(VIDEO_HOLE) 333 #if defined(VIDEO_HOLE)
327 void BrowserMediaPlayerManager::AttachExternalVideoSurface(int player_id, 334 void BrowserMediaPlayerManager::AttachExternalVideoSurface(int player_id,
328 jobject surface) { 335 jobject surface) {
329 MediaPlayerAndroid* player = GetPlayer(player_id); 336 MediaPlayerAndroid* player = GetPlayer(player_id);
330 if (player) { 337 if (player) {
331 player->SetVideoSurface( 338 player->SetVideoSurface(
332 gfx::ScopedJavaSurface::AcquireExternalSurface(surface)); 339 gfx::ScopedJavaSurface::AcquireExternalSurface(surface));
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 #if defined(VIDEO_HOLE) 575 #if defined(VIDEO_HOLE)
569 MediaPlayerAndroid* player = GetPlayer(player_id); 576 MediaPlayerAndroid* player = GetPlayer(player_id);
570 if (player && player->IsSurfaceInUse()) 577 if (player && player->IsSurfaceInUse())
571 return; 578 return;
572 if (external_video_surface_container_) 579 if (external_video_surface_container_)
573 external_video_surface_container_->ReleaseExternalVideoSurface(player_id); 580 external_video_surface_container_->ReleaseExternalVideoSurface(player_id);
574 #endif // defined(VIDEO_HOLE) 581 #endif // defined(VIDEO_HOLE)
575 } 582 }
576 583
577 } // namespace content 584 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698