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 "media/base/buffers.h" | 10 #include "media/base/buffers.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 // the frame are allocated but not initialized. | 41 // the frame are allocated but not initialized. |
42 static scoped_refptr<VideoFrame> CreateFrame( | 42 static scoped_refptr<VideoFrame> CreateFrame( |
43 Format format, | 43 Format format, |
44 size_t width, | 44 size_t width, |
45 size_t height, | 45 size_t height, |
46 base::TimeDelta timestamp, | 46 base::TimeDelta timestamp, |
47 base::TimeDelta duration); | 47 base::TimeDelta duration); |
48 | 48 |
49 // Call prior to CreateFrame to ensure validity of frame configuration. Called | 49 // Call prior to CreateFrame to ensure validity of frame configuration. Called |
50 // automatically by VideoDecoderConfig::IsValidConfig(). | 50 // automatically by VideoDecoderConfig::IsValidConfig(). |
| 51 // TODO(scherkus): VideoDecoderConfig shouldn't call this method |
51 static bool IsValidConfig( | 52 static bool IsValidConfig( |
52 Format format, | 53 Format format, |
53 size_t width, | 54 size_t width, |
54 size_t height); | 55 size_t height); |
55 | 56 |
56 // Wraps a native texture of the given parameters with a VideoFrame. When the | 57 // Wraps a native texture of the given parameters with a VideoFrame. When the |
57 // frame is destroyed |no_longer_needed.Run()| will be called. | 58 // frame is destroyed |no_longer_needed.Run()| will be called. |
58 static scoped_refptr<VideoFrame> WrapNativeTexture( | 59 static scoped_refptr<VideoFrame> WrapNativeTexture( |
59 uint32 texture_id, | 60 uint32 texture_id, |
60 uint32 texture_target, | 61 uint32 texture_target, |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 | 159 |
159 base::TimeDelta timestamp_; | 160 base::TimeDelta timestamp_; |
160 base::TimeDelta duration_; | 161 base::TimeDelta duration_; |
161 | 162 |
162 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); | 163 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); |
163 }; | 164 }; |
164 | 165 |
165 } // namespace media | 166 } // namespace media |
166 | 167 |
167 #endif // MEDIA_BASE_VIDEO_FRAME_H_ | 168 #endif // MEDIA_BASE_VIDEO_FRAME_H_ |
OLD | NEW |