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

Issue 2267963002: Add support for cancellation of demuxer reads. (Closed)

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

Description

Add support for cancellation of demuxer reads. This speeds up seek and suspend significantly in the case of a hung read; on slow networks this may shave hundreds of milliseconds or more off the seek and suspend times. Notably this also resolves a CHECK() crash for overlapping reads by aborting any existing reads when a new read comes in. Note: Also removes some log spam from canceled reads / tests. BUG=165762, 638018 TEST=manual, new unittests Committed: https://crrev.com/f299e19db62058180acf4276540670a90ff7b472 Cr-Commit-Position: refs/heads/master@{#415401}

Patch Set 1 #

Patch Set 2 : Fix tests. #

Patch Set 3 : Actually abort the data. #

Total comments: 7

Patch Set 4 : Switch to using aborted status. #

Total comments: 3

Patch Set 5 : Fix and add tests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+216 lines, -104 lines) Patch
M chrome/utility/media_galleries/ipc_data_source.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/utility/media_galleries/ipc_data_source.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M media/base/data_source.h View 1 2 3 2 chunks +4 lines, -1 line 0 comments Download
M media/base/demuxer.h View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M media/base/media_log.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M media/base/media_url_demuxer.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M media/base/media_url_demuxer.cc View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M media/base/mock_filters.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M media/base/pipeline_impl.cc View 1 2 4 chunks +8 lines, -10 lines 0 comments Download
M media/base/pipeline_impl_unittest.cc View 1 2 3 4 6 chunks +6 lines, -10 lines 0 comments Download
M media/blink/multibuffer_data_source.h View 1 2 3 4 2 chunks +1 line, -7 lines 0 comments Download
M media/blink/multibuffer_data_source.cc View 1 2 3 4 3 chunks +12 lines, -12 lines 0 comments Download
M media/blink/multibuffer_data_source_unittest.cc View 1 2 3 4 2 chunks +4 lines, -4 lines 0 comments Download
M media/filters/blocking_url_protocol.cc View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M media/filters/chunk_demuxer.h View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M media/filters/chunk_demuxer.cc View 1 2 4 chunks +15 lines, -3 lines 0 comments Download
M media/filters/ffmpeg_demuxer.h View 1 2 3 4 4 chunks +6 lines, -2 lines 0 comments Download
M media/filters/ffmpeg_demuxer.cc View 1 2 3 4 10 chunks +61 lines, -25 lines 0 comments Download
M media/filters/ffmpeg_demuxer_unittest.cc View 1 2 3 4 5 chunks +73 lines, -25 lines 0 comments Download
M media/filters/file_data_source.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M media/filters/file_data_source.cc View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M media/filters/memory_data_source.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M media/filters/memory_data_source.cc View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 39 (20 generated)
DaleCurtis
Passes tests. Working on adding new ones.
4 years, 4 months ago (2016-08-23 20:57:20 UTC) #10
DaleCurtis
+hubbe, wolenetz for sanity check of MultiBuffer and MSE changes. Still needs tests and perhaps ...
4 years, 4 months ago (2016-08-24 23:25:56 UTC) #13
hubbe
Looks reasonably sane, although the threading in multibuffer_data_source.cc always gives me pause... https://codereview.chromium.org/2267963002/diff/40001/media/blink/multibuffer_data_source.cc File media/blink/multibuffer_data_source.cc ...
4 years, 3 months ago (2016-08-24 23:39:44 UTC) #14
DaleCurtis
https://codereview.chromium.org/2267963002/diff/40001/media/blink/multibuffer_data_source.cc File media/blink/multibuffer_data_source.cc (right): https://codereview.chromium.org/2267963002/diff/40001/media/blink/multibuffer_data_source.cc#newcode300 media/blink/multibuffer_data_source.cc:300: void MultibufferDataSource::Abort() { On 2016/08/24 at 23:39:43, hubbe wrote: ...
4 years, 3 months ago (2016-08-24 23:41:10 UTC) #15
hubbe
https://codereview.chromium.org/2267963002/diff/40001/media/blink/multibuffer_data_source.cc File media/blink/multibuffer_data_source.cc (right): https://codereview.chromium.org/2267963002/diff/40001/media/blink/multibuffer_data_source.cc#newcode300 media/blink/multibuffer_data_source.cc:300: void MultibufferDataSource::Abort() { On 2016/08/24 23:41:10, DaleCurtis wrote: > ...
4 years, 3 months ago (2016-08-24 23:43:29 UTC) #16
wolenetz
https://codereview.chromium.org/2267963002/diff/40001/media/base/demuxer.h File media/base/demuxer.h (right): https://codereview.chromium.org/2267963002/diff/40001/media/base/demuxer.h#newcode92 media/base/demuxer.h:92: // read aborted will be aborted with a status ...
4 years, 3 months ago (2016-08-24 23:46:55 UTC) #17
DaleCurtis
https://codereview.chromium.org/2267963002/diff/40001/media/base/demuxer.h File media/base/demuxer.h (right): https://codereview.chromium.org/2267963002/diff/40001/media/base/demuxer.h#newcode92 media/base/demuxer.h:92: // read aborted will be aborted with a status ...
4 years, 3 months ago (2016-08-24 23:49:41 UTC) #18
wolenetz
https://codereview.chromium.org/2267963002/diff/40001/media/base/demuxer.h File media/base/demuxer.h (right): https://codereview.chromium.org/2267963002/diff/40001/media/base/demuxer.h#newcode92 media/base/demuxer.h:92: // read aborted will be aborted with a status ...
4 years, 3 months ago (2016-08-24 23:54:18 UTC) #19
wolenetz
MSE LGTM. Potential optimization for ffmpeg multi-seek noted in comment. All % new tests. https://codereview.chromium.org/2267963002/diff/60001/media/base/pipeline_impl.cc ...
4 years, 3 months ago (2016-08-25 18:56:14 UTC) #20
sandersd (OOO until July 31)
lgtm
4 years, 3 months ago (2016-08-25 19:01:37 UTC) #21
DaleCurtis
+thestig for trivial media_galleries changes. hubbe@ PTAL at multibuffer changes. sandersd@ PTAL at ffmpegdemuxer changes. ...
4 years, 3 months ago (2016-08-29 21:14:59 UTC) #23
Lei Zhang
lgtm
4 years, 3 months ago (2016-08-29 21:17:32 UTC) #24
sandersd (OOO until July 31)
still lgtm
4 years, 3 months ago (2016-08-29 22:40:21 UTC) #27
hubbe
lgtm
4 years, 3 months ago (2016-08-30 18:50:27 UTC) #32
wolenetz
MSE still LGTM. ffmpeg multi-seek optimization also LGTM. https://codereview.chromium.org/2267963002/diff/60001/media/base/pipeline_impl.cc File media/base/pipeline_impl.cc (right): https://codereview.chromium.org/2267963002/diff/60001/media/base/pipeline_impl.cc#newcode315 media/base/pipeline_impl.cc:315: demuxer_->AbortPendingReads(); ...
4 years, 3 months ago (2016-08-30 18:52:12 UTC) #33
DaleCurtis
Thanks for review!
4 years, 3 months ago (2016-08-30 18:53:47 UTC) #35
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/2267963002/80001
4 years, 3 months ago (2016-08-30 18:54:33 UTC) #36
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 3 months ago (2016-08-30 19:54:36 UTC) #37
commit-bot: I haz the power
4 years, 3 months ago (2016-08-30 19:56:01 UTC) #39
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/f299e19db62058180acf4276540670a90ff7b472
Cr-Commit-Position: refs/heads/master@{#415401}

Powered by Google App Engine
This is Rietveld 408576698