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 #include "chromecast/media/cma/decoder/cast_audio_decoder.h" | 5 #include "chromecast/media/cma/decoder/cast_audio_decoder.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 | 8 |
9 namespace chromecast { | 9 namespace chromecast { |
10 namespace media { | 10 namespace media { |
11 | 11 |
12 // static | 12 // static |
13 scoped_ptr<CastAudioDecoder> CastAudioDecoder::Create( | 13 std::unique_ptr<CastAudioDecoder> CastAudioDecoder::Create( |
14 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, | 14 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, |
15 const media::AudioConfig& config, | 15 const media::AudioConfig& config, |
16 OutputFormat output_format, | 16 OutputFormat output_format, |
17 const InitializedCallback& initialized_callback) { | 17 const InitializedCallback& initialized_callback) { |
18 return scoped_ptr<CastAudioDecoder>(); | 18 return std::unique_ptr<CastAudioDecoder>(); |
19 } | 19 } |
20 | 20 |
21 // static | 21 // static |
22 int CastAudioDecoder::OutputFormatSizeInBytes( | 22 int CastAudioDecoder::OutputFormatSizeInBytes( |
23 CastAudioDecoder::OutputFormat format) { | 23 CastAudioDecoder::OutputFormat format) { |
24 switch (format) { | 24 switch (format) { |
25 case CastAudioDecoder::OutputFormat::kOutputSigned16: | 25 case CastAudioDecoder::OutputFormat::kOutputSigned16: |
26 return 2; | 26 return 2; |
27 case CastAudioDecoder::OutputFormat::kOutputPlanarFloat: | 27 case CastAudioDecoder::OutputFormat::kOutputPlanarFloat: |
28 return 4; | 28 return 4; |
29 } | 29 } |
30 NOTREACHED(); | 30 NOTREACHED(); |
31 return 1; | 31 return 1; |
32 } | 32 } |
33 | 33 |
34 } // namespace media | 34 } // namespace media |
35 } // namespace chromecast | 35 } // namespace chromecast |
OLD | NEW |