| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MEDIA_BASE_VIDEO_FRAME_H_ | 5 #ifndef MEDIA_BASE_VIDEO_FRAME_H_ |
| 6 #define MEDIA_BASE_VIDEO_FRAME_H_ | 6 #define MEDIA_BASE_VIDEO_FRAME_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 kVPlane = 2, | 46 kVPlane = 2, |
| 47 kAPlane = 3, | 47 kAPlane = 3, |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 // Surface formats roughly based on FOURCC labels, see: | 50 // Surface formats roughly based on FOURCC labels, see: |
| 51 // http://www.fourcc.org/rgb.php | 51 // http://www.fourcc.org/rgb.php |
| 52 // http://www.fourcc.org/yuv.php | 52 // http://www.fourcc.org/yuv.php |
| 53 // Logged to UMA, so never reuse values. | 53 // Logged to UMA, so never reuse values. |
| 54 enum Format { | 54 enum Format { |
| 55 UNKNOWN = 0, // Unknown format value. | 55 UNKNOWN = 0, // Unknown format value. |
| 56 YV12 = 1, // 12bpp YVU planar 1x1 Y, 2x2 VU samples | 56 YV12 = 1, // 12bpp YVU planar 1x1 Y, 2x2 VU samples |
| 57 YV16 = 2, // 16bpp YVU planar 1x1 Y, 2x1 VU samples | 57 YV16 = 2, // 16bpp YVU planar 1x1 Y, 2x1 VU samples |
| 58 I420 = 3, // 12bpp YVU planar 1x1 Y, 2x2 UV samples. | 58 I420 = 3, // 12bpp YVU planar 1x1 Y, 2x2 UV samples. |
| 59 YV12A = 4, // 20bpp YUVA planar 1x1 Y, 2x2 VU, 1x1 A samples. | 59 YV12A = 4, // 20bpp YUVA planar 1x1 Y, 2x2 VU, 1x1 A samples. |
| 60 #if defined(VIDEO_HOLE) | 60 #if defined(VIDEO_HOLE) |
| 61 HOLE = 5, // Hole frame. | 61 HOLE = 5, // Hole frame. |
| 62 #endif // defined(VIDEO_HOLE) | 62 #endif // defined(VIDEO_HOLE) |
| 63 NATIVE_TEXTURE = 6, // Native texture. Pixel-format agnostic. | 63 NATIVE_TEXTURE = 6, // Native texture. Pixel-format agnostic. |
| 64 YV12J = 7, // JPEG color range version of YV12 | 64 YV12J = 7, // JPEG color range version of YV12 |
| 65 NV12 = 8, // 12bpp 1x1 Y plane followed by an interleaved 2x2 UV plane. | 65 NV12 = 8, // 12bpp 1x1 Y plane followed by an interleaved 2x2 UV plane. |
| 66 YV24 = 9, // 24bpp YUV planar, no subsampling. | 66 YV24 = 9, // 24bpp YUV planar, no subsampling. |
| 67 ARGB = 10, // 32bpp ARGB, 1 plane. | 67 ARGB = 10, // 32bpp ARGB, 1 plane. |
| 68 YV12HD = 11, // Rec709 "HD" color space version of YV12 |
| 68 // Please update UMA histogram enumeration when adding new formats here. | 69 // Please update UMA histogram enumeration when adding new formats here. |
| 69 FORMAT_MAX = ARGB, // Must always be equal to largest entry logged. | 70 FORMAT_MAX = YV12HD, // Must always be equal to largest entry logged. |
| 70 }; | 71 }; |
| 71 | 72 |
| 72 // Returns the name of a Format as a string. | 73 // Returns the name of a Format as a string. |
| 73 static std::string FormatToString(Format format); | 74 static std::string FormatToString(Format format); |
| 74 | 75 |
| 75 // Creates a new frame in system memory with given parameters. Buffers for | 76 // Creates a new frame in system memory with given parameters. Buffers for |
| 76 // the frame are allocated but not initialized. | 77 // the frame are allocated but not initialized. |
| 77 static scoped_refptr<VideoFrame> CreateFrame( | 78 static scoped_refptr<VideoFrame> CreateFrame( |
| 78 Format format, | 79 Format format, |
| 79 const gfx::Size& coded_size, | 80 const gfx::Size& coded_size, |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 uint32 release_sync_point_; | 409 uint32 release_sync_point_; |
| 409 | 410 |
| 410 const bool end_of_stream_; | 411 const bool end_of_stream_; |
| 411 | 412 |
| 412 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); | 413 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); |
| 413 }; | 414 }; |
| 414 | 415 |
| 415 } // namespace media | 416 } // namespace media |
| 416 | 417 |
| 417 #endif // MEDIA_BASE_VIDEO_FRAME_H_ | 418 #endif // MEDIA_BASE_VIDEO_FRAME_H_ |
| OLD | NEW |