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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 // http://crbug.com/401308 | 238 // http://crbug.com/401308 |
239 static scoped_refptr<VideoFrame> WrapCVPixelBuffer( | 239 static scoped_refptr<VideoFrame> WrapCVPixelBuffer( |
240 CVPixelBufferRef cv_pixel_buffer, | 240 CVPixelBufferRef cv_pixel_buffer, |
241 base::TimeDelta timestamp); | 241 base::TimeDelta timestamp); |
242 #endif | 242 #endif |
243 | 243 |
244 // Wraps |frame|. |visible_rect| must be a sub rect within | 244 // Wraps |frame|. |visible_rect| must be a sub rect within |
245 // frame->visible_rect(). | 245 // frame->visible_rect(). |
246 static scoped_refptr<VideoFrame> WrapVideoFrame( | 246 static scoped_refptr<VideoFrame> WrapVideoFrame( |
247 const scoped_refptr<VideoFrame>& frame, | 247 const scoped_refptr<VideoFrame>& frame, |
| 248 VideoPixelFormat format, |
248 const gfx::Rect& visible_rect, | 249 const gfx::Rect& visible_rect, |
249 const gfx::Size& natural_size); | 250 const gfx::Size& natural_size); |
250 | 251 |
251 // Creates a frame which indicates end-of-stream. | 252 // Creates a frame which indicates end-of-stream. |
252 static scoped_refptr<VideoFrame> CreateEOSFrame(); | 253 static scoped_refptr<VideoFrame> CreateEOSFrame(); |
253 | 254 |
254 // Allocates YV12 frame based on |size|, and sets its data to the YUV(y,u,v). | 255 // Allocates YV12 frame based on |size|, and sets its data to the YUV(y,u,v). |
255 static scoped_refptr<VideoFrame> CreateColorFrame(const gfx::Size& size, | 256 static scoped_refptr<VideoFrame> CreateColorFrame(const gfx::Size& size, |
256 uint8_t y, | 257 uint8_t y, |
257 uint8_t u, | 258 uint8_t u, |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
560 gpu::SyncToken release_sync_token_; | 561 gpu::SyncToken release_sync_token_; |
561 | 562 |
562 VideoFrameMetadata metadata_; | 563 VideoFrameMetadata metadata_; |
563 | 564 |
564 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); | 565 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); |
565 }; | 566 }; |
566 | 567 |
567 } // namespace media | 568 } // namespace media |
568 | 569 |
569 #endif // MEDIA_BASE_VIDEO_FRAME_H_ | 570 #endif // MEDIA_BASE_VIDEO_FRAME_H_ |
OLD | NEW |