summaryrefslogtreecommitdiff
path: root/media/base/stream_parser_buffer.h
diff options
context:
space:
mode:
authorTorne (Richard Coles) <torne@google.com>2014-02-21 12:16:55 +0000
committerTorne (Richard Coles) <torne@google.com>2014-02-21 12:16:55 +0000
commit5d1f7b1de12d16ceb2c938c56701a3e8bfa558f7 (patch)
tree5d4ae202b870bd86673f596f0d424bc4b3e55ebe /media/base/stream_parser_buffer.h
parente862bac9c33104a29d98631d62668ae7b6676510 (diff)
downloadchromium_org-5d1f7b1de12d16ceb2c938c56701a3e8bfa558f7.tar.gz
Merge from Chromium at DEPS revision 251904
This commit was generated by merge_to_master.py. Change-Id: I1f9543259d7d2a57d81aa41a1b84f85837439d21
Diffstat (limited to 'media/base/stream_parser_buffer.h')
-rw-r--r--media/base/stream_parser_buffer.h37
1 files changed, 32 insertions, 5 deletions
diff --git a/media/base/stream_parser_buffer.h b/media/base/stream_parser_buffer.h
index 8899f11216..146e78a3dc 100644
--- a/media/base/stream_parser_buffer.h
+++ b/media/base/stream_parser_buffer.h
@@ -6,7 +6,9 @@
#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"
+#include "media/base/stream_parser.h"
namespace media {
@@ -15,12 +17,17 @@ class MEDIA_EXPORT StreamParserBuffer : public DecoderBuffer {
// Value used to signal an invalid decoder config ID.
enum { kInvalidConfigId = -1 };
+ typedef DemuxerStream::Type Type;
+ typedef StreamParser::TrackId TrackId;
+
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,
+ TrackId track_id);
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,
+ TrackId track_id);
bool IsKeyframe() const { return is_keyframe_; }
// Decode timestamp. If not explicitly set, or set to kNoTimestamp(), the
@@ -28,20 +35,40 @@ 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 the parser's track ID associated with this buffer. Value is
+ // meaningless for EOS buffers.
+ TrackId track_id() const { return track_id_; }
+
+ // 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()
+ const;
+ void SetFadeOutPreroll(
+ const std::vector<scoped_refptr<StreamParserBuffer> >& fade_out_preroll);
+
private:
StreamParserBuffer(const uint8* data, int data_size,
const uint8* side_data, int side_data_size,
- bool is_keyframe);
+ bool is_keyframe, Type type,
+ TrackId track_id);
virtual ~StreamParserBuffer();
bool is_keyframe_;
base::TimeDelta decode_timestamp_;
int config_id_;
+ Type type_;
+ TrackId track_id_;
+
+ std::vector<scoped_refptr<StreamParserBuffer> > fade_out_preroll_;
+
DISALLOW_COPY_AND_ASSIGN(StreamParserBuffer);
};