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 CHROMECAST_MEDIA_CMA_BASE_AUDIO_PIPELINE_IMPL_H_ | 5 #ifndef CHROMECAST_MEDIA_CMA_BASE_AUDIO_PIPELINE_IMPL_H_ |
6 #define CHROMECAST_MEDIA_CMA_BASE_AUDIO_PIPELINE_IMPL_H_ | 6 #define CHROMECAST_MEDIA_CMA_BASE_AUDIO_PIPELINE_IMPL_H_ |
7 | 7 |
| 8 #include <memory> |
8 #include <vector> | 9 #include <vector> |
9 | 10 |
10 #include "base/macros.h" | 11 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "chromecast/media/cma/pipeline/av_pipeline_client.h" | 12 #include "chromecast/media/cma/pipeline/av_pipeline_client.h" |
13 #include "chromecast/media/cma/pipeline/av_pipeline_impl.h" | 13 #include "chromecast/media/cma/pipeline/av_pipeline_impl.h" |
14 #include "chromecast/public/media/media_pipeline_backend.h" | 14 #include "chromecast/public/media/media_pipeline_backend.h" |
15 #include "chromecast/public/media/stream_id.h" | 15 #include "chromecast/public/media/stream_id.h" |
16 #include "media/base/pipeline_status.h" | 16 #include "media/base/pipeline_status.h" |
17 | 17 |
18 namespace media { | 18 namespace media { |
19 class AudioDecoderConfig; | 19 class AudioDecoderConfig; |
20 class VideoDecoderConfig; | 20 class VideoDecoderConfig; |
21 } | 21 } |
22 | 22 |
23 namespace chromecast { | 23 namespace chromecast { |
24 namespace media { | 24 namespace media { |
25 class CodedFrameProvider; | 25 class CodedFrameProvider; |
26 | 26 |
27 class AudioPipelineImpl : public AvPipelineImpl { | 27 class AudioPipelineImpl : public AvPipelineImpl { |
28 public: | 28 public: |
29 AudioPipelineImpl(MediaPipelineBackend::AudioDecoder* decoder, | 29 AudioPipelineImpl(MediaPipelineBackend::AudioDecoder* decoder, |
30 const AvPipelineClient& client); | 30 const AvPipelineClient& client); |
31 ~AudioPipelineImpl() override; | 31 ~AudioPipelineImpl() override; |
32 | 32 |
33 ::media::PipelineStatus Initialize( | 33 ::media::PipelineStatus Initialize( |
34 const ::media::AudioDecoderConfig& config, | 34 const ::media::AudioDecoderConfig& config, |
35 scoped_ptr<CodedFrameProvider> frame_provider); | 35 std::unique_ptr<CodedFrameProvider> frame_provider); |
36 | 36 |
37 void SetVolume(float volume); | 37 void SetVolume(float volume); |
38 | 38 |
39 // AvPipelineImpl implementation: | 39 // AvPipelineImpl implementation: |
40 void UpdateStatistics() override; | 40 void UpdateStatistics() override; |
41 | 41 |
42 private: | 42 private: |
43 // AvPipelineImpl implementation: | 43 // AvPipelineImpl implementation: |
44 void OnUpdateConfig(StreamId id, | 44 void OnUpdateConfig(StreamId id, |
45 const ::media::AudioDecoderConfig& audio_config, | 45 const ::media::AudioDecoderConfig& audio_config, |
46 const ::media::VideoDecoderConfig& video_config) override; | 46 const ::media::VideoDecoderConfig& video_config) override; |
47 | 47 |
48 MediaPipelineBackend::AudioDecoder* const audio_decoder_; | 48 MediaPipelineBackend::AudioDecoder* const audio_decoder_; |
49 | 49 |
50 DISALLOW_COPY_AND_ASSIGN(AudioPipelineImpl); | 50 DISALLOW_COPY_AND_ASSIGN(AudioPipelineImpl); |
51 }; | 51 }; |
52 | 52 |
53 } // namespace media | 53 } // namespace media |
54 } // namespace chromecast | 54 } // namespace chromecast |
55 | 55 |
56 #endif // CHROMECAST_MEDIA_CMA_BASE_AUDIO_PIPELINE_IMPL_H_ | 56 #endif // CHROMECAST_MEDIA_CMA_BASE_AUDIO_PIPELINE_IMPL_H_ |
OLD | NEW |