Commit 15b5cf03 authored by Rintaro Kuroiwa's avatar Rintaro Kuroiwa Committed by Commit Bot

Add debug logging to help understand decoder initialization failures

- Log the video decoder names before initialization.
- Logging for D3D11 decoder initialization failures.

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I9cbae9e430fe6afa1ed6d1135e4efb1bd0986ea2
Reviewed-on: https://chromium-review.googlesource.com/1052813
Commit-Queue: Rintaro Kuroiwa <rkuroiwa@chromium.org>
Reviewed-by: default avatarXiaohan Wang <xhwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557321}
parent 11ee8e61
......@@ -31,7 +31,7 @@ bool DecoderStreamTraits<DemuxerStream::AUDIO>::NeedsBitstreamConversion(
// static
scoped_refptr<DecoderStreamTraits<DemuxerStream::AUDIO>::OutputType>
DecoderStreamTraits<DemuxerStream::AUDIO>::CreateEOSOutput() {
DecoderStreamTraits<DemuxerStream::AUDIO>::CreateEOSOutput() {
return OutputType::CreateEOSBuffer();
}
......@@ -156,6 +156,7 @@ void DecoderStreamTraits<DemuxerStream::VIDEO>::InitializeDecoder(
waiting_for_decryption_key_cb) {
DCHECK(config.IsValidConfig());
stats_.video_decoder_name = decoder->GetDisplayName();
DVLOG(2) << stats_.video_decoder_name;
decoder->Initialize(config, low_delay, cdm_context, init_cb, output_cb,
waiting_for_decryption_key_cb);
}
......
......@@ -93,6 +93,7 @@ void D3D11VideoDecoder::Initialize(
const OutputCB& output_cb,
const WaitingForDecryptionKeyCB& waiting_for_decryption_key_cb) {
if (!IsPotentiallySupported(config)) {
DVLOG(3) << "D3D11 video decoder not supported for the config.";
init_cb.Run(false);
return;
}
......@@ -152,27 +153,37 @@ bool D3D11VideoDecoder::IsPotentiallySupported(
const bool is_h264 = config.profile() >= H264PROFILE_MIN &&
config.profile() <= H264PROFILE_MAX;
if (!is_h264)
if (!is_h264) {
DVLOG(2) << "Profile is not H264.";
return false;
}
// Must use NV12, which excludes HDR.
if (config.profile() == H264PROFILE_HIGH10PROFILE)
if (config.profile() == H264PROFILE_HIGH10PROFILE) {
DVLOG(2) << "High 10 profile is not supported.";
return false;
}
// TODO(liberato): dxva checks IsHDR() in the target colorspace, but we don't
// have the target colorspace. It's commented as being for vpx, though, so
// we skip it here for now.
// Must use the validating decoder.
if (gpu_preferences_.use_passthrough_cmd_decoder)
if (gpu_preferences_.use_passthrough_cmd_decoder) {
DVLOG(2) << "Must use validating decoder.";
return false;
}
// Must allow zero-copy of nv12 textures.
if (!gpu_preferences_.enable_zero_copy_dxgi_video)
if (!gpu_preferences_.enable_zero_copy_dxgi_video) {
DVLOG(2) << "Must allow zero-copy NV12.";
return false;
}
if (gpu_workarounds_.disable_dxgi_zero_copy_video)
if (gpu_workarounds_.disable_dxgi_zero_copy_video) {
DVLOG(2) << "Must allow zero-copy video.";
return false;
}
return true;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment