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

Unified Diff: media/gpu/android_video_decode_accelerator.cc

Issue 2365103002: Send the h264 SPS and PPS configuration parameters to AVDA (Closed)
Patch Set: Shot in the dark Created 4 years, 2 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/gpu/android_video_decode_accelerator.h ('k') | media/gpu/ipc/common/media_param_traits_macros.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/android_video_decode_accelerator.cc
diff --git a/media/gpu/android_video_decode_accelerator.cc b/media/gpu/android_video_decode_accelerator.cc
index 55eb7384b1f4486e15c99fd70a30b5ef22048ef8..f7851da8ec568a94f7efa2675b5207c98946f983 100644
--- a/media/gpu/android_video_decode_accelerator.cc
+++ b/media/gpu/android_video_decode_accelerator.cc
@@ -380,10 +380,15 @@ bool AndroidVideoDecodeAccelerator::Initialize(const Config& config,
codec_config_->codec_ != kCodecHEVC &&
#endif
codec_config_->codec_ != kCodecH264) {
- LOG(ERROR) << "Unsupported profile: " << config.profile;
+ DLOG(ERROR) << "Unsupported profile: " << config.profile;
return false;
}
+ if (codec_config_->codec_ == kCodecH264) {
+ codec_config_->csd0_ = config.sps;
+ codec_config_->csd1_ = config.pps;
+ }
+
// Only use MediaCodec for VP8/9 if it's likely backed by hardware
// or if the stream is encrypted.
if (IsMediaCodecSoftwareDecodingForbidden() &&
@@ -397,7 +402,7 @@ bool AndroidVideoDecodeAccelerator::Initialize(const Config& config,
auto gles_decoder = get_gles2_decoder_cb_.Run();
if (!gles_decoder) {
- LOG(ERROR) << "Failed to get gles2 decoder instance.";
+ DLOG(ERROR) << "Failed to get gles2 decoder instance.";
return false;
}
@@ -1043,8 +1048,8 @@ AndroidVideoDecodeAccelerator::ConfigureMediaCodecOnAnyThread(
std::unique_ptr<VideoCodecBridge> codec(VideoCodecBridge::CreateDecoder(
codec_config->codec_, codec_config->needs_protected_surface_,
codec_config->initial_expected_coded_size_,
- codec_config->surface_.j_surface().obj(), media_crypto, true,
- require_software_codec));
+ codec_config->surface_.j_surface().obj(), media_crypto,
+ codec_config->csd0_, codec_config->csd1_, true, require_software_codec));
return codec;
}
« no previous file with comments | « media/gpu/android_video_decode_accelerator.h ('k') | media/gpu/ipc/common/media_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698