| 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 20 matching lines...) Expand all Loading... |
| 31 ~MojoDemuxerStreamAdapter() override; | 31 ~MojoDemuxerStreamAdapter() override; |
| 32 | 32 |
| 33 // DemuxerStream implementation. | 33 // DemuxerStream implementation. |
| 34 void Read(const ReadCB& read_cb) override; | 34 void Read(const ReadCB& read_cb) override; |
| 35 AudioDecoderConfig audio_decoder_config() override; | 35 AudioDecoderConfig audio_decoder_config() override; |
| 36 VideoDecoderConfig video_decoder_config() override; | 36 VideoDecoderConfig video_decoder_config() override; |
| 37 Type type() const override; | 37 Type type() const override; |
| 38 void EnableBitstreamConverter() override; | 38 void EnableBitstreamConverter() override; |
| 39 bool SupportsConfigChanges() override; | 39 bool SupportsConfigChanges() override; |
| 40 VideoRotation video_rotation() override; | 40 VideoRotation video_rotation() override; |
| 41 // TODO(servolk): Implement buffering adjustment for MojoDemuxerStreamAdapter |
| 42 //int GetMemoryLimit() const override; |
| 43 //void SetMemoryLimit(int memory_limit) override; |
| 41 | 44 |
| 42 private: | 45 private: |
| 43 void OnStreamReady(mojo::DemuxerStream::Type type, | 46 void OnStreamReady(mojo::DemuxerStream::Type type, |
| 44 mojo::ScopedDataPipeConsumerHandle pipe, | 47 mojo::ScopedDataPipeConsumerHandle pipe, |
| 45 mojo::AudioDecoderConfigPtr audio_config, | 48 mojo::AudioDecoderConfigPtr audio_config, |
| 46 mojo::VideoDecoderConfigPtr video_config); | 49 mojo::VideoDecoderConfigPtr video_config); |
| 47 | 50 |
| 48 // The callback from |demuxer_stream_| that a read operation has completed. | 51 // The callback from |demuxer_stream_| that a read operation has completed. |
| 49 // |read_cb| is a callback from the client who invoked Read() on |this|. | 52 // |read_cb| is a callback from the client who invoked Read() on |this|. |
| 50 void OnBufferReady(mojo::DemuxerStream::Status status, | 53 void OnBufferReady(mojo::DemuxerStream::Status status, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 75 // DataPipe for deserializing the data section of DecoderBuffers from. | 78 // DataPipe for deserializing the data section of DecoderBuffers from. |
| 76 mojo::ScopedDataPipeConsumerHandle stream_pipe_; | 79 mojo::ScopedDataPipeConsumerHandle stream_pipe_; |
| 77 | 80 |
| 78 base::WeakPtrFactory<MojoDemuxerStreamAdapter> weak_factory_; | 81 base::WeakPtrFactory<MojoDemuxerStreamAdapter> weak_factory_; |
| 79 DISALLOW_COPY_AND_ASSIGN(MojoDemuxerStreamAdapter); | 82 DISALLOW_COPY_AND_ASSIGN(MojoDemuxerStreamAdapter); |
| 80 }; | 83 }; |
| 81 | 84 |
| 82 } // namespace media | 85 } // namespace media |
| 83 | 86 |
| 84 #endif // MEDIA_MOJO_SERVICES_MOJO_DEMUXER_STREAM_ADAPTER_H_ | 87 #endif // MEDIA_MOJO_SERVICES_MOJO_DEMUXER_STREAM_ADAPTER_H_ |
| OLD | NEW |