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

Issue 325503003: Fix seeking when the start time is non-zero. (Closed)

Created:
6 years, 6 months ago by DaleCurtis
Modified:
6 years, 6 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org
Visibility:
Public.

Description

Fix seeking when the start time is non-zero. The seek timestamp should always be adjusted by the start time, though this manipulation should not be visible to external (web) clients. Since this is an FFmpeg only problem, I've removed the concept of start time from the Demuxer interface in favor of local method only for FFmpegDemuxer. FFmpegDemuxerStream's will now use this value to adjust timestamps such that external clients always see a zero based timeline. Doing so required moving some of our ogg vorbis discard code into the FFmpegDemuxerStream, which actually makes it more accurate and more narrowly scoped to ogg w/ vorbis instead of all vorbis. These changes subtly change how we handle seeking. Previously we would let FFmpeg choose the stream to perform seeking within. Now we always use the stream with the lowest order timestamp. This means we will sometime use the audio stream where previously we used the video stream. I've extended the tests around non-zero start times to verify the new behavior. An FFmpeg DEPS roll is required for the new tests to pass: 9c12290 Revert "avformat/mp3dec: fix start time in light of initial skip samples" 1e661a6 avcodec/vorbisdec: Reset first_frame 7d88be4 avformat/oggparsevorbis: Dont attempt to calculate timestamps from gp=0 BUG=377295 TEST=new unittests. demo page from bug works. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=277348

Patch Set 1 #

Total comments: 1

Patch Set 2 : FFmpeg only start time. #

Total comments: 21

Patch Set 3 : Comments. #

Total comments: 6

Patch Set 4 : Include DEPS. Comments. #

Patch Set 5 : Rebase. #

Patch Set 6 : Fixes. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+302 lines, -138 lines) Patch
M DEPS View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M media/base/demuxer.h View 1 1 chunk +0 lines, -3 lines 0 comments Download
M media/base/mock_filters.h View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M media/base/pipeline.cc View 1 4 chunks +4 lines, -5 lines 0 comments Download
M media/base/pipeline_unittest.cc View 1 3 chunks +1 line, -41 lines 0 comments Download
M media/filters/chunk_demuxer.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M media/filters/chunk_demuxer.cc View 1 2 3 4 2 chunks +1 line, -5 lines 0 comments Download
M media/filters/ffmpeg_audio_decoder.cc View 1 2 3 4 1 chunk +0 lines, -10 lines 0 comments Download
M media/filters/ffmpeg_demuxer.h View 1 2 3 4 5 7 chunks +23 lines, -10 lines 0 comments Download
M media/filters/ffmpeg_demuxer.cc View 1 2 3 4 5 11 chunks +148 lines, -41 lines 0 comments Download
M media/filters/ffmpeg_demuxer_unittest.cc View 1 2 3 4 5 4 chunks +124 lines, -20 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
DaleCurtis
http://i.imgur.com/ChzUb.jpg
6 years, 6 months ago (2014-06-06 23:18:44 UTC) #1
acolwell GONE FROM CHROMIUM
https://codereview.chromium.org/325503003/diff/1/media/base/pipeline.cc File media/base/pipeline.cc (right): https://codereview.chromium.org/325503003/diff/1/media/base/pipeline.cc#newcode760 media/base/pipeline.cc:760: clock_->SetTime(time, time); This makes me really nervous and I'm ...
6 years, 6 months ago (2014-06-09 23:14:46 UTC) #2
DaleCurtis
As discussed offline, I've localized start time manipulations to FFmpegDemuxer and FFmpegDemuxerStream. I've added tests ...
6 years, 6 months ago (2014-06-10 20:26:54 UTC) #3
acolwell GONE FROM CHROMIUM
here are my initial round of comments. You might want to loop in scherkus@ on ...
6 years, 6 months ago (2014-06-10 23:20:39 UTC) #4
DaleCurtis
Just comments. https://codereview.chromium.org/325503003/diff/20001/media/filters/ffmpeg_audio_decoder.cc File media/filters/ffmpeg_audio_decoder.cc (left): https://codereview.chromium.org/325503003/diff/20001/media/filters/ffmpeg_audio_decoder.cc#oldcode264 media/filters/ffmpeg_audio_decoder.cc:264: if (!buffer->end_of_stream() && !discard_helper_->initialized() && On 2014/06/10 ...
6 years, 6 months ago (2014-06-11 16:59:07 UTC) #5
acolwell GONE FROM CHROMIUM
https://codereview.chromium.org/325503003/diff/20001/media/filters/ffmpeg_demuxer.cc File media/filters/ffmpeg_demuxer.cc (right): https://codereview.chromium.org/325503003/diff/20001/media/filters/ffmpeg_demuxer.cc#newcode251 media/filters/ffmpeg_demuxer.cc:251: buffer->set_timestamp(stream_timestamp - demuxer_->start_time()); On 2014/06/11 16:59:07, DaleCurtis wrote: > ...
6 years, 6 months ago (2014-06-11 17:40:24 UTC) #6
DaleCurtis
I'll roll the DEPS for FFmpeg fixes within this CL once I've confirmed the mp3 ...
6 years, 6 months ago (2014-06-12 00:21:56 UTC) #7
acolwell GONE FROM CHROMIUM
lgtm % comments https://codereview.chromium.org/325503003/diff/40001/media/filters/ffmpeg_demuxer.cc File media/filters/ffmpeg_demuxer.cc (right): https://codereview.chromium.org/325503003/diff/40001/media/filters/ffmpeg_demuxer.cc#newcode284 media/filters/ffmpeg_demuxer.cc:284: last_packet_timestamp_ = buffer->timestamp(); Can't this cause ...
6 years, 6 months ago (2014-06-13 18:12:13 UTC) #8
DaleCurtis
https://codereview.chromium.org/325503003/diff/40001/media/filters/ffmpeg_demuxer.cc File media/filters/ffmpeg_demuxer.cc (right): https://codereview.chromium.org/325503003/diff/40001/media/filters/ffmpeg_demuxer.cc#newcode284 media/filters/ffmpeg_demuxer.cc:284: last_packet_timestamp_ = buffer->timestamp(); On 2014/06/13 18:12:13, acolwell wrote: > ...
6 years, 6 months ago (2014-06-13 20:40:02 UTC) #9
DaleCurtis
The CQ bit was checked by dalecurtis@chromium.org
6 years, 6 months ago (2014-06-13 20:40:40 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/325503003/60001
6 years, 6 months ago (2014-06-13 20:43:57 UTC) #11
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-13 23:59:50 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/ios_dbg_simulator/builds/161323) ios_rel_device on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/ios_rel_device/builds/150696) ios_rel_device_ninja ...
6 years, 6 months ago (2014-06-13 23:59:51 UTC) #13
DaleCurtis
The CQ bit was checked by dalecurtis@chromium.org
6 years, 6 months ago (2014-06-15 23:41:15 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/325503003/100001
6 years, 6 months ago (2014-06-15 23:41:45 UTC) #15
commit-bot: I haz the power
Change committed as 277348
6 years, 6 months ago (2014-06-16 02:58:49 UTC) #16
tkent
A revert of this CL has been created in https://codereview.chromium.org/334163002/ by tkent@chromium.org. The reason for ...
6 years, 6 months ago (2014-06-16 06:06:06 UTC) #17
DaleCurtis
acolwell: PTAL. The following changes were necessary: - timeline_offset_ is now set directly for testing. ...
6 years, 6 months ago (2014-06-17 00:34:36 UTC) #18
DaleCurtis
6 years, 6 months ago (2014-06-17 00:47:01 UTC) #19
Message was sent while issue was closed.
Per acolwell's request, I've moved the changes to a new issue:
https://codereview.chromium.org/335273002/

Powered by Google App Engine
This is Rietveld 408576698