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

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

Issue 189513004: Make sure natural_size is set when a frame is cropped. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed DCHECK of natural size since the decoder pipeline do not abey. 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
« no previous file with comments | « content/renderer/media/media_stream_video_source.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 "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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
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. |visible_rect| must be a sub rect within 153 // gets destroyed. |visible_rect| must be a sub rect within
154 // frame->visible_rect(). 154 // frame->visible_rect().
155 static scoped_refptr<VideoFrame> WrapVideoFrame( 155 static scoped_refptr<VideoFrame> WrapVideoFrame(
156 const scoped_refptr<VideoFrame>& frame, 156 const scoped_refptr<VideoFrame>& frame,
157 const gfx::Rect& visible_rect, 157 const gfx::Rect& visible_rect,
158 const gfx::Size& natural_size,
158 const base::Closure& no_longer_needed_cb); 159 const base::Closure& no_longer_needed_cb);
159 160
160 // Creates a frame which indicates end-of-stream. 161 // Creates a frame which indicates end-of-stream.
161 static scoped_refptr<VideoFrame> CreateEOSFrame(); 162 static scoped_refptr<VideoFrame> CreateEOSFrame();
162 163
163 // Allocates YV12 frame based on |size|, and sets its data to the YUV(y,u,v). 164 // Allocates YV12 frame based on |size|, and sets its data to the YUV(y,u,v).
164 static scoped_refptr<VideoFrame> CreateColorFrame( 165 static scoped_refptr<VideoFrame> CreateColorFrame(
165 const gfx::Size& size, 166 const gfx::Size& size,
166 uint8 y, uint8 u, uint8 v, 167 uint8 y, uint8 u, uint8 v,
167 base::TimeDelta timestamp); 168 base::TimeDelta timestamp);
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 base::TimeDelta timestamp_; 279 base::TimeDelta timestamp_;
279 280
280 const bool end_of_stream_; 281 const bool end_of_stream_;
281 282
282 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); 283 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame);
283 }; 284 };
284 285
285 } // namespace media 286 } // namespace media
286 287
287 #endif // MEDIA_BASE_VIDEO_FRAME_H_ 288 #endif // MEDIA_BASE_VIDEO_FRAME_H_
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_video_source.cc ('k') | media/base/video_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698