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

Unified Diff: media/filters/video_frame_generator.cc

Issue 10824141: Remove VideoDecoder::natural_size() & added VideoFrame::natural_size(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix copyright year. Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/filters/video_frame_generator.h ('k') | media/filters/video_renderer_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/video_frame_generator.cc
diff --git a/media/filters/video_frame_generator.cc b/media/filters/video_frame_generator.cc
index b8819d459d5c0c79c81162235a9fdef6389ae678..8c90f2e79a3e02a812340442eb374123575d9969 100644
--- a/media/filters/video_frame_generator.cc
+++ b/media/filters/video_frame_generator.cc
@@ -16,7 +16,7 @@ VideoFrameGenerator::VideoFrameGenerator(
const gfx::Size& size,
const base::TimeDelta& frame_duration)
: message_loop_proxy_(message_loop_proxy),
- natural_size_(size),
+ size_(size),
stopped_(true),
frame_duration_(frame_duration) {
}
@@ -49,10 +49,6 @@ void VideoFrameGenerator::Stop(const base::Closure& closure) {
base::Bind(&VideoFrameGenerator::StopOnDecoderThread, this, closure));
}
-const gfx::Size& VideoFrameGenerator::natural_size() {
- return natural_size_;
-}
-
VideoFrameGenerator::~VideoFrameGenerator() {}
void VideoFrameGenerator::InitializeOnDecoderThread(
@@ -76,10 +72,7 @@ void VideoFrameGenerator::ReadOnDecoderThread(const ReadCB& read_cb) {
//
// TODO(scherkus): migrate this to proper buffer recycling.
scoped_refptr<VideoFrame> video_frame =
- VideoFrame::CreateFrame(VideoFrame::YV12,
- natural_size_.width(),
- natural_size_.height(),
- current_time_);
+ VideoFrame::CreateFrame(VideoFrame::YV12, size_, size_, current_time_);
current_time_ += frame_duration_;
// TODO(wjia): set pixel data to pre-defined patterns if it's desired to
« no previous file with comments | « media/filters/video_frame_generator.h ('k') | media/filters/video_renderer_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698