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

Issue 1879353003: Attempt decoder fallback if first decode fails (Closed)

Created:
4 years, 8 months ago by tguilbert
Modified:
4 years, 8 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Attempt decoder fallback if first decode fails This change is a manual merge of DaleCurtis' CL, along with unittests and and coverage for edge cases, such as handling parallel decode requests, config changes and EOS. Updated original description: There are several instances where a GPU video decoder will fail on the first decode even though it reported successfull initialization. In these cases try to fallback to a software decoder if possible. This works by queuing the first buffers sent to Decode() to a pending buffer queue, before any output callbacks have occurred. If decode fails before output is it will attempt to reselect a decoder. If this is successful the pending decode buffers will be copied to a fallback buffer queue, which will be fed in at an appropriate rate to the new decoder. Pending decode callbacks from the previous decoder are invalidated by way of a second weak_ptr factory for the decode callback. BUG=128837 TEST=Ran media_unittests successfully, manual (works as expected for MSE, bug 605790 for SRC=) Committed: https://crrev.com/e384d5d6be1ee2c196df5dc94c50419faf82f2a2 Cr-Commit-Position: refs/heads/master@{#388990}

Patch Set 1 #

Total comments: 12

Patch Set 2 : Addressing comments, improving logic #

Patch Set 3 : Comments #

Total comments: 11

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Total comments: 16

Patch Set 7 : #

Patch Set 8 : Addressing offline comments #

Patch Set 9 : #

Total comments: 2

Patch Set 10 : Addressing comment #

Patch Set 11 : new test for EOS flushing edge case #

Unified diffs Side-by-side diffs Delta from patch set Stats (+407 lines, -29 lines) Patch
M media/filters/decoder_stream.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +30 lines, -2 lines 0 comments Download
M media/filters/decoder_stream.cc View 1 2 3 4 5 6 7 8 9 10 14 chunks +133 lines, -14 lines 0 comments Download
M media/filters/video_frame_stream_unittest.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +244 lines, -13 lines 0 comments Download

Messages

Total messages: 28 (9 generated)
tguilbert
What is the proper way to link to Dale's original CL? https://codereview.chromium.org/1720343002 Is there a ...
4 years, 8 months ago (2016-04-13 21:35:26 UTC) #2
sandersd (OOO until July 31)
https://codereview.chromium.org/1879353003/diff/1/media/filters/decoder_stream.cc File media/filters/decoder_stream.cc (right): https://codereview.chromium.org/1879353003/diff/1/media/filters/decoder_stream.cc#newcode325 media/filters/decoder_stream.cc:325: pending_buffers_.push_back(buffer); Why don't we queue EOS buffers? https://codereview.chromium.org/1879353003/diff/1/media/filters/decoder_stream.cc#newcode330 media/filters/decoder_stream.cc:330: ...
4 years, 8 months ago (2016-04-14 00:38:05 UTC) #3
DaleCurtis
Nice tests! https://codereview.chromium.org/1879353003/diff/1/media/filters/decoder_stream.cc File media/filters/decoder_stream.cc (right): https://codereview.chromium.org/1879353003/diff/1/media/filters/decoder_stream.cc#newcode441 media/filters/decoder_stream.cc:441: if (!pending_buffers_.empty() && Multiline if needs {} ...
4 years, 8 months ago (2016-04-14 00:42:53 UTC) #4
tguilbert
https://codereview.chromium.org/1879353003/diff/1/media/filters/decoder_stream.cc File media/filters/decoder_stream.cc (right): https://codereview.chromium.org/1879353003/diff/1/media/filters/decoder_stream.cc#newcode325 media/filters/decoder_stream.cc:325: pending_buffers_.push_back(buffer); On 2016/04/14 00:38:04, sandersd wrote: > Why don't ...
4 years, 8 months ago (2016-04-14 22:08:35 UTC) #6
tguilbert
https://codereview.chromium.org/1879353003/diff/40001/media/filters/decoder_stream.cc File media/filters/decoder_stream.cc (right): https://codereview.chromium.org/1879353003/diff/40001/media/filters/decoder_stream.cc#newcode263 media/filters/decoder_stream.cc:263: CompleteDecoderReinitialization(false); Sorry, I didn't take into account what should ...
4 years, 8 months ago (2016-04-14 22:26:42 UTC) #7
sandersd (OOO until July 31)
https://codereview.chromium.org/1879353003/diff/40001/media/filters/decoder_stream.cc File media/filters/decoder_stream.cc (right): https://codereview.chromium.org/1879353003/diff/40001/media/filters/decoder_stream.cc#newcode84 media/filters/decoder_stream.cc:84: pending_buffers_.clear(); You don't actually need to do this, the ...
4 years, 8 months ago (2016-04-14 23:10:30 UTC) #8
tguilbert
https://codereview.chromium.org/1879353003/diff/40001/media/filters/decoder_stream.cc File media/filters/decoder_stream.cc (right): https://codereview.chromium.org/1879353003/diff/40001/media/filters/decoder_stream.cc#newcode84 media/filters/decoder_stream.cc:84: pending_buffers_.clear(); On 2016/04/14 23:10:30, sandersd wrote: > You don't ...
4 years, 8 months ago (2016-04-15 00:29:18 UTC) #9
DaleCurtis
lgtm % nits. Nice tests! If you keep writing tests like that we're going to ...
4 years, 8 months ago (2016-04-15 01:19:17 UTC) #10
tguilbert
https://codereview.chromium.org/1879353003/diff/100001/media/filters/decoder_stream.cc File media/filters/decoder_stream.cc (right): https://codereview.chromium.org/1879353003/diff/100001/media/filters/decoder_stream.cc#newcode277 media/filters/decoder_stream.cc:277: fallback_buffers_.insert(fallback_buffers_.begin(), On 2016/04/15 01:19:16, DaleCurtis_OOO_Until_Apr_20 wrote: > Is it ...
4 years, 8 months ago (2016-04-15 20:45:52 UTC) #12
tguilbert
Ping :)
4 years, 8 months ago (2016-04-19 18:22:12 UTC) #13
tguilbert
4 years, 8 months ago (2016-04-19 20:48:18 UTC) #14
sandersd (OOO until July 31)
https://codereview.chromium.org/1879353003/diff/160001/media/filters/decoder_stream.cc File media/filters/decoder_stream.cc (right): https://codereview.chromium.org/1879353003/diff/160001/media/filters/decoder_stream.cc#newcode571 media/filters/decoder_stream.cc:571: pending_buffers_.clear(); If the current decoder fails after this, we ...
4 years, 8 months ago (2016-04-19 21:12:20 UTC) #15
tguilbert
https://codereview.chromium.org/1879353003/diff/160001/media/filters/decoder_stream.cc File media/filters/decoder_stream.cc (right): https://codereview.chromium.org/1879353003/diff/160001/media/filters/decoder_stream.cc#newcode571 media/filters/decoder_stream.cc:571: pending_buffers_.clear(); On 2016/04/19 21:12:19, sandersd wrote: > If the ...
4 years, 8 months ago (2016-04-20 01:13:18 UTC) #16
sandersd (OOO until July 31)
On 2016/04/20 01:13:18, ThomasGuilbert wrote: > https://codereview.chromium.org/1879353003/diff/160001/media/filters/decoder_stream.cc > File media/filters/decoder_stream.cc (right): > > https://codereview.chromium.org/1879353003/diff/160001/media/filters/decoder_stream.cc#newcode571 > ...
4 years, 8 months ago (2016-04-20 01:41:38 UTC) #17
sandersd (OOO until July 31)
lgtm % output_cb should probably also be invalidated.
4 years, 8 months ago (2016-04-20 19:47:38 UTC) #18
DaleCurtis
still lgtm
4 years, 8 months ago (2016-04-21 01:45:11 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1879353003/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1879353003/200001
4 years, 8 months ago (2016-04-21 23:49:41 UTC) #24
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years, 8 months ago (2016-04-22 01:09:41 UTC) #26
commit-bot: I haz the power
4 years, 8 months ago (2016-04-22 19:43:04 UTC) #28
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/e384d5d6be1ee2c196df5dc94c50419faf82f2a2
Cr-Commit-Position: refs/heads/master@{#388990}

Powered by Google App Engine
This is Rietveld 408576698