OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BASE_AUDIO_DECODER_CONFIG_H_ | 5 #ifndef MEDIA_BASE_AUDIO_DECODER_CONFIG_H_ |
6 #define MEDIA_BASE_AUDIO_DECODER_CONFIG_H_ | 6 #define MEDIA_BASE_AUDIO_DECODER_CONFIG_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "media/base/channel_layout.h" | 10 #include "media/base/channel_layout.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 kCodecAMR_WB, | 28 kCodecAMR_WB, |
29 kCodecPCM_MULAW, | 29 kCodecPCM_MULAW, |
30 // DO NOT ADD RANDOM AUDIO CODECS! | 30 // DO NOT ADD RANDOM AUDIO CODECS! |
31 // | 31 // |
32 // The only acceptable time to add a new codec is if there is production code | 32 // The only acceptable time to add a new codec is if there is production code |
33 // that uses said codec in the same CL. | 33 // that uses said codec in the same CL. |
34 | 34 |
35 kAudioCodecMax = kCodecPCM_MULAW // Must equal the last "real" codec above. | 35 kAudioCodecMax = kCodecPCM_MULAW // Must equal the last "real" codec above. |
36 }; | 36 }; |
37 | 37 |
| 38 // TODO(dalecurtis): FFmpeg API uses |bytes_per_channel| instead of |
| 39 // |bits_per_channel|, we should switch over since bits are generally confusing |
| 40 // to work with. |
38 class MEDIA_EXPORT AudioDecoderConfig { | 41 class MEDIA_EXPORT AudioDecoderConfig { |
39 public: | 42 public: |
40 // Constructs an uninitialized object. Clients should call Initialize() with | 43 // Constructs an uninitialized object. Clients should call Initialize() with |
41 // appropriate values before using. | 44 // appropriate values before using. |
42 AudioDecoderConfig(); | 45 AudioDecoderConfig(); |
43 | 46 |
44 // Constructs an initialized object. It is acceptable to pass in NULL for | 47 // Constructs an initialized object. It is acceptable to pass in NULL for |
45 // |extra_data|, otherwise the memory is copied. | 48 // |extra_data|, otherwise the memory is copied. |
46 AudioDecoderConfig(AudioCodec codec, int bits_per_channel, | 49 AudioDecoderConfig(AudioCodec codec, int bits_per_channel, |
47 ChannelLayout channel_layout, int samples_per_second, | 50 ChannelLayout channel_layout, int samples_per_second, |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 | 83 |
81 scoped_array<uint8> extra_data_; | 84 scoped_array<uint8> extra_data_; |
82 size_t extra_data_size_; | 85 size_t extra_data_size_; |
83 | 86 |
84 DISALLOW_COPY_AND_ASSIGN(AudioDecoderConfig); | 87 DISALLOW_COPY_AND_ASSIGN(AudioDecoderConfig); |
85 }; | 88 }; |
86 | 89 |
87 } // namespace media | 90 } // namespace media |
88 | 91 |
89 #endif // MEDIA_BASE_AUDIO_DECODER_CONFIG_H_ | 92 #endif // MEDIA_BASE_AUDIO_DECODER_CONFIG_H_ |
OLD | NEW |