| Index: media/formats/mp2t/mp2t_stream_parser.h
|
| diff --git a/media/formats/mp2t/mp2t_stream_parser.h b/media/formats/mp2t/mp2t_stream_parser.h
|
| index e419f029ae54d44f1f3a3060aa969e921b45536c..fbe203f3c127ddaef4be95af98d42eebec5d3635 100644
|
| --- a/media/formats/mp2t/mp2t_stream_parser.h
|
| +++ b/media/formats/mp2t/mp2t_stream_parser.h
|
| @@ -15,6 +15,7 @@
|
| #include "media/base/media_export.h"
|
| #include "media/base/stream_parser.h"
|
| #include "media/base/video_decoder_config.h"
|
| +#include "media/formats/mp2t/timestamp_unroller.h"
|
|
|
| namespace media {
|
|
|
| @@ -92,6 +93,8 @@ class MEDIA_EXPORT Mp2tStreamParser : public StreamParser {
|
| scoped_refptr<StreamParserBuffer> stream_parser_buffer);
|
| bool EmitRemainingBuffers();
|
|
|
| + void ApplyTimeOffset(StreamParser::BufferQueue* buffer_queue);
|
| +
|
| // List of callbacks.
|
| InitCB init_cb_;
|
| NewConfigCB config_cb_;
|
| @@ -123,6 +126,14 @@ class MEDIA_EXPORT Mp2tStreamParser : public StreamParser {
|
|
|
| // Indicate whether a segment was started.
|
| bool segment_started_;
|
| +
|
| + // Timestamp unroller.
|
| + // Timestamps in PES packets must be unrolled using the same offset.
|
| + // So the unroller is global between PES pids.
|
| + TimestampUnroller timestamp_unroller_;
|
| +
|
| + // The timestamp unroller might create negative timestamps,
|
| + // we need to add a time offset to make sure all timestamps are positive.
|
| base::TimeDelta time_offset_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(Mp2tStreamParser);
|
|
|