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

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

Issue 183113004: Make sure MediaStreamVideoSource support cropping. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Crop with origin 0,0 and temporary disable failing test. Created 6 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 | Annotate | Revision Log
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 "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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 uint8* y_data, 146 uint8* y_data,
147 uint8* u_data, 147 uint8* u_data,
148 uint8* v_data, 148 uint8* v_data,
149 base::TimeDelta timestamp, 149 base::TimeDelta timestamp,
150 const base::Closure& no_longer_needed_cb); 150 const base::Closure& no_longer_needed_cb);
151 151
152 // Wraps |frame| and calls |no_longer_needed_cb| when the wrapper VideoFrame 152 // Wraps |frame| and calls |no_longer_needed_cb| when the wrapper VideoFrame
153 // gets destroyed. 153 // gets destroyed.
154 static scoped_refptr<VideoFrame> WrapVideoFrame( 154 static scoped_refptr<VideoFrame> WrapVideoFrame(
155 const scoped_refptr<VideoFrame>& frame, 155 const scoped_refptr<VideoFrame>& frame,
156 const gfx::Rect& visible_rect,
156 const base::Closure& no_longer_needed_cb); 157 const base::Closure& no_longer_needed_cb);
157 158
158 // Creates a frame which indicates end-of-stream. 159 // Creates a frame which indicates end-of-stream.
159 static scoped_refptr<VideoFrame> CreateEOSFrame(); 160 static scoped_refptr<VideoFrame> CreateEOSFrame();
160 161
161 // Allocates YV12 frame based on |size|, and sets its data to the YUV(y,u,v). 162 // Allocates YV12 frame based on |size|, and sets its data to the YUV(y,u,v).
162 static scoped_refptr<VideoFrame> CreateColorFrame( 163 static scoped_refptr<VideoFrame> CreateColorFrame(
163 const gfx::Size& size, 164 const gfx::Size& size,
164 uint8 y, uint8 u, uint8 v, 165 uint8 y, uint8 u, uint8 v,
165 base::TimeDelta timestamp); 166 base::TimeDelta timestamp);
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 base::TimeDelta timestamp_; 277 base::TimeDelta timestamp_;
277 278
278 const bool end_of_stream_; 279 const bool end_of_stream_;
279 280
280 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); 281 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame);
281 }; 282 };
282 283
283 } // namespace media 284 } // namespace media
284 285
285 #endif // MEDIA_BASE_VIDEO_FRAME_H_ 286 #endif // MEDIA_BASE_VIDEO_FRAME_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698