Commit 056edff6 authored by jbauman's avatar jbauman Committed by Commit bot

[dxvavda] Save information about outstanding buffers in hang minidumps.

Running out of array levels can cause the VP9 MFT to hang waiting for
some picture buffers to be released. This shouldn't be able to happen
(pending_output_samples_ should have at most one element), but save
information so we can be sure.

BUG=636158, 613701
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2590723002
Cr-Commit-Position: refs/heads/master@{#439873}
parent 67a71ece
......@@ -1990,11 +1990,20 @@ void DXVAVideoDecodeAccelerator::StopDecoderThread() {
uint64_t last_process_output_time = g_last_process_output_time;
LARGE_INTEGER perf_frequency;
::QueryPerformanceFrequency(&perf_frequency);
uint32_t output_array_size = output_array_size_;
size_t sample_count;
{
base::AutoLock lock(decoder_lock_);
sample_count = pending_output_samples_.size();
}
base::debug::Alias(&last_exception_code);
base::debug::Alias(&last_unhandled_error);
base::debug::Alias(&last_exception_time);
base::debug::Alias(&last_process_output_time);
base::debug::Alias(&perf_frequency.QuadPart);
base::debug::Alias(&output_array_size);
base::debug::Alias(&sample_count);
decoder_thread_.Stop();
}
......@@ -2831,6 +2840,7 @@ bool DXVAVideoDecodeAccelerator::GetVideoFrameDimensions(IMFSample* sample,
d3d11_texture->GetDesc(&d3d11_texture_desc);
*width = d3d11_texture_desc.Width;
*height = d3d11_texture_desc.Height;
output_array_size_ = d3d11_texture_desc.ArraySize;
} else {
base::win::ScopedComPtr<IDirect3DSurface9> surface;
hr = MFGetService(output_buffer.get(), MR_BUFFER_SERVICE,
......
......@@ -463,6 +463,10 @@ class MEDIA_GPU_EXPORT DXVAVideoDecodeAccelerator
// |pending_input_buffers_| is drained. Protected by |decoder_lock_|.
bool sent_drain_message_;
// This is the array size of the D3D11 texture that's output to by the
// decoder. It's only used for debugging.
uint32_t output_array_size_ = 0;
// List of input samples waiting to be processed.
typedef std::list<base::win::ScopedComPtr<IMFSample>> PendingInputs;
PendingInputs pending_input_buffers_;
......
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