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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 bool IsValidConfig() const; | 76 bool IsValidConfig() const; |
77 | 77 |
78 // Returns true if all fields in |config| match this config. | 78 // Returns true if all fields in |config| match this config. |
79 // Note: The contents of |extra_data_| are compared not the raw pointers. | 79 // Note: The contents of |extra_data_| are compared not the raw pointers. |
80 bool Matches(const AudioDecoderConfig& config) const; | 80 bool Matches(const AudioDecoderConfig& config) const; |
81 | 81 |
82 // Returns a human-readable string describing |*this|. For debugging & test | 82 // Returns a human-readable string describing |*this|. For debugging & test |
83 // output only. | 83 // output only. |
84 std::string AsHumanReadableString() const; | 84 std::string AsHumanReadableString() const; |
85 | 85 |
| 86 std::string GetHumanReadableCodecName() const; |
| 87 |
86 AudioCodec codec() const { return codec_; } | 88 AudioCodec codec() const { return codec_; } |
87 int bits_per_channel() const { return bytes_per_channel_ * 8; } | 89 int bits_per_channel() const { return bytes_per_channel_ * 8; } |
88 int bytes_per_channel() const { return bytes_per_channel_; } | 90 int bytes_per_channel() const { return bytes_per_channel_; } |
89 ChannelLayout channel_layout() const { return channel_layout_; } | 91 ChannelLayout channel_layout() const { return channel_layout_; } |
90 int samples_per_second() const { return samples_per_second_; } | 92 int samples_per_second() const { return samples_per_second_; } |
91 SampleFormat sample_format() const { return sample_format_; } | 93 SampleFormat sample_format() const { return sample_format_; } |
92 int bytes_per_frame() const { return bytes_per_frame_; } | 94 int bytes_per_frame() const { return bytes_per_frame_; } |
93 base::TimeDelta seek_preroll() const { return seek_preroll_; } | 95 base::TimeDelta seek_preroll() const { return seek_preroll_; } |
94 int codec_delay() const { return codec_delay_; } | 96 int codec_delay() const { return codec_delay_; } |
95 | 97 |
(...skipping 29 matching lines...) Expand all Loading... |
125 int codec_delay_; | 127 int codec_delay_; |
126 | 128 |
127 // Not using DISALLOW_COPY_AND_ASSIGN here intentionally to allow the compiler | 129 // Not using DISALLOW_COPY_AND_ASSIGN here intentionally to allow the compiler |
128 // generated copy constructor and assignment operator. Since the extra data is | 130 // generated copy constructor and assignment operator. Since the extra data is |
129 // typically small, the performance impact is minimal. | 131 // typically small, the performance impact is minimal. |
130 }; | 132 }; |
131 | 133 |
132 } // namespace media | 134 } // namespace media |
133 | 135 |
134 #endif // MEDIA_BASE_AUDIO_DECODER_CONFIG_H_ | 136 #endif // MEDIA_BASE_AUDIO_DECODER_CONFIG_H_ |
OLD | NEW |