| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "media/mojo/services/mojo_demuxer_stream_impl.h" | 5 #include "media/mojo/services/mojo_demuxer_stream_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "media/base/audio_decoder_config.h" | 8 #include "media/base/audio_decoder_config.h" |
| 9 #include "media/base/decoder_buffer.h" | 9 #include "media/base/decoder_buffer.h" |
| 10 #include "media/base/video_decoder_config.h" | 10 #include "media/base/video_decoder_config.h" |
| 11 #include "media/mojo/services/media_type_converters.h" | 11 #include "media/mojo/services/media_type_converters.h" |
| 12 #include "third_party/mojo/src/mojo/public/cpp/system/data_pipe.h" | 12 #include "mojo/public/cpp/system/data_pipe.h" |
| 13 | 13 |
| 14 namespace media { | 14 namespace media { |
| 15 | 15 |
| 16 MojoDemuxerStreamImpl::MojoDemuxerStreamImpl( | 16 MojoDemuxerStreamImpl::MojoDemuxerStreamImpl( |
| 17 media::DemuxerStream* stream, | 17 media::DemuxerStream* stream, |
| 18 mojo::InterfaceRequest<interfaces::DemuxerStream> request) | 18 mojo::InterfaceRequest<interfaces::DemuxerStream> request) |
| 19 : binding_(this, request.Pass()), stream_(stream), weak_factory_(this) {} | 19 : binding_(this, request.Pass()), stream_(stream), weak_factory_(this) {} |
| 20 | 20 |
| 21 MojoDemuxerStreamImpl::~MojoDemuxerStreamImpl() { | 21 MojoDemuxerStreamImpl::~MojoDemuxerStreamImpl() { |
| 22 } | 22 } |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 | 117 |
| 118 // TODO(dalecurtis): Once we can write framed data to the DataPipe, fill via | 118 // TODO(dalecurtis): Once we can write framed data to the DataPipe, fill via |
| 119 // the producer handle and then read more to keep the pipe full. Waiting for | 119 // the producer handle and then read more to keep the pipe full. Waiting for |
| 120 // space can be accomplished using an AsyncWaiter. | 120 // space can be accomplished using an AsyncWaiter. |
| 121 callback.Run(static_cast<interfaces::DemuxerStream::Status>(status), | 121 callback.Run(static_cast<interfaces::DemuxerStream::Status>(status), |
| 122 interfaces::DecoderBuffer::From(buffer), audio_config.Pass(), | 122 interfaces::DecoderBuffer::From(buffer), audio_config.Pass(), |
| 123 video_config.Pass()); | 123 video_config.Pass()); |
| 124 } | 124 } |
| 125 | 125 |
| 126 } // namespace media | 126 } // namespace media |
| OLD | NEW |