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 10 matching lines...) Expand all Loading... | |
21 #if defined(OS_MACOSX) | 21 #if defined(OS_MACOSX) |
22 #include <CoreVideo/CVPixelBuffer.h> | 22 #include <CoreVideo/CVPixelBuffer.h> |
23 #include "base/mac/scoped_cftyperef.h" | 23 #include "base/mac/scoped_cftyperef.h" |
24 #endif | 24 #endif |
25 | 25 |
26 namespace media { | 26 namespace media { |
27 | 27 |
28 class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> { | 28 class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> { |
29 public: | 29 public: |
30 enum { | 30 enum { |
31 kFrameSizeAlignment = 16, | 31 // These values are chosen according to like values in FFmpeg. See static |
DaleCurtis
2015/08/11 00:31:30
Hmm, I wonder if we should instead add a construct
miu
2015/08/11 02:53:55
+1. This approach wastes memory for the non-ffmpe
| |
32 kFrameSizePadding = 16, | 32 // asserts in ffmpeg_common. |
33 kFrameSizeAlignment = 32, | |
34 kFrameSizePadding = 47, | |
33 kFrameAddressAlignment = 32 | 35 kFrameAddressAlignment = 32 |
34 }; | 36 }; |
35 | 37 |
36 enum { | 38 enum { |
37 kMaxPlanes = 4, | 39 kMaxPlanes = 4, |
38 | 40 |
39 kYPlane = 0, | 41 kYPlane = 0, |
40 kARGBPlane = kYPlane, | 42 kARGBPlane = kYPlane, |
41 kUPlane = 1, | 43 kUPlane = 1, |
42 kUVPlane = kUPlane, | 44 kUVPlane = kUPlane, |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
476 uint32 release_sync_point_; | 478 uint32 release_sync_point_; |
477 | 479 |
478 VideoFrameMetadata metadata_; | 480 VideoFrameMetadata metadata_; |
479 | 481 |
480 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); | 482 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); |
481 }; | 483 }; |
482 | 484 |
483 } // namespace media | 485 } // namespace media |
484 | 486 |
485 #endif // MEDIA_BASE_VIDEO_FRAME_H_ | 487 #endif // MEDIA_BASE_VIDEO_FRAME_H_ |
OLD | NEW |