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" |
11 #include "media/base/media_export.h" | 11 #include "media/base/media_export.h" |
12 | 12 |
13 namespace media { | 13 namespace media { |
14 | 14 |
15 enum AudioCodec { | 15 enum AudioCodec { |
16 // These values are histogrammed over time; do not change their ordinal | 16 // These values are histogrammed over time; do not change their ordinal |
17 // values. When deleting a codec replace it with a dummy value; when adding a | 17 // values. When deleting a codec replace it with a dummy value; when adding a |
18 // codec, do so at the bottom (and update kAudioCodecMax). | 18 // codec, do so at the bottom (and update kAudioCodecMax). |
19 kUnknownAudioCodec = 0, | 19 kUnknownAudioCodec = 0, |
20 kCodecAAC, | 20 kCodecAAC, |
21 kCodecMP3, | 21 kCodecMP3, |
22 kCodecPCM, | 22 kCodecPCM, |
23 kCodecVorbis, | 23 kCodecVorbis, |
24 // ChromiumOS and ChromeOS specific codecs. | 24 // ChromiumOS and ChromeOS specific codecs. |
25 kCodecFLAC, | 25 kCodecFLAC, |
26 // ChromeOS specific codecs. | 26 // ChromeOS specific codecs. |
27 kCodecAMR_NB, | 27 kCodecAMR_NB, |
28 kCodecAMR_WB, | 28 kCodecAMR_WB, |
29 kCodecPCM_MULAW, | 29 kCodecPCM_MULAW, |
| 30 kCodecGSM_MS, |
| 31 kCodecPCM_S16BE, |
| 32 kCodecPCM_S24BE, |
30 // DO NOT ADD RANDOM AUDIO CODECS! | 33 // DO NOT ADD RANDOM AUDIO CODECS! |
31 // | 34 // |
32 // The only acceptable time to add a new codec is if there is production code | 35 // The only acceptable time to add a new codec is if there is production code |
33 // that uses said codec in the same CL. | 36 // that uses said codec in the same CL. |
34 | 37 |
35 kAudioCodecMax = kCodecPCM_MULAW // Must equal the last "real" codec above. | 38 kAudioCodecMax = kCodecPCM_S24BE // Must equal the last "real" codec above. |
36 }; | 39 }; |
37 | 40 |
38 // TODO(dalecurtis): FFmpeg API uses |bytes_per_channel| instead of | 41 // TODO(dalecurtis): FFmpeg API uses |bytes_per_channel| instead of |
39 // |bits_per_channel|, we should switch over since bits are generally confusing | 42 // |bits_per_channel|, we should switch over since bits are generally confusing |
40 // to work with. | 43 // to work with. |
41 class MEDIA_EXPORT AudioDecoderConfig { | 44 class MEDIA_EXPORT AudioDecoderConfig { |
42 public: | 45 public: |
43 // Constructs an uninitialized object. Clients should call Initialize() with | 46 // Constructs an uninitialized object. Clients should call Initialize() with |
44 // appropriate values before using. | 47 // appropriate values before using. |
45 AudioDecoderConfig(); | 48 AudioDecoderConfig(); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 90 |
88 scoped_array<uint8> extra_data_; | 91 scoped_array<uint8> extra_data_; |
89 size_t extra_data_size_; | 92 size_t extra_data_size_; |
90 | 93 |
91 DISALLOW_COPY_AND_ASSIGN(AudioDecoderConfig); | 94 DISALLOW_COPY_AND_ASSIGN(AudioDecoderConfig); |
92 }; | 95 }; |
93 | 96 |
94 } // namespace media | 97 } // namespace media |
95 | 98 |
96 #endif // MEDIA_BASE_AUDIO_DECODER_CONFIG_H_ | 99 #endif // MEDIA_BASE_AUDIO_DECODER_CONFIG_H_ |
OLD | NEW |