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

Unified Diff: webkit/renderer/media/android/webmediaplayer_android.cc

Issue 14199002: Send hardware video frames with mailboxes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: video-mailbox: rebase Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: webkit/renderer/media/android/webmediaplayer_android.cc
diff --git a/webkit/renderer/media/android/webmediaplayer_android.cc b/webkit/renderer/media/android/webmediaplayer_android.cc
index e9ba5427d303968ba90494d1c4821a663adfbd41..acabf166388daa0eb78caac5641ebcc0f448acda 100644
--- a/webkit/renderer/media/android/webmediaplayer_android.cc
+++ b/webkit/renderer/media/android/webmediaplayer_android.cc
@@ -74,6 +74,9 @@ WebMediaPlayerAndroid::WebMediaPlayerAndroid(
manager_(manager),
network_state_(WebMediaPlayer::NetworkStateEmpty),
ready_state_(WebMediaPlayer::ReadyStateHaveNothing),
+ texture_id_(0),
+ texture_mailbox_sync_point_(0),
+ stream_id_(0),
is_playing_(false),
needs_establish_peer_(true),
stream_texture_proxy_initialized_(false),
@@ -98,7 +101,11 @@ WebMediaPlayerAndroid::WebMediaPlayerAndroid(
if (stream_texture_factory_) {
stream_texture_proxy_.reset(stream_texture_factory_->CreateProxy());
- stream_id_ = stream_texture_factory_->CreateStreamTexture(&texture_id_);
+ stream_id_ = stream_texture_factory_->CreateStreamTexture(
+ kGLTextureExternalOES,
+ &texture_id_,
+ &texture_mailbox_,
+ &texture_mailbox_sync_point_);
ReallocateVideoFrame();
}
@@ -743,9 +750,11 @@ void WebMediaPlayerAndroid::ReallocateVideoFrame() {
#endif
} else if (texture_id_) {
current_frame_ = VideoFrame::WrapNativeTexture(
- texture_id_, kGLTextureExternalOES, natural_size_,
+ texture_mailbox_, texture_mailbox_sync_point_,
+ kGLTextureExternalOES, natural_size_,
gfx::Rect(natural_size_), natural_size_, base::TimeDelta(),
VideoFrame::ReadPixelsCB(),
+ VideoFrame::TextureNoLongerNeededCallback(),
base::Closure());
}
}

Powered by Google App Engine
This is Rietveld 408576698