| 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 #ifndef MEDIA_MOJO_SERVICES_MOJO_DEMUXER_STREAM_ADAPTER_H_ | 5 #ifndef MEDIA_MOJO_SERVICES_MOJO_DEMUXER_STREAM_ADAPTER_H_ |
| 6 #define MEDIA_MOJO_SERVICES_MOJO_DEMUXER_STREAM_ADAPTER_H_ | 6 #define MEDIA_MOJO_SERVICES_MOJO_DEMUXER_STREAM_ADAPTER_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 | 9 |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 private: | 44 private: |
| 45 void OnStreamReady(interfaces::DemuxerStream::Type type, | 45 void OnStreamReady(interfaces::DemuxerStream::Type type, |
| 46 mojo::ScopedDataPipeConsumerHandle pipe, | 46 mojo::ScopedDataPipeConsumerHandle pipe, |
| 47 interfaces::AudioDecoderConfigPtr audio_config, | 47 interfaces::AudioDecoderConfigPtr audio_config, |
| 48 interfaces::VideoDecoderConfigPtr video_config); | 48 interfaces::VideoDecoderConfigPtr video_config); |
| 49 | 49 |
| 50 // The callback from |demuxer_stream_| that a read operation has completed. | 50 // The callback from |demuxer_stream_| that a read operation has completed. |
| 51 // |read_cb| is a callback from the client who invoked Read() on |this|. | 51 // |read_cb| is a callback from the client who invoked Read() on |this|. |
| 52 void OnBufferReady(interfaces::DemuxerStream::Status status, | 52 void OnBufferReady(interfaces::DemuxerStream::Status status, |
| 53 interfaces::MediaDecoderBufferPtr buffer, | 53 interfaces::DecoderBufferPtr buffer, |
| 54 interfaces::AudioDecoderConfigPtr audio_config, | 54 interfaces::AudioDecoderConfigPtr audio_config, |
| 55 interfaces::VideoDecoderConfigPtr video_config); | 55 interfaces::VideoDecoderConfigPtr video_config); |
| 56 | 56 |
| 57 void UpdateConfig(interfaces::AudioDecoderConfigPtr audio_config, | 57 void UpdateConfig(interfaces::AudioDecoderConfigPtr audio_config, |
| 58 interfaces::VideoDecoderConfigPtr video_config); | 58 interfaces::VideoDecoderConfigPtr video_config); |
| 59 | 59 |
| 60 // See constructor for descriptions. | 60 // See constructor for descriptions. |
| 61 interfaces::DemuxerStreamPtr demuxer_stream_; | 61 interfaces::DemuxerStreamPtr demuxer_stream_; |
| 62 base::Closure stream_ready_cb_; | 62 base::Closure stream_ready_cb_; |
| 63 | 63 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 77 // DataPipe for deserializing the data section of DecoderBuffers from. | 77 // DataPipe for deserializing the data section of DecoderBuffers from. |
| 78 mojo::ScopedDataPipeConsumerHandle stream_pipe_; | 78 mojo::ScopedDataPipeConsumerHandle stream_pipe_; |
| 79 | 79 |
| 80 base::WeakPtrFactory<MojoDemuxerStreamAdapter> weak_factory_; | 80 base::WeakPtrFactory<MojoDemuxerStreamAdapter> weak_factory_; |
| 81 DISALLOW_COPY_AND_ASSIGN(MojoDemuxerStreamAdapter); | 81 DISALLOW_COPY_AND_ASSIGN(MojoDemuxerStreamAdapter); |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 } // namespace media | 84 } // namespace media |
| 85 | 85 |
| 86 #endif // MEDIA_MOJO_SERVICES_MOJO_DEMUXER_STREAM_ADAPTER_H_ | 86 #endif // MEDIA_MOJO_SERVICES_MOJO_DEMUXER_STREAM_ADAPTER_H_ |
| OLD | NEW |