OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef MEDIA_BASE_AUDIO_DECODER_CONFIG_H_ | |
6 #define MEDIA_BASE_AUDIO_DECODER_CONFIG_H_ | |
7 | |
8 #include "base/basictypes.h" | |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "media/base/channel_layout.h" | |
11 #include "media/base/media_export.h" | |
12 | |
13 namespace media { | |
14 | |
15 enum AudioCodec { | |
16 kUnknownAudioCodec, | |
17 kCodecAAC, | |
18 kCodecMP3, | |
19 kCodecPCM, | |
20 kCodecVorbis, | |
21 | |
22 // DO NOT ADD RANDOM AUDIO CODECS! | |
23 // | |
24 // The only acceptable time to add a new codec is if there is production code | |
25 // that uses said codec in the same CL. | |
26 }; | |
27 | |
28 class MEDIA_EXPORT AudioDecoderConfig { | |
29 public: | |
30 AudioDecoderConfig(AudioCodec codec, int bits_per_channel, | |
31 ChannelLayout channel_layout, int sample_rate, | |
32 const uint8* extra_data, size_t extra_data_size); | |
Ami GONE FROM CHROMIUM
2011/09/12 20:54:21
Document (lack of) ownership semantics of |extra_d
scherkus (not reviewing)
2011/09/19 21:19:45
Done.
| |
33 ~AudioDecoderConfig(); | |
34 | |
35 AudioCodec codec() const; | |
36 int bits_per_channel() const; | |
37 ChannelLayout channel_layout() const; | |
38 int sample_rate() const; | |
39 uint8* extra_data() const; | |
40 size_t extra_data_size() const; | |
41 | |
42 private: | |
43 AudioCodec codec_; | |
44 int bits_per_channel_; | |
45 ChannelLayout channel_layout_; | |
46 int sample_rate_; | |
Ami GONE FROM CHROMIUM
2011/09/12 20:54:21
comment units?
scherkus (not reviewing)
2011/09/19 21:19:45
This is typically understood to be in Hz but we co
Ami GONE FROM CHROMIUM
2011/09/20 20:34:50
I like that.
| |
47 | |
48 // Optional byte data required to initialize audio decoders. | |
Ami GONE FROM CHROMIUM
2011/09/12 20:54:21
Examples?
Comment might be more useful on public a
scherkus (not reviewing)
2011/09/19 21:19:45
Done.
| |
49 scoped_array<uint8> extra_data_; | |
50 size_t extra_data_size_; | |
51 | |
52 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioDecoderConfig); | |
53 }; | |
54 | |
55 } // namespace media | |
56 | |
57 #endif // MEDIA_BASE_AUDIO_DECODER_CONFIG_H_ | |
OLD | NEW |