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 <memory> | 8 #include <memory> |
9 #include <queue> | 9 #include <queue> |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 // DemuxerStream implementation. | 39 // DemuxerStream implementation. |
40 void Read(const ReadCB& read_cb) override; | 40 void Read(const ReadCB& read_cb) override; |
41 AudioDecoderConfig audio_decoder_config() override; | 41 AudioDecoderConfig audio_decoder_config() override; |
42 VideoDecoderConfig video_decoder_config() override; | 42 VideoDecoderConfig video_decoder_config() override; |
43 Type type() const override; | 43 Type type() const override; |
44 void EnableBitstreamConverter() override; | 44 void EnableBitstreamConverter() override; |
45 bool SupportsConfigChanges() override; | 45 bool SupportsConfigChanges() override; |
46 VideoRotation video_rotation() override; | 46 VideoRotation video_rotation() override; |
47 bool enabled() const override; | 47 bool enabled() const override; |
48 void set_enabled(bool enabled, base::TimeDelta timestamp) override; | 48 void set_enabled(bool enabled, base::TimeDelta timestamp) override; |
49 void SetStreamStatusChangeCB(const StreamStatusChangeCB& cb) override; | |
50 | 49 |
51 private: | 50 private: |
52 void OnStreamReady(Type type, | 51 void OnStreamReady(Type type, |
53 mojo::ScopedDataPipeConsumerHandle consumer_handle, | 52 mojo::ScopedDataPipeConsumerHandle consumer_handle, |
54 mojom::AudioDecoderConfigPtr audio_config, | 53 mojom::AudioDecoderConfigPtr audio_config, |
55 mojom::VideoDecoderConfigPtr video_config); | 54 mojom::VideoDecoderConfigPtr video_config); |
56 | 55 |
57 // The callback from |demuxer_stream_| that a read operation has completed. | 56 // The callback from |demuxer_stream_| that a read operation has completed. |
58 // |read_cb| is a callback from the client who invoked Read() on |this|. | 57 // |read_cb| is a callback from the client who invoked Read() on |this|. |
59 void OnBufferReady(Status status, | 58 void OnBufferReady(Status status, |
(...skipping 25 matching lines...) Expand all Loading... |
85 | 84 |
86 std::unique_ptr<MojoDecoderBufferReader> mojo_decoder_buffer_reader_; | 85 std::unique_ptr<MojoDecoderBufferReader> mojo_decoder_buffer_reader_; |
87 | 86 |
88 base::WeakPtrFactory<MojoDemuxerStreamAdapter> weak_factory_; | 87 base::WeakPtrFactory<MojoDemuxerStreamAdapter> weak_factory_; |
89 DISALLOW_COPY_AND_ASSIGN(MojoDemuxerStreamAdapter); | 88 DISALLOW_COPY_AND_ASSIGN(MojoDemuxerStreamAdapter); |
90 }; | 89 }; |
91 | 90 |
92 } // namespace media | 91 } // namespace media |
93 | 92 |
94 #endif // MEDIA_MOJO_SERVICES_MOJO_DEMUXER_STREAM_ADAPTER_H_ | 93 #endif // MEDIA_MOJO_SERVICES_MOJO_DEMUXER_STREAM_ADAPTER_H_ |
OLD | NEW |