diff options
author | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-26 23:21:03 +0000 |
---|---|---|
committer | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-26 23:21:03 +0000 |
commit | 08bff2cc79f4fd0b5f78f8b07babf2c6bbb4a9c0 (patch) | |
tree | 59ade6118ab9e3a9ff70eedbcf468cc2b2934fb6 /media/audio/audio_parameters.h | |
parent | b481edbd6eb1803a01704f0c7d3aeeda7f1ec962 (diff) | |
download | chromium_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/audio/audio_parameters.h')
-rw-r--r-- | media/audio/audio_parameters.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/media/audio/audio_parameters.h b/media/audio/audio_parameters.h index 2842bc1..ac08067 100644 --- a/media/audio/audio_parameters.h +++ b/media/audio/audio_parameters.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// 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. @@ -6,6 +6,7 @@ #define MEDIA_AUDIO_AUDIO_PARAMETERS_H_ #include "base/basictypes.h" +#include "media/base/audio_decoder_config.h" struct AudioParameters { // Compare is useful when AudioParameters is used as a key in std::map. @@ -30,6 +31,8 @@ struct AudioParameters { AudioParameters(); + explicit AudioParameters(const media::AudioDecoderConfig& config); + AudioParameters(Format format, int channels, int sample_rate, int bits_per_sample, int samples_per_packet); @@ -40,6 +43,9 @@ struct AudioParameters { // Returns size of audio packets in bytes. int GetPacketSize() const; + // Returns the number of bytes representing one second of audio. + int GetBytesPerSecond() const; + Format format; // Format of the stream. int channels; // Number of channels. int sample_rate; // Sampling frequency/rate. |