OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_PIPELINE_AUDIO_DECODER_SOFTWARE_WRAPPER_H_ | 5 #ifndef CHROMECAST_MEDIA_CMA_PIPELINE_AUDIO_DECODER_SOFTWARE_WRAPPER_H_ |
6 #define CHROMECAST_MEDIA_CMA_PIPELINE_AUDIO_DECODER_SOFTWARE_WRAPPER_H_ | 6 #define CHROMECAST_MEDIA_CMA_PIPELINE_AUDIO_DECODER_SOFTWARE_WRAPPER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
| 10 #include <memory> |
| 11 |
10 #include "base/macros.h" | 12 #include "base/macros.h" |
11 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_ptr.h" | |
13 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
14 #include "chromecast/media/cma/decoder/cast_audio_decoder.h" | 15 #include "chromecast/media/cma/decoder/cast_audio_decoder.h" |
15 #include "chromecast/public/media/media_pipeline_backend.h" | 16 #include "chromecast/public/media/media_pipeline_backend.h" |
16 | 17 |
17 namespace chromecast { | 18 namespace chromecast { |
18 namespace media { | 19 namespace media { |
19 | 20 |
20 // Provides transparent software decoding if the backend does not support the | 21 // Provides transparent software decoding if the backend does not support the |
21 // incoming audio config. | 22 // incoming audio config. |
22 class AudioDecoderSoftwareWrapper | 23 class AudioDecoderSoftwareWrapper |
(...skipping 25 matching lines...) Expand all Loading... |
48 void OnPushBufferComplete(MediaPipelineBackend::BufferStatus status) override; | 49 void OnPushBufferComplete(MediaPipelineBackend::BufferStatus status) override; |
49 void OnEndOfStream() override; | 50 void OnEndOfStream() override; |
50 void OnDecoderError() override; | 51 void OnDecoderError() override; |
51 void OnKeyStatusChanged(const std::string& key_id, | 52 void OnKeyStatusChanged(const std::string& key_id, |
52 CastKeyStatus key_status, | 53 CastKeyStatus key_status, |
53 uint32_t system_code) override; | 54 uint32_t system_code) override; |
54 void OnVideoResolutionChanged(const Size& size) override; | 55 void OnVideoResolutionChanged(const Size& size) override; |
55 | 56 |
56 MediaPipelineBackend::AudioDecoder* const backend_decoder_; | 57 MediaPipelineBackend::AudioDecoder* const backend_decoder_; |
57 DecoderDelegate* delegate_; | 58 DecoderDelegate* delegate_; |
58 scoped_ptr<CastAudioDecoder> software_decoder_; | 59 std::unique_ptr<CastAudioDecoder> software_decoder_; |
59 AudioConfig output_config_; | 60 AudioConfig output_config_; |
60 scoped_refptr<DecoderBufferBase> pending_pushed_buffer_; | 61 scoped_refptr<DecoderBufferBase> pending_pushed_buffer_; |
61 | 62 |
62 base::WeakPtrFactory<AudioDecoderSoftwareWrapper> weak_factory_; | 63 base::WeakPtrFactory<AudioDecoderSoftwareWrapper> weak_factory_; |
63 | 64 |
64 DISALLOW_COPY_AND_ASSIGN(AudioDecoderSoftwareWrapper); | 65 DISALLOW_COPY_AND_ASSIGN(AudioDecoderSoftwareWrapper); |
65 }; | 66 }; |
66 | 67 |
67 } // namespace media | 68 } // namespace media |
68 } // namespace chromecast | 69 } // namespace chromecast |
69 | 70 |
70 #endif // CHROMECAST_MEDIA_CMA_PIPELINE_AUDIO_DECODER_SOFTWARE_WRAPPER_H_ | 71 #endif // CHROMECAST_MEDIA_CMA_PIPELINE_AUDIO_DECODER_SOFTWARE_WRAPPER_H_ |
OLD | NEW |