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

Unified Diff: media/base/video_frame.h

Issue 14199002: Send hardware video frames with mailboxes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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: media/base/video_frame.h
diff --git a/media/base/video_frame.h b/media/base/video_frame.h
index 9a6f0a67fddb27b3eb5772ddd6f7e717744506c8..9ed8e412811ec437c3f558f80619595df57f0528 100644
--- a/media/base/video_frame.h
+++ b/media/base/video_frame.h
@@ -7,6 +7,7 @@
#include "base/callback.h"
#include "base/md5.h"
+#include "gpu/command_buffer/common/mailbox.h"
#include "media/base/buffers.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/size.h"
@@ -85,7 +86,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> {
// |read_pixels_cb| may be used to do (slow!) readbacks from the
// texture to main memory.
static scoped_refptr<VideoFrame> WrapNativeTexture(
- uint32 texture_id,
+ const gpu::Mailbox& texture_mailbox,
uint32 texture_target,
const gfx::Size& coded_size,
const gfx::Rect& visible_rect,
@@ -156,9 +157,9 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> {
// VideoFrame object and must not be freed by the caller.
uint8* data(size_t plane) const;
- // Returns the ID of the native texture wrapped by this frame. Only valid to
- // call if this is a NATIVE_TEXTURE frame.
- uint32 texture_id() const;
+ // Returns the mailbox of the native texture wrapped by this frame. Only
+ // valid to call if this is a NATIVE_TEXTURE frame.
+ const gpu::Mailbox& texture_mailbox() const;
// Returns the texture target. Only valid for NATIVE_TEXTURE frames.
uint32 texture_target() const;
@@ -215,8 +216,8 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> {
// Array of data pointers to each plane.
uint8* data_[kMaxPlanes];
- // Native texture ID, if this is a NATIVE_TEXTURE frame.
- uint32 texture_id_;
+ // Native texture mailbox, if this is a NATIVE_TEXTURE frame.
+ gpu::Mailbox texture_mailbox_;
uint32 texture_target_;
ReadPixelsCB read_pixels_cb_;

Powered by Google App Engine
This is Rietveld 408576698