summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorposciak@chromium.org <posciak@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-17 21:32:26 +0000
committerposciak@chromium.org <posciak@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-17 21:32:26 +0000
commit58cf1dc9db89d98c6dd316dc34943943293c1450 (patch)
treee000b1eac46cf46d6ca8747c14e0a9d0e48176db /content
parent01e651de2923357b0aa040a66efc9036bd524f1b (diff)
downloadchromium_src-58cf1dc9db89d98c6dd316dc34943943293c1450.zip
chromium_src-58cf1dc9db89d98c6dd316dc34943943293c1450.tar.gz
chromium_src-58cf1dc9db89d98c6dd316dc34943943293c1450.tar.bz2
EVDA: Preserve resolution change event across reset.
The codec maintains current resolution as a part of its state and carries it over across the streamoff/streamon (i.e. Reset) sequence. The resolution change event should thus not be discarded if it arrives before Reset and is not addressed there, as it will be valid after Reset as well and should be addressed then. EVDA::DecodeBufferInitial() does not handle potential resolution changes (i.e. it discards GetFormat() results) after Reset(), which is fine, because we rely on the event to be informed about the resolution change instead. Also the DCHECK, which verifies that we don't dequeue events in other states than kDecoding, is not correct, because we might have to dequeue one in kAfterReset. BUG=316074 TEST=vdatest, video playback, MSE, seek torture tests Review URL: https://codereview.chromium.org/70183003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235559 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/common/gpu/media/exynos_video_decode_accelerator.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/content/common/gpu/media/exynos_video_decode_accelerator.cc b/content/common/gpu/media/exynos_video_decode_accelerator.cc
index 9f0f57a..26fe624 100644
--- a/content/common/gpu/media/exynos_video_decode_accelerator.cc
+++ b/content/common/gpu/media/exynos_video_decode_accelerator.cc
@@ -1075,7 +1075,7 @@ void ExynosVideoDecodeAccelerator::EnqueueMfc() {
void ExynosVideoDecodeAccelerator::DequeueMfcEvents() {
DCHECK_EQ(decoder_thread_.message_loop(), base::MessageLoop::current());
- DCHECK_EQ(decoder_state_, kDecoding);
+ DCHECK_NE(decoder_state_, kUninitialized);
DVLOG(3) << "DequeueMfcEvents()";
struct v4l2_event ev;
@@ -1389,9 +1389,6 @@ void ExynosVideoDecodeAccelerator::ResetTask() {
if (!StopDevicePoll(false))
return;
- DequeueMfcEvents();
-
- resolution_change_pending_ = false;
decoder_current_bitstream_buffer_.reset();
while (!decoder_input_queue_.empty())
decoder_input_queue_.pop();
@@ -1420,6 +1417,12 @@ void ExynosVideoDecodeAccelerator::ResetDoneTask() {
return;
}
+ // We might have received a resolution change event while we were waiting
+ // for the reset to finish. The codec will not post another event if the
+ // resolution after reset remains the same as the one to which were just
+ // about to switch, so preserve the event across reset so we can address
+ // it after resuming.
+
// Reset format-specific bits.
if (video_profile_ >= media::H264PROFILE_MIN &&
video_profile_ <= media::H264PROFILE_MAX) {