Index: chromecast/media/cma/ipc_streamer/decoder_buffer_base_marshaller.cc |
diff --git a/chromecast/media/cma/ipc_streamer/decoder_buffer_base_marshaller.cc b/chromecast/media/cma/ipc_streamer/decoder_buffer_base_marshaller.cc |
index a377ae66337e5ab9014c7675f3a6e6e6c35d825e..2c254685ba24373c0687f730d7f939c50e696038 100644 |
--- a/chromecast/media/cma/ipc_streamer/decoder_buffer_base_marshaller.cc |
+++ b/chromecast/media/cma/ipc_streamer/decoder_buffer_base_marshaller.cc |
@@ -24,6 +24,7 @@ class DecoderBufferFromMsg : public DecoderBufferBase { |
void Initialize(); |
// DecoderBufferBase implementation. |
+ StreamId stream_id() const override; |
base::TimeDelta timestamp() const override; |
const uint8* data() const override; |
uint8* writable_data() const override; |
@@ -37,6 +38,9 @@ class DecoderBufferFromMsg : public DecoderBufferBase { |
// Indicates whether this is an end of stream frame. |
bool is_eos_; |
+ // Stream Id this decoder buffer belonging to. |
gunsch
2015/05/22 01:45:26
wording: "Stream this decoder buffer belongs to."
erickung1
2015/05/22 17:33:22
Done.
|
+ StreamId stream_id_; |
+ |
// Frame timestamp. |
base::TimeDelta pts_; |
@@ -56,6 +60,7 @@ class DecoderBufferFromMsg : public DecoderBufferBase { |
DecoderBufferFromMsg::DecoderBufferFromMsg( |
scoped_ptr<MediaMessage> msg) |
: is_eos_(true), |
+ stream_id_(kPrimary), |
msg_(msg.Pass()), |
data_(NULL) { |
CHECK(msg_); |
@@ -71,6 +76,8 @@ void DecoderBufferFromMsg::Initialize() { |
if (is_eos_) |
return; |
+ CHECK(msg_->ReadPod(&stream_id_)); |
+ |
int64 pts_internal = 0; |
CHECK(msg_->ReadPod(&pts_internal)); |
pts_ = base::TimeDelta::FromInternalValue(pts_internal); |
@@ -99,6 +106,10 @@ void DecoderBufferFromMsg::Initialize() { |
} |
} |
+StreamId DecoderBufferFromMsg::stream_id() const { |
+ return stream_id_; |
gunsch
2015/05/22 01:45:26
you could just return kPrimary here and not have t
erickung1
2015/05/22 17:33:22
Although right now all code uses kPrimary, we shou
|
+} |
+ |
base::TimeDelta DecoderBufferFromMsg::timestamp() const { |
return pts_; |
} |
@@ -135,6 +146,7 @@ void DecoderBufferBaseMarshaller::Write( |
if (buffer->end_of_stream()) |
return; |
+ CHECK(msg->WritePod(buffer->stream_id())); |
CHECK(msg->WritePod(buffer->timestamp().ToInternalValue())); |
bool has_decrypt_config = |