Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(612)

Side by Side Diff: media/base/video_frame.h

Issue 1737253002: Handle Alpha channel in Canvas capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 // http://crbug.com/401308 237 // http://crbug.com/401308
238 static scoped_refptr<VideoFrame> WrapCVPixelBuffer( 238 static scoped_refptr<VideoFrame> WrapCVPixelBuffer(
239 CVPixelBufferRef cv_pixel_buffer, 239 CVPixelBufferRef cv_pixel_buffer,
240 base::TimeDelta timestamp); 240 base::TimeDelta timestamp);
241 #endif 241 #endif
242 242
243 // Wraps |frame|. |visible_rect| must be a sub rect within 243 // Wraps |frame|. |visible_rect| must be a sub rect within
244 // frame->visible_rect(). 244 // frame->visible_rect().
245 static scoped_refptr<VideoFrame> WrapVideoFrame( 245 static scoped_refptr<VideoFrame> WrapVideoFrame(
246 const scoped_refptr<VideoFrame>& frame, 246 const scoped_refptr<VideoFrame>& frame,
247 VideoPixelFormat format,
247 const gfx::Rect& visible_rect, 248 const gfx::Rect& visible_rect,
248 const gfx::Size& natural_size); 249 const gfx::Size& natural_size);
249 250
250 // Creates a frame which indicates end-of-stream. 251 // Creates a frame which indicates end-of-stream.
251 static scoped_refptr<VideoFrame> CreateEOSFrame(); 252 static scoped_refptr<VideoFrame> CreateEOSFrame();
252 253
253 // Allocates YV12 frame based on |size|, and sets its data to the YUV(y,u,v). 254 // Allocates YV12 frame based on |size|, and sets its data to the YUV(y,u,v).
254 static scoped_refptr<VideoFrame> CreateColorFrame(const gfx::Size& size, 255 static scoped_refptr<VideoFrame> CreateColorFrame(const gfx::Size& size,
255 uint8_t y, 256 uint8_t y,
256 uint8_t u, 257 uint8_t u,
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 gpu::SyncToken release_sync_token_; 526 gpu::SyncToken release_sync_token_;
526 527
527 VideoFrameMetadata metadata_; 528 VideoFrameMetadata metadata_;
528 529
529 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); 530 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame);
530 }; 531 };
531 532
532 } // namespace media 533 } // namespace media
533 534
534 #endif // MEDIA_BASE_VIDEO_FRAME_H_ 535 #endif // MEDIA_BASE_VIDEO_FRAME_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698