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

Unified Diff: content/renderer/media/capture_video_decoder.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
Index: content/renderer/media/capture_video_decoder.cc
diff --git a/content/renderer/media/capture_video_decoder.cc b/content/renderer/media/capture_video_decoder.cc
index b55a6c7fdadc147c983a6a5b02755cb013981204..6980c3da1dfd7b8219edecaa95d4edb8ce45f93d 100644
--- a/content/renderer/media/capture_video_decoder.cc
+++ b/content/renderer/media/capture_video_decoder.cc
@@ -61,10 +61,6 @@ void CaptureVideoDecoder::Stop(const base::Closure& closure) {
base::Bind(&CaptureVideoDecoder::StopOnDecoderThread, this, closure));
}
-const gfx::Size& CaptureVideoDecoder::natural_size() {
- return natural_size_;
-}
-
void CaptureVideoDecoder::PrepareForShutdownHack() {
message_loop_proxy_->PostTask(
FROM_HERE,
@@ -139,6 +135,7 @@ void CaptureVideoDecoder::InitializeOnDecoderThread(
}
void CaptureVideoDecoder::ReadOnDecoderThread(const ReadCB& read_cb) {
+ DCHECK_NE(state_, kUnInitialized);
DCHECK(message_loop_proxy_->BelongsToCurrentThread());
CHECK(read_cb_.is_null());
read_cb_ = read_cb;
@@ -152,8 +149,7 @@ void CaptureVideoDecoder::ResetOnDecoderThread(const base::Closure& closure) {
DCHECK(message_loop_proxy_->BelongsToCurrentThread());
if (!read_cb_.is_null()) {
scoped_refptr<media::VideoFrame> video_frame =
- media::VideoFrame::CreateBlackFrame(natural_size_.width(),
- natural_size_.height());
+ media::VideoFrame::CreateBlackFrame(natural_size_);
DeliverFrame(video_frame);
}
closure.Run();
@@ -240,8 +236,7 @@ void CaptureVideoDecoder::OnBufferReadyOnDecoderThread(
// TODO(scherkus): migrate this to proper buffer recycling.
scoped_refptr<media::VideoFrame> video_frame =
media::VideoFrame::CreateFrame(media::VideoFrame::YV12,
- natural_size_.width(),
- natural_size_.height(),
+ natural_size_, natural_size_,
buf->timestamp - start_time_);
last_frame_timestamp_ = buf->timestamp;
« no previous file with comments | « content/renderer/media/capture_video_decoder.h ('k') | content/renderer/media/capture_video_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698