summaryrefslogtreecommitdiffstats
path: root/media/base/audio_decoder_config.h
diff options
context:
space:
mode:
authorscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-26 23:21:03 +0000
committerscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-26 23:21:03 +0000
commit08bff2cc79f4fd0b5f78f8b07babf2c6bbb4a9c0 (patch)
tree59ade6118ab9e3a9ff70eedbcf468cc2b2934fb6 /media/base/audio_decoder_config.h
parentb481edbd6eb1803a01704f0c7d3aeeda7f1ec962 (diff)
downloadchromium_src-08bff2cc79f4fd0b5f78f8b07babf2c6bbb4a9c0.zip
chromium_src-08bff2cc79f4fd0b5f78f8b07babf2c6bbb4a9c0.tar.gz
chromium_src-08bff2cc79f4fd0b5f78f8b07babf2c6bbb4a9c0.tar.bz2
Replace AudioDecoder::media_format() with AudioDecoderConfig.
Also includes some cleanup for AudioParameter users including a new helper method GetBytesPerSecond(). BUG=28206 TEST=media_unittests, test_shell_tests, etc... Review URL: http://codereview.chromium.org/6903007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83098 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/audio_decoder_config.h')
-rw-r--r--media/base/audio_decoder_config.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/media/base/audio_decoder_config.h b/media/base/audio_decoder_config.h
new file mode 100644
index 0000000..791d2cd
--- /dev/null
+++ b/media/base/audio_decoder_config.h
@@ -0,0 +1,24 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MEDIA_BASE_AUDIO_DECODER_CONFIG_H_
+#define MEDIA_BASE_AUDIO_DECODER_CONFIG_H_
+
+namespace media {
+
+struct AudioDecoderConfig {
+ AudioDecoderConfig(int bits, int channels, int rate)
+ : bits_per_channel(bits),
+ channels_per_sample(channels),
+ sample_rate(rate) {
+ }
+
+ int bits_per_channel;
+ int channels_per_sample;
+ int sample_rate;
+};
+
+} // namespace media
+
+#endif // MEDIA_BASE_AUDIO_DECODER_CONFIG_H_