| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 kVPlane = 2, | 45 kVPlane = 2, |
| 46 kAPlane = 3, | 46 kAPlane = 3, |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 // Surface formats roughly based on FOURCC labels, see: | 49 // Surface formats roughly based on FOURCC labels, see: |
| 50 // http://www.fourcc.org/rgb.php | 50 // http://www.fourcc.org/rgb.php |
| 51 // http://www.fourcc.org/yuv.php | 51 // http://www.fourcc.org/yuv.php |
| 52 // Logged to UMA, so never reuse values. | 52 // Logged to UMA, so never reuse values. |
| 53 enum Format { | 53 enum Format { |
| 54 UNKNOWN = 0, // Unknown format value. | 54 UNKNOWN = 0, // Unknown format value. |
| 55 YV12 = 1, // 12bpp YVU planar 1x1 Y, 2x2 VU samples | 55 YV12 = 1, // 12bpp YVU planar 1x1 Y, 2x2 VU samples |
| 56 YV16 = 2, // 16bpp YVU planar 1x1 Y, 2x1 VU samples | 56 YV16 = 2, // 16bpp YVU planar 1x1 Y, 2x1 VU samples |
| 57 I420 = 3, // 12bpp YVU planar 1x1 Y, 2x2 UV samples. | 57 I420 = 3, // 12bpp YVU planar 1x1 Y, 2x2 UV samples. |
| 58 YV12A = 4, // 20bpp YUVA planar 1x1 Y, 2x2 VU, 1x1 A samples. | 58 YV12A = 4, // 20bpp YUVA planar 1x1 Y, 2x2 VU, 1x1 A samples. |
| 59 #if defined(VIDEO_HOLE) | 59 #if defined(VIDEO_HOLE) |
| 60 HOLE = 5, // Hole frame. | 60 HOLE = 5, // Hole frame. |
| 61 #endif // defined(VIDEO_HOLE) | 61 #endif // defined(VIDEO_HOLE) |
| 62 NATIVE_TEXTURE = 6, // Native texture. Pixel-format agnostic. | 62 NATIVE_TEXTURE = 6, // Native texture. Pixel-format agnostic. |
| 63 YV12J = 7, // JPEG color range version of YV12 | 63 YV12J = 7, // JPEG color range version of YV12 |
| 64 NV12 = 8, // 12bpp 1x1 Y plane followed by an interleaved 2x2 UV plane. | 64 NV12 = 8, // 12bpp 1x1 Y plane followed by an interleaved 2x2 UV plane. |
| 65 YV24 = 9, // 24bpp YUV planar, no subsampling. | 65 YV24 = 9, // 24bpp YUV planar, no subsampling. |
| 66 FORMAT_MAX = YV24, // Must always be equal to largest entry logged. | 66 YV12HD = 10, // Rec709 "HD" color space version of YV12 |
| 67 FORMAT_MAX = YV12HD, // Must always be equal to largest entry logged. |
| 67 }; | 68 }; |
| 68 | 69 |
| 69 // Returns the name of a Format as a string. | 70 // Returns the name of a Format as a string. |
| 70 static std::string FormatToString(Format format); | 71 static std::string FormatToString(Format format); |
| 71 | 72 |
| 72 // Creates a new frame in system memory with given parameters. Buffers for | 73 // Creates a new frame in system memory with given parameters. Buffers for |
| 73 // the frame are allocated but not initialized. | 74 // the frame are allocated but not initialized. |
| 74 static scoped_refptr<VideoFrame> CreateFrame( | 75 static scoped_refptr<VideoFrame> CreateFrame( |
| 75 Format format, | 76 Format format, |
| 76 const gfx::Size& coded_size, | 77 const gfx::Size& coded_size, |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 uint32 release_sync_point_; | 403 uint32 release_sync_point_; |
| 403 | 404 |
| 404 const bool end_of_stream_; | 405 const bool end_of_stream_; |
| 405 | 406 |
| 406 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); | 407 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); |
| 407 }; | 408 }; |
| 408 | 409 |
| 409 } // namespace media | 410 } // namespace media |
| 410 | 411 |
| 411 #endif // MEDIA_BASE_VIDEO_FRAME_H_ | 412 #endif // MEDIA_BASE_VIDEO_FRAME_H_ |
| OLD | NEW |