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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
162 const gfx::Size& natural_size, | 162 const gfx::Size& natural_size, |
163 int32 y_stride, | 163 int32 y_stride, |
164 int32 u_stride, | 164 int32 u_stride, |
165 int32 v_stride, | 165 int32 v_stride, |
166 uint8* y_data, | 166 uint8* y_data, |
167 uint8* u_data, | 167 uint8* u_data, |
168 uint8* v_data, | 168 uint8* v_data, |
169 base::TimeDelta timestamp, | 169 base::TimeDelta timestamp, |
170 const base::Closure& no_longer_needed_cb); | 170 const base::Closure& no_longer_needed_cb); |
171 | 171 |
172 // Wraps |frame| and calls |wrapper_destroyed_cb| when the wrapper VideoFrame | |
173 // gets destroyed. | |
174 typedef base::Callback<void(const scoped_refptr<VideoFrame>&)> | |
175 WrapperDestroyedCB; | |
176 | |
177 static scoped_refptr<VideoFrame> WrapVideoFrame( | |
178 const scoped_refptr<VideoFrame>& frame, | |
179 const WrapperDestroyedCB& wrapper_destroyed_cb); | |
DaleCurtis
2013/12/09 20:48:25
Rename to no_longer_needed_cb for consistency with
acolwell GONE FROM CHROMIUM
2013/12/09 21:42:11
Done.
| |
180 | |
172 // Creates a frame which indicates end-of-stream. | 181 // Creates a frame which indicates end-of-stream. |
173 static scoped_refptr<VideoFrame> CreateEOSFrame(); | 182 static scoped_refptr<VideoFrame> CreateEOSFrame(); |
174 | 183 |
175 // Allocates YV12 frame based on |size|, and sets its data to the YUV(y,u,v). | 184 // Allocates YV12 frame based on |size|, and sets its data to the YUV(y,u,v). |
176 static scoped_refptr<VideoFrame> CreateColorFrame( | 185 static scoped_refptr<VideoFrame> CreateColorFrame( |
177 const gfx::Size& size, | 186 const gfx::Size& size, |
178 uint8 y, uint8 u, uint8 v, | 187 uint8 y, uint8 u, uint8 v, |
179 base::TimeDelta timestamp); | 188 base::TimeDelta timestamp); |
180 | 189 |
181 // Allocates YV12 frame based on |size|, and sets its data to the YUV | 190 // Allocates YV12 frame based on |size|, and sets its data to the YUV |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
293 base::TimeDelta timestamp_; | 302 base::TimeDelta timestamp_; |
294 | 303 |
295 const bool end_of_stream_; | 304 const bool end_of_stream_; |
296 | 305 |
297 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); | 306 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); |
298 }; | 307 }; |
299 | 308 |
300 } // namespace media | 309 } // namespace media |
301 | 310 |
302 #endif // MEDIA_BASE_VIDEO_FRAME_H_ | 311 #endif // MEDIA_BASE_VIDEO_FRAME_H_ |
OLD | NEW |