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

Unified Diff: media/base/video_frame.cc

Issue 9416087: Add texture target field to video frame (for use by native textures). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/video_frame.h ('k') | webkit/media/webvideoframe_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/video_frame.cc
diff --git a/media/base/video_frame.cc b/media/base/video_frame.cc
index 7e7e60c1f3b56a66de39e702e16c499aa03547c7..9b8eb92f10d2ab4f322b25463d8ea477203992eb 100644
--- a/media/base/video_frame.cc
+++ b/media/base/video_frame.cc
@@ -4,6 +4,8 @@
#include "media/base/video_frame.h"
+#include <GL/gl.h>
Ami GONE FROM CHROMIUM 2012/02/22 04:51:00 Can drop this if you take my suggestion below.
+
#include "base/logging.h"
#include "media/base/video_util.h"
@@ -57,6 +59,7 @@ scoped_refptr<VideoFrame> VideoFrame::WrapNativeTexture(
scoped_refptr<VideoFrame> frame(
new VideoFrame(NATIVE_TEXTURE, width, height, timestamp, duration));
frame->texture_id_ = texture_id;
+ frame->texture_target_ = GL_TEXTURE_2D;
Ami GONE FROM CHROMIUM 2012/02/22 04:51:00 This smells wrong to me (b/c what's 2Dlicious abou
frame->texture_no_longer_needed_ = no_longer_needed;
return frame;
}
@@ -138,7 +141,8 @@ VideoFrame::VideoFrame(VideoFrame::Format format,
: format_(format),
width_(width),
height_(height),
- texture_id_(0) {
+ texture_id_(0),
+ texture_target_(0) {
SetTimestamp(timestamp);
SetDuration(duration);
memset(&strides_, 0, sizeof(strides_));
@@ -248,6 +252,11 @@ uint32 VideoFrame::texture_id() const {
return texture_id_;
}
+uint32 VideoFrame::texture_target() const {
+ DCHECK_EQ(format_, NATIVE_TEXTURE);
+ return texture_target_;
+}
+
bool VideoFrame::IsEndOfStream() const {
return format_ == VideoFrame::EMPTY;
}
« no previous file with comments | « media/base/video_frame.h ('k') | webkit/media/webvideoframe_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698