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

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: bbudge@ nit. 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
« no previous file with comments | « media/base/mac/video_frame_mac_unittests.cc ('k') | media/base/video_frame.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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_
OLDNEW
« no previous file with comments | « media/base/mac/video_frame_mac_unittests.cc ('k') | media/base/video_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698