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

Issue 447963003: Introduce DecodeTimestamp class to make it easier to distiguish presentation and decode timestamps. (Closed)

Created:
6 years, 4 months ago by acolwell GONE FROM CHROMIUM
Modified:
6 years, 4 months ago
Reviewers:
damienv1, wolenetz
CC:
chromium-reviews, feature-media-reviews_chromium.org
Project:
chromium
Visibility:
Public.

Description

Introduce DecodeTimestamp class to make it easier to distiguish presentation and decode timestamps. DecodeTimestamp is a thin wrapper around base::TimeDelta that makes it possible to easily differentiate decode timestamps from presentation timestamps. Using a separate type also forces conversions between these two domains to be done explicitly through conversion functions. This change introduces the class and updates all the variables that contain decode timestamps. It also puts in place the necessary conversion calls for converting between timestamp types. There should be no functional change as a result of this patch. This class is mainly to allow the compiler to highlight where conversions between timestamp types occur. Having DecodeTimestamp will make it much easier to rework SourceBufferStream so that it properly handles B-frame content and reports buffered ranges in terms of presentation time instead of decode time. BUG=398130 TEST=All existing tests still pass. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=289031

Patch Set 1 #

Total comments: 33

Patch Set 2 : Address CR comments #

Total comments: 4

Patch Set 3 : Address CR comments #

Patch Set 4 : Rebase #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+485 lines, -373 lines) Patch
M media/base/stream_parser.cc View 3 chunks +5 lines, -5 lines 0 comments Download
M media/base/stream_parser_buffer.h View 1 3 chunks +88 lines, -3 lines 0 comments Download
M media/base/stream_parser_buffer.cc View 2 chunks +5 lines, -5 lines 0 comments Download
M media/base/stream_parser_unittest.cc View 2 chunks +1 line, -2 lines 0 comments Download
M media/filters/chunk_demuxer.h View 1 chunk +1 line, -1 line 0 comments Download
M media/filters/chunk_demuxer.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M media/filters/frame_processor.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M media/filters/frame_processor.cc View 1 11 chunks +18 lines, -14 lines 0 comments Download
M media/filters/frame_processor_unittest.cc View 1 chunk +0 lines, -1 line 0 comments Download
M media/filters/source_buffer_stream.h View 1 10 chunks +21 lines, -23 lines 0 comments Download
M media/filters/source_buffer_stream.cc View 1 2 71 chunks +209 lines, -197 lines 0 comments Download
M media/filters/source_buffer_stream_unittest.cc View 11 chunks +26 lines, -17 lines 0 comments Download
M media/formats/mp2t/es_adapter_video.h View 2 chunks +3 lines, -2 lines 0 comments Download
M media/formats/mp2t/es_parser.h View 2 chunks +2 lines, -1 line 0 comments Download
M media/formats/mp2t/es_parser_adts.h View 2 chunks +1 line, -2 lines 0 comments Download
M media/formats/mp2t/es_parser_adts.cc View 3 chunks +1 line, -3 lines 2 comments Download
M media/formats/mp2t/es_parser_h264.h View 2 chunks +2 lines, -3 lines 0 comments Download
M media/formats/mp2t/es_parser_h264.cc View 4 chunks +4 lines, -4 lines 0 comments Download
M media/formats/mp2t/es_parser_h264_unittest.cc View 2 chunks +1 line, -2 lines 0 comments Download
M media/formats/mp2t/mp2t_stream_parser_unittest.cc View 6 chunks +25 lines, -25 lines 0 comments Download
M media/formats/mp2t/ts_section_pes.cc View 3 chunks +2 lines, -3 lines 0 comments Download
M media/formats/mp4/mp4_stream_parser_unittest.cc View 4 chunks +15 lines, -13 lines 0 comments Download
M media/formats/mp4/track_run_iterator.h View 3 chunks +6 lines, -4 lines 0 comments Download
M media/formats/mp4/track_run_iterator.cc View 1 4 chunks +11 lines, -7 lines 0 comments Download
M media/formats/mp4/track_run_iterator_unittest.cc View 5 chunks +8 lines, -8 lines 0 comments Download
M media/formats/webm/webm_cluster_parser.h View 1 3 chunks +9 lines, -8 lines 0 comments Download
M media/formats/webm/webm_cluster_parser.cc View 1 8 chunks +18 lines, -17 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
acolwell GONE FROM CHROMIUM
6 years, 4 months ago (2014-08-07 00:13:20 UTC) #1
wolenetz
First round of comments. I'll need to look more closely at source_buffer_stream* based on your ...
6 years, 4 months ago (2014-08-08 21:30:05 UTC) #2
acolwell GONE FROM CHROMIUM
https://codereview.chromium.org/447963003/diff/1/media/base/stream_parser_buffer.h File media/base/stream_parser_buffer.h (right): https://codereview.chromium.org/447963003/diff/1/media/base/stream_parser_buffer.h#newcode23 media/base/stream_parser_buffer.h:23: DecodeTimestamp() {}; On 2014/08/08 21:30:04, wolenetz wrote: > lint ...
6 years, 4 months ago (2014-08-11 17:05:06 UTC) #3
wolenetz
lgtm % nits: https://codereview.chromium.org/447963003/diff/1/media/base/stream_parser_buffer.h File media/base/stream_parser_buffer.h (right): https://codereview.chromium.org/447963003/diff/1/media/base/stream_parser_buffer.h#newcode52 media/base/stream_parser_buffer.h:52: DecodeTimestamp operator+(const base::TimeDelta& rhs) const { ...
6 years, 4 months ago (2014-08-12 00:09:01 UTC) #4
acolwell GONE FROM CHROMIUM
Thanks for the review. https://codereview.chromium.org/447963003/diff/20001/media/filters/source_buffer_stream.cc File media/filters/source_buffer_stream.cc (right): https://codereview.chromium.org/447963003/diff/20001/media/filters/source_buffer_stream.cc#newcode306 media/filters/source_buffer_stream.cc:306: const media::DecodeTimestamp& decode_timestamp, On 2014/08/12 ...
6 years, 4 months ago (2014-08-12 01:47:10 UTC) #5
acolwell GONE FROM CHROMIUM
The CQ bit was checked by acolwell@chromium.org
6 years, 4 months ago (2014-08-12 01:47:15 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/acolwell@chromium.org/447963003/60001
6 years, 4 months ago (2014-08-12 01:56:40 UTC) #7
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_dbg_triggered_tests on tryserver.chromium.linux ...
6 years, 4 months ago (2014-08-12 04:57:29 UTC) #8
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-12 07:23:19 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel/builds/5747)
6 years, 4 months ago (2014-08-12 07:23:21 UTC) #10
acolwell GONE FROM CHROMIUM
The CQ bit was checked by acolwell@chromium.org
6 years, 4 months ago (2014-08-12 16:47:24 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/acolwell@chromium.org/447963003/60001
6 years, 4 months ago (2014-08-12 16:50:02 UTC) #12
commit-bot: I haz the power
Change committed as 289031
6 years, 4 months ago (2014-08-12 18:29:54 UTC) #13
damienv1
https://codereview.chromium.org/447963003/diff/60001/media/formats/mp2t/es_parser_adts.cc File media/formats/mp2t/es_parser_adts.cc (left): https://codereview.chromium.org/447963003/diff/60001/media/formats/mp2t/es_parser_adts.cc#oldcode169 media/formats/mp2t/es_parser_adts.cc:169: stream_parser_buffer->SetDecodeTimestamp(current_pts); Should not be removed: most audio streams in ...
6 years, 4 months ago (2014-08-14 23:11:33 UTC) #14
wolenetz
6 years, 4 months ago (2014-08-14 23:32:51 UTC) #15
Message was sent while issue was closed.
https://codereview.chromium.org/447963003/diff/60001/media/formats/mp2t/es_pa...
File media/formats/mp2t/es_parser_adts.cc (left):

https://codereview.chromium.org/447963003/diff/60001/media/formats/mp2t/es_pa...
media/formats/mp2t/es_parser_adts.cc:169:
stream_parser_buffer->SetDecodeTimestamp(current_pts);
On 2014/08/14 23:11:33, damienv1 wrote:
> Should not be removed: most audio streams in Mpeg2 TS do not have dts, in that
> case, dts is equal to the pts.

If not explicitly set (or if kNoDecodeTimestamp()), then dts is taken from pts.
So if you have no differing dts to set vs pts, you don't need to set it.

Powered by Google App Engine
This is Rietveld 408576698