| Index: media/base/stream_parser_buffer.h
|
| diff --git a/media/base/stream_parser_buffer.h b/media/base/stream_parser_buffer.h
|
| index 44ca1abed2c58577c1f52049cd94ab6b3cdfe1b5..cb1d908ba0cedb70300c74bd46b169c850fdfdcd 100644
|
| --- a/media/base/stream_parser_buffer.h
|
| +++ b/media/base/stream_parser_buffer.h
|
| @@ -6,6 +6,7 @@
|
| #define MEDIA_BASE_STREAM_PARSER_BUFFER_H_
|
|
|
| #include "media/base/decoder_buffer.h"
|
| +#include "media/base/demuxer_stream.h"
|
| #include "media/base/media_export.h"
|
|
|
| namespace media {
|
| @@ -15,12 +16,14 @@ class MEDIA_EXPORT StreamParserBuffer : public DecoderBuffer {
|
| // Value used to signal an invalid decoder config ID.
|
| enum { kInvalidConfigId = -1 };
|
|
|
| + typedef DemuxerStream::Type Type;
|
| +
|
| static scoped_refptr<StreamParserBuffer> CreateEOSBuffer();
|
| static scoped_refptr<StreamParserBuffer> CopyFrom(
|
| - const uint8* data, int data_size, bool is_keyframe);
|
| + const uint8* data, int data_size, bool is_keyframe, Type type);
|
| static scoped_refptr<StreamParserBuffer> CopyFrom(
|
| const uint8* data, int data_size,
|
| - const uint8* side_data, int side_data_size, bool is_keyframe);
|
| + const uint8* side_data, int side_data_size, bool is_keyframe, Type type);
|
| bool IsKeyframe() const { return is_keyframe_; }
|
|
|
| // Decode timestamp. If not explicitly set, or set to kNoTimestamp(), the
|
| @@ -28,11 +31,19 @@ class MEDIA_EXPORT StreamParserBuffer : public DecoderBuffer {
|
| base::TimeDelta GetDecodeTimestamp() const;
|
| void SetDecodeTimestamp(const base::TimeDelta& timestamp);
|
|
|
| - // Gets/sets the ID of the decoder config associated with this
|
| - // buffer.
|
| + // Gets/sets the ID of the decoder config associated with this buffer.
|
| int GetConfigId() const;
|
| void SetConfigId(int config_id);
|
|
|
| + // Gets the parser's media type associated with this buffer. Value is
|
| + // meaningless for EOS buffers.
|
| + Type type() const { return type_; }
|
| +
|
| + // Gets/sets the parser's text track number associated with this buffer. Value
|
| + // is meaningless for EOS buffers or buffers whose type() is not |kText|.
|
| + int text_track_number() const { return text_track_number_; }
|
| + void set_text_track_number(int track_num) { text_track_number_ = track_num; }
|
| +
|
| // Buffers to be exhausted before using the data in this DecoderBuffer. Used
|
| // to implement the Audio Splice Frame Algorithm per the MSE specification.
|
| const std::vector<scoped_refptr<StreamParserBuffer> >& GetFadeOutPreroll()
|
| @@ -43,12 +54,22 @@ class MEDIA_EXPORT StreamParserBuffer : public DecoderBuffer {
|
| private:
|
| StreamParserBuffer(const uint8* data, int data_size,
|
| const uint8* side_data, int side_data_size,
|
| - bool is_keyframe);
|
| + bool is_keyframe, Type type);
|
| virtual ~StreamParserBuffer();
|
|
|
| bool is_keyframe_;
|
| base::TimeDelta decode_timestamp_;
|
| int config_id_;
|
| + Type type_;
|
| +
|
| + // Range of |text_track_number_| is dependent upon each stream parser. It is
|
| + // the key for the buffer's text track config in the applicable
|
| + // TextTrackConfigMap (which is passed in StreamParser::NewConfigCB).
|
| + // WebMTracksParser uses -1 as an invalid text track number.
|
| + // TODO(wolenetz/acolwell): Update valid/invalid range once more text track
|
| + // parsers are implemented. See http://crbug.com/336926.
|
| + int text_track_number_;
|
| +
|
| std::vector<scoped_refptr<StreamParserBuffer> > fade_out_preroll_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(StreamParserBuffer);
|
|
|