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

Unified Diff: media/base/video_frame.h

Issue 12263013: media: Add support for playback of VP8 Alpha video streams (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: minor nit fixes Created 7 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
Index: media/base/video_frame.h
diff --git a/media/base/video_frame.h b/media/base/video_frame.h
index 3483e9191a91307ebb9bb8253f8fb3becac3ed09..c6b4b36531fdc2ac00cd3abc18b02eef58bc938a 100644
--- a/media/base/video_frame.h
+++ b/media/base/video_frame.h
@@ -22,13 +22,14 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> {
};
enum {
- kMaxPlanes = 3,
+ kMaxPlanes = 4,
kRGBPlane = 0,
kYPlane = 0,
kUPlane = 1,
kVPlane = 2,
+ kAPlane = 3,
};
// Surface formats roughly based on FOURCC labels, see:
@@ -43,6 +44,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> {
EMPTY = 9, // An empty frame.
I420 = 11, // 12bpp YVU planar 1x1 Y, 2x2 UV samples.
NATIVE_TEXTURE = 12, // Native texture. Pixel-format agnostic.
+ YV12A = 13, // 20bpp YUVA planar 1x1 Y, 2x2 VU, 1x1 A samples.
};
// Creates a new frame in system memory with given parameters. Buffers for
@@ -165,6 +167,10 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> {
// context. Calls MD5Update with the context and the contents of the frame.
void HashFrameForTesting(base::MD5Context* context);
+ bool HasAlpha() const {
scherkus (not reviewing) 2013/02/27 07:28:26 this method is a bit deceiving for example ... if
vignesh 2013/03/28 21:45:12 sorry, this was a method i used while debugging.
+ return IsValidPlane(kAPlane);
+ }
+
private:
friend class base::RefCountedThreadSafe<VideoFrame>;
// Clients must use the static CreateFrame() method to create a new frame.

Powered by Google App Engine
This is Rietveld 408576698