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

Unified Diff: webkit/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: Fix linux/windows hardware path Created 7 years, 8 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/media/android/webmediaplayer_android.cc
diff --git a/webkit/media/android/webmediaplayer_android.cc b/webkit/media/android/webmediaplayer_android.cc
index 3dfa9f8f56d69ec0f363bb166552eb2a21dbbff1..0570e3f8319755bafbda828a905068827c5f9661 100644
--- a/webkit/media/android/webmediaplayer_android.cc
+++ b/webkit/media/android/webmediaplayer_android.cc
@@ -44,6 +44,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),
has_size_info_(false),
@@ -56,7 +59,11 @@ WebMediaPlayerAndroid::WebMediaPlayerAndroid(
if (stream_texture_factory_.get()) {
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();
}
}
@@ -510,9 +517,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