| 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..dd42d35766ea0180beb98b97930e6a477fc7bd3a 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.
|
| + int 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.
|
| + int 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_(-1),
|
| 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() {
|
| }
|
| }
|
|
|
| +int DecoderBufferFromMsg::stream_id() const {
|
| + return stream_id_;
|
| +}
|
| +
|
| 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 =
|
|
|