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

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: cl feedback. 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..0793a3a9b3ee46d15d9fd44f215d100ce2f42998 100644
--- a/content/common/gpu/media/android_video_decode_accelerator.cc
+++ b/content/common/gpu/media/android_video_decode_accelerator.cc
@@ -331,6 +331,8 @@ bool AndroidVideoDecodeAccelerator::Initialize(const Config& config,
client_ = client;
codec_config_ = new CodecConfig();
codec_config_->codec_ = VideoCodecProfileToVideoCodec(config.profile);
+ codec_config_->initial_expected_coded_size_ =
+ config.initial_expected_coded_size;
is_encrypted_ = config.is_encrypted;
bool profile_supported = codec_config_->codec_ == media::kCodecVP8 ||
@@ -951,13 +953,11 @@ 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));
+ codec_config->initial_expected_coded_size_,
+ codec_config->surface_.j_surface().obj(), media_crypto, true));
}
void AndroidVideoDecodeAccelerator::OnCodecConfigured(

Powered by Google App Engine
This is Rietveld 408576698