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

Side by Side Diff: content/renderer/media/android/webmediaplayer_android.cc

Issue 149273005: Remove the logic to recreate stream texture for MSE video (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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/renderer/media/android/webmediaplayer_android.h" 5 #include "content/renderer/media/android/webmediaplayer_android.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 } 1025 }
1026 1026
1027 if (stream_texture_proxy_ && video_frame_provider_client_) 1027 if (stream_texture_proxy_ && video_frame_provider_client_)
1028 stream_texture_proxy_->SetClient(video_frame_provider_client_); 1028 stream_texture_proxy_->SetClient(video_frame_provider_client_);
1029 } 1029 }
1030 1030
1031 void WebMediaPlayerAndroid::EstablishSurfaceTexturePeer() { 1031 void WebMediaPlayerAndroid::EstablishSurfaceTexturePeer() {
1032 if (!stream_texture_proxy_) 1032 if (!stream_texture_proxy_)
1033 return; 1033 return;
1034 1034
1035 if (media_source_delegate_ && stream_texture_factory_) {
1036 // MediaCodec will release the old surface when it goes away, we need to
1037 // recreate a new one each time this is called.
1038 stream_texture_factory_->DestroyStreamTexture(texture_id_);
1039 stream_id_ = 0;
1040 texture_id_ = 0;
1041 texture_mailbox_ = gpu::Mailbox();
1042 texture_mailbox_sync_point_ = 0;
1043 DoCreateStreamTexture();
1044 ReallocateVideoFrame();
1045 stream_texture_proxy_initialized_ = false;
1046 }
1047 if (stream_texture_factory_.get() && stream_id_) 1035 if (stream_texture_factory_.get() && stream_id_)
1048 stream_texture_factory_->EstablishPeer(stream_id_, player_id_); 1036 stream_texture_factory_->EstablishPeer(stream_id_, player_id_);
1049 needs_establish_peer_ = false; 1037 needs_establish_peer_ = false;
1050 } 1038 }
1051 1039
1052 void WebMediaPlayerAndroid::DoCreateStreamTexture() { 1040 void WebMediaPlayerAndroid::DoCreateStreamTexture() {
1053 DCHECK(!stream_id_); 1041 DCHECK(!stream_id_);
1054 DCHECK(!texture_id_); 1042 DCHECK(!texture_id_);
1055 DCHECK(!texture_mailbox_sync_point_); 1043 DCHECK(!texture_mailbox_sync_point_);
1056 stream_id_ = stream_texture_factory_->CreateStreamTexture( 1044 stream_id_ = stream_texture_factory_->CreateStreamTexture(
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
1411 1399
1412 void WebMediaPlayerAndroid::exitFullscreen() { 1400 void WebMediaPlayerAndroid::exitFullscreen() {
1413 manager_->ExitFullscreen(player_id_); 1401 manager_->ExitFullscreen(player_id_);
1414 } 1402 }
1415 1403
1416 bool WebMediaPlayerAndroid::canEnterFullscreen() const { 1404 bool WebMediaPlayerAndroid::canEnterFullscreen() const {
1417 return manager_->CanEnterFullscreen(frame_); 1405 return manager_->CanEnterFullscreen(frame_);
1418 } 1406 }
1419 1407
1420 } // namespace content 1408 } // 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