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

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

Issue 651243003: Remove MediaPlayerAndroid::IsSurfaceInUse() call (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | « no previous file | media/base/android/media_player_android.h » ('j') | 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 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 fullscreen_player_id_ != (*it)->player_id()) { 584 fullscreen_player_id_ != (*it)->player_id()) {
585 ReleasePlayer(*it); 585 ReleasePlayer(*it);
586 Send(new MediaPlayerMsg_MediaPlayerReleased(RoutingID(), 586 Send(new MediaPlayerMsg_MediaPlayerReleased(RoutingID(),
587 (*it)->player_id())); 587 (*it)->player_id()));
588 } 588 }
589 } 589 }
590 } 590 }
591 591
592 void BrowserMediaPlayerManager::ReleaseMediaResources(int player_id) { 592 void BrowserMediaPlayerManager::ReleaseMediaResources(int player_id) {
593 #if defined(VIDEO_HOLE) 593 #if defined(VIDEO_HOLE)
594 MediaPlayerAndroid* player = GetPlayer(player_id);
595 if (player && player->IsSurfaceInUse())
596 return;
597 if (external_video_surface_container_) 594 if (external_video_surface_container_)
598 external_video_surface_container_->ReleaseExternalVideoSurface(player_id); 595 external_video_surface_container_->ReleaseExternalVideoSurface(player_id);
599 #endif // defined(VIDEO_HOLE) 596 #endif // defined(VIDEO_HOLE)
600 } 597 }
601 598
602 void BrowserMediaPlayerManager::ReleasePlayer(MediaPlayerAndroid* player) { 599 void BrowserMediaPlayerManager::ReleasePlayer(MediaPlayerAndroid* player) {
603 player->Release(); 600 player->Release();
604 ReleaseMediaResources(player->player_id()); 601 ReleaseMediaResources(player->player_id());
605 } 602 }
606 603
607 } // namespace content 604 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | media/base/android/media_player_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698