| 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 "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/md5.h" | 9 #include "base/md5.h" |
| 10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 enum Format { | 41 enum Format { |
| 42 UNKNOWN = 0, // Unknown format value. | 42 UNKNOWN = 0, // Unknown format value. |
| 43 YV12 = 1, // 12bpp YVU planar 1x1 Y, 2x2 VU samples | 43 YV12 = 1, // 12bpp YVU planar 1x1 Y, 2x2 VU samples |
| 44 YV16 = 2, // 16bpp YVU planar 1x1 Y, 2x1 VU samples | 44 YV16 = 2, // 16bpp YVU planar 1x1 Y, 2x1 VU samples |
| 45 I420 = 3, // 12bpp YVU planar 1x1 Y, 2x2 UV samples. | 45 I420 = 3, // 12bpp YVU planar 1x1 Y, 2x2 UV samples. |
| 46 YV12A = 4, // 20bpp YUVA planar 1x1 Y, 2x2 VU, 1x1 A samples. | 46 YV12A = 4, // 20bpp YUVA planar 1x1 Y, 2x2 VU, 1x1 A samples. |
| 47 #if defined(GOOGLE_TV) | 47 #if defined(GOOGLE_TV) |
| 48 HOLE = 5, // Hole frame. | 48 HOLE = 5, // Hole frame. |
| 49 #endif | 49 #endif |
| 50 NATIVE_TEXTURE = 6, // Native texture. Pixel-format agnostic. | 50 NATIVE_TEXTURE = 6, // Native texture. Pixel-format agnostic. |
| 51 YV12J = 7, // JPEG color range version of YV12 |
| 51 HISTOGRAM_MAX, // Must always be greatest. | 52 HISTOGRAM_MAX, // Must always be greatest. |
| 52 }; | 53 }; |
| 53 | 54 |
| 54 // Returns the name of a Format as a string. | 55 // Returns the name of a Format as a string. |
| 55 static std::string FormatToString(Format format); | 56 static std::string FormatToString(Format format); |
| 56 | 57 |
| 57 // This class calls the TextureNoLongerNeededCallback when the last reference | 58 // This class calls the TextureNoLongerNeededCallback when the last reference |
| 58 // on the class is destroyed. The VideoFrame holds a reference to the mailbox | 59 // on the class is destroyed. The VideoFrame holds a reference to the mailbox |
| 59 // but anyone else who queries the mailbox should also hold a reference while | 60 // but anyone else who queries the mailbox should also hold a reference while |
| 60 // it is uses the mailbox, to ensure it remains valid. When finished with the | 61 // it is uses the mailbox, to ensure it remains valid. When finished with the |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 base::TimeDelta timestamp_; | 296 base::TimeDelta timestamp_; |
| 296 | 297 |
| 297 const bool end_of_stream_; | 298 const bool end_of_stream_; |
| 298 | 299 |
| 299 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); | 300 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); |
| 300 }; | 301 }; |
| 301 | 302 |
| 302 } // namespace media | 303 } // namespace media |
| 303 | 304 |
| 304 #endif // MEDIA_BASE_VIDEO_FRAME_H_ | 305 #endif // MEDIA_BASE_VIDEO_FRAME_H_ |
| OLD | NEW |