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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 YV16 = 7, // 16bpp YVU planar 1x1 Y, 2x1 VU samples | 46 YV16 = 7, // 16bpp YVU planar 1x1 Y, 2x1 VU samples |
47 EMPTY = 9, // An empty frame. | 47 EMPTY = 9, // An empty frame. |
48 I420 = 11, // 12bpp YVU planar 1x1 Y, 2x2 UV samples. | 48 I420 = 11, // 12bpp YVU planar 1x1 Y, 2x2 UV samples. |
49 NATIVE_TEXTURE = 12, // Native texture. Pixel-format agnostic. | 49 NATIVE_TEXTURE = 12, // Native texture. Pixel-format agnostic. |
50 #if defined(GOOGLE_TV) | 50 #if defined(GOOGLE_TV) |
51 HOLE = 13, // Hole frame. | 51 HOLE = 13, // Hole frame. |
52 #endif | 52 #endif |
53 YV12A = 14, // 20bpp YUVA planar 1x1 Y, 2x2 VU, 1x1 A samples. | 53 YV12A = 14, // 20bpp YUVA planar 1x1 Y, 2x2 VU, 1x1 A samples. |
54 }; | 54 }; |
55 | 55 |
| 56 // Returns the name of a Format as a string. |
| 57 static std::string FormatToString(Format format); |
| 58 |
56 // This class calls the TextureNoLongerNeededCallback when the last reference | 59 // This class calls the TextureNoLongerNeededCallback when the last reference |
57 // on the class is destroyed. The VideoFrame holds a reference to the mailbox | 60 // on the class is destroyed. The VideoFrame holds a reference to the mailbox |
58 // but anyone else who queries the mailbox should also hold a reference while | 61 // but anyone else who queries the mailbox should also hold a reference while |
59 // it is uses the mailbox, to ensure it remains valid. When finished with the | 62 // it is uses the mailbox, to ensure it remains valid. When finished with the |
60 // mailbox, call Return() with a new sync point, to ensure the mailbox remains | 63 // mailbox, call Return() with a new sync point, to ensure the mailbox remains |
61 // valid for the issued commands. | 64 // valid for the issued commands. |
62 class MEDIA_EXPORT MailboxHolder | 65 class MEDIA_EXPORT MailboxHolder |
63 : public base::RefCountedThreadSafe<MailboxHolder> { | 66 : public base::RefCountedThreadSafe<MailboxHolder> { |
64 public: | 67 public: |
65 typedef base::Callback<void(uint32 sync_point)> | 68 typedef base::Callback<void(uint32 sync_point)> |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 base::Closure no_longer_needed_cb_; | 269 base::Closure no_longer_needed_cb_; |
267 | 270 |
268 base::TimeDelta timestamp_; | 271 base::TimeDelta timestamp_; |
269 | 272 |
270 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); | 273 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); |
271 }; | 274 }; |
272 | 275 |
273 } // namespace media | 276 } // namespace media |
274 | 277 |
275 #endif // MEDIA_BASE_VIDEO_FRAME_H_ | 278 #endif // MEDIA_BASE_VIDEO_FRAME_H_ |
OLD | NEW |