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_IMPL_H_ | 5 #ifndef MEDIA_MOJO_SERVICES_MOJO_DEMUXER_STREAM_IMPL_H_ |
6 #define MEDIA_MOJO_SERVICES_MOJO_DEMUXER_STREAM_IMPL_H_ | 6 #define MEDIA_MOJO_SERVICES_MOJO_DEMUXER_STREAM_IMPL_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "media/base/demuxer_stream.h" | 10 #include "media/base/demuxer_stream.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 MojoDemuxerStreamImpl(media::DemuxerStream* stream, | 23 MojoDemuxerStreamImpl(media::DemuxerStream* stream, |
24 mojo::InterfaceRequest<mojom::DemuxerStream> request); | 24 mojo::InterfaceRequest<mojom::DemuxerStream> request); |
25 ~MojoDemuxerStreamImpl() override; | 25 ~MojoDemuxerStreamImpl() override; |
26 | 26 |
27 // mojom::DemuxerStream implementation. | 27 // mojom::DemuxerStream implementation. |
28 // InitializeCallback and ReadCallback are defined in | 28 // InitializeCallback and ReadCallback are defined in |
29 // mojom::DemuxerStream. | 29 // mojom::DemuxerStream. |
30 void Initialize(const InitializeCallback& callback) override; | 30 void Initialize(const InitializeCallback& callback) override; |
31 void Read(const ReadCallback& callback) override; | 31 void Read(const ReadCallback& callback) override; |
32 void EnableBitstreamConverter() override; | 32 void EnableBitstreamConverter() override; |
| 33 void enabled(const enabledCallback& callback) override; |
| 34 void set_enabled(bool enabled, int64_t time_usec) override; |
33 | 35 |
34 private: | 36 private: |
35 void OnBufferReady(const ReadCallback& callback, | 37 void OnBufferReady(const ReadCallback& callback, |
36 media::DemuxerStream::Status status, | 38 media::DemuxerStream::Status status, |
37 const scoped_refptr<media::DecoderBuffer>& buffer); | 39 const scoped_refptr<media::DecoderBuffer>& buffer); |
38 | 40 |
39 mojo::StrongBinding<mojom::DemuxerStream> binding_; | 41 mojo::StrongBinding<mojom::DemuxerStream> binding_; |
40 | 42 |
41 // See constructor. We do not own |stream_|. | 43 // See constructor. We do not own |stream_|. |
42 media::DemuxerStream* stream_; | 44 media::DemuxerStream* stream_; |
43 | 45 |
44 // DataPipe for serializing the data section of DecoderBuffer into. | 46 // DataPipe for serializing the data section of DecoderBuffer into. |
45 mojo::ScopedDataPipeProducerHandle stream_pipe_; | 47 mojo::ScopedDataPipeProducerHandle stream_pipe_; |
46 | 48 |
47 base::WeakPtrFactory<MojoDemuxerStreamImpl> weak_factory_; | 49 base::WeakPtrFactory<MojoDemuxerStreamImpl> weak_factory_; |
48 DISALLOW_COPY_AND_ASSIGN(MojoDemuxerStreamImpl); | 50 DISALLOW_COPY_AND_ASSIGN(MojoDemuxerStreamImpl); |
49 }; | 51 }; |
50 | 52 |
51 } // namespace media | 53 } // namespace media |
52 | 54 |
53 #endif // MEDIA_MOJO_SERVICES_MOJO_DEMUXER_STREAM_IMPL_H_ | 55 #endif // MEDIA_MOJO_SERVICES_MOJO_DEMUXER_STREAM_IMPL_H_ |
OLD | NEW |