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

Unified Diff: content/common/gpu/media/android_video_decode_accelerator.cc

Issue 1869103002: Enable adaptive playback for spitzer, use conservative size. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed a stale comment. Created 4 years, 8 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/common/gpu/media/android_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/android_video_decode_accelerator.cc b/content/common/gpu/media/android_video_decode_accelerator.cc
index efa1b84da774626125cfe86e0846b0d0ed976857..479d4d0b75e0ae6c8e525165255a820785b4ba51 100644
--- a/content/common/gpu/media/android_video_decode_accelerator.cc
+++ b/content/common/gpu/media/android_video_decode_accelerator.cc
@@ -331,6 +331,7 @@ bool AndroidVideoDecodeAccelerator::Initialize(const Config& config,
client_ = client;
codec_config_ = new CodecConfig();
codec_config_->codec_ = VideoCodecProfileToVideoCodec(config.profile);
+ codec_config_->coded_size_ = config.coded_size;
is_encrypted_ = config.is_encrypted;
bool profile_supported = codec_config_->codec_ == media::kCodecVP8 ||
@@ -951,13 +952,12 @@ AndroidVideoDecodeAccelerator::ConfigureMediaCodecOnAnyThread(
// |needs_protected_surface_| implies encrypted stream.
DCHECK(!codec_config->needs_protected_surface_ || media_crypto);
- // Pass a dummy 320x240 canvas size and let the codec signal the real size
- // when it's known from the bitstream.
return scoped_ptr<media::VideoCodecBridge>(
media::VideoCodecBridge::CreateDecoder(
codec_config->codec_, codec_config->needs_protected_surface_,
- gfx::Size(320, 240), codec_config->surface_.j_surface().obj(),
- media_crypto, false));
+ gfx::Size(codec_config->coded_size_.width(),
Tima Vaisburd 2016/04/07 18:50:01 nit: will passing |codec_config_->coded_size_| wor
liberato (no reviews please) 2016/04/07 20:46:28 indeed, thanks!
+ codec_config->coded_size_.height()),
+ codec_config->surface_.j_surface().obj(), media_crypto, true));
}
void AndroidVideoDecodeAccelerator::OnCodecConfigured(

Powered by Google App Engine
This is Rietveld 408576698