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

Issue 2448763002: FFmpegDemuxer: Clear |extra_data| when enabling bitstream conversion. (Closed)

Created:
4 years, 1 month ago by sandersd (OOO until July 31)
Modified:
4 years, 1 month ago
Reviewers:
DaleCurtis
CC:
chromium-reviews, feature-media-reviews_chromium.org, posciak+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

FFmpegDemuxer: Clear |extra_data| when enabling bitstream conversion. After this change, fallback from GpuVideoDecoder to FFmpegVideoDecoder should work. The exact mechanism is perhaps surprising: - After successfully initializing GpuVideoDecoder, bitstream conversion is enabled. We can't easily turn it off again when we fall back. - FFmpegVideoDecoder can decode a converted bitstream, but only if it knows the conversion has occurred. It checks for the presence of an AVCC record in |extra_data| to deduce the bitstream format. - Clearing |extra_data| is reasonable, because the AVCC record serves no purpose for an Annex B stream. (Note: the MSE path doesn't provide |exta_data| at all.) - Converting |extra_data| into a different format (eg. SPS + PPS concatenated in Annex B format) would be logical, but currently would serve no purpose (in particular because the conversion would happen after Initialize()). - The result then is that |extra_data| is cleared after initializing GpuVideoDecoder. Upon fallback, FFmpegVideoDecoder will interpret the alread-converted bitstream correctly. GpuVideoDecoder still receives |extra_data|, and on Android actually makes uses of it. - Note that if GpuVideoDecoder is not initialized successfully, then bitstream conversion is never enabled and FFmpegVideoDecoder works exactly as it did before (with |extra_data| passed in the codec context). BUG=605790 Committed: https://crrev.com/e4041392035ece38d99818ea1bbe8f912a27a19e Cr-Commit-Position: refs/heads/master@{#427781}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Add test. #

Patch Set 3 : Default parameters. #

Patch Set 4 : Remove useless default. #

Patch Set 5 : Rebase. #

Patch Set 6 : Restore variant used by fuzzertest. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+108 lines, -22 lines) Patch
M media/base/video_decoder_config.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M media/base/video_decoder_config.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download
M media/filters/ffmpeg_demuxer.cc View 1 1 chunk +9 lines, -0 lines 0 comments Download
M media/test/pipeline_integration_test.cc View 1 2 3 4 3 chunks +36 lines, -1 line 0 comments Download
M media/test/pipeline_integration_test_base.h View 1 2 4 5 5 chunks +31 lines, -9 lines 0 comments Download
M media/test/pipeline_integration_test_base.cc View 1 2 3 4 5 6 chunks +27 lines, -12 lines 0 comments Download

Messages

Total messages: 22 (10 generated)
sandersd (OOO until July 31)
4 years, 1 month ago (2016-10-25 00:09:44 UTC) #2
DaleCurtis
This is hairy enough to need a test. Is it possible to add one? https://codereview.chromium.org/2448763002/diff/1/media/base/video_decoder_config.cc ...
4 years, 1 month ago (2016-10-25 00:18:47 UTC) #3
sandersd (OOO until July 31)
4 years, 1 month ago (2016-10-25 20:58:22 UTC) #4
sandersd (OOO until July 31)
https://codereview.chromium.org/2448763002/diff/1/media/base/video_decoder_config.cc File media/base/video_decoder_config.cc (right): https://codereview.chromium.org/2448763002/diff/1/media/base/video_decoder_config.cc#newcode71 media/base/video_decoder_config.cc:71: void VideoDecoderConfig::set_extra_data( On 2016/10/25 00:18:46, DaleCurtis wrote: > Must ...
4 years, 1 month ago (2016-10-25 20:58:42 UTC) #5
DaleCurtis
lgtm as is, but you can probably reduce the places at which you added the ...
4 years, 1 month ago (2016-10-25 21:28:00 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2448763002/60001
4 years, 1 month ago (2016-10-25 22:23:16 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/builds/94269)
4 years, 1 month ago (2016-10-25 22:26:39 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2448763002/80001
4 years, 1 month ago (2016-10-26 00:40:50 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_compile_dbg_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_compile_dbg_ng/builds/180589)
4 years, 1 month ago (2016-10-26 01:09:31 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2448763002/100001
4 years, 1 month ago (2016-10-26 18:05:53 UTC) #19
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 1 month ago (2016-10-26 19:49:48 UTC) #20
commit-bot: I haz the power
4 years, 1 month ago (2016-10-26 20:00:23 UTC) #22
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/e4041392035ece38d99818ea1bbe8f912a27a19e
Cr-Commit-Position: refs/heads/master@{#427781}

Powered by Google App Engine
This is Rietveld 408576698