Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(367)

Side by Side Diff: media/base/audio_parameters.cc

Issue 2503233003: Add enumerations for compressed (E)AC3 sample format (Closed)
Patch Set: Fix proto Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/base/audio_parameters.h ('k') | media/base/sample_format.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "media/base/audio_parameters.h" 5 #include "media/base/audio_parameters.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "media/base/limits.h" 8 #include "media/base/limits.h"
9 9
10 namespace media { 10 namespace media {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 bool AudioParameters::Equals(const AudioParameters& other) const { 91 bool AudioParameters::Equals(const AudioParameters& other) const {
92 return format_ == other.format() && sample_rate_ == other.sample_rate() && 92 return format_ == other.format() && sample_rate_ == other.sample_rate() &&
93 channel_layout_ == other.channel_layout() && 93 channel_layout_ == other.channel_layout() &&
94 channels_ == other.channels() && 94 channels_ == other.channels() &&
95 bits_per_sample_ == other.bits_per_sample() && 95 bits_per_sample_ == other.bits_per_sample() &&
96 frames_per_buffer_ == other.frames_per_buffer() && 96 frames_per_buffer_ == other.frames_per_buffer() &&
97 effects_ == other.effects() && mic_positions_ == other.mic_positions_; 97 effects_ == other.effects() && mic_positions_ == other.mic_positions_;
98 } 98 }
99 99
100 bool AudioParameters::IsBitstreamFormat() const {
101 return format_ == AUDIO_BITSTREAM_AC3 || format_ == AUDIO_BITSTREAM_EAC3;
102 }
103
100 // static 104 // static
101 AudioParameters AudioParameters::UnavailableDeviceParams() { 105 AudioParameters AudioParameters::UnavailableDeviceParams() {
102 return media::AudioParameters( 106 return media::AudioParameters(
103 media::AudioParameters::AUDIO_FAKE, media::CHANNEL_LAYOUT_STEREO, 107 media::AudioParameters::AUDIO_FAKE, media::CHANNEL_LAYOUT_STEREO,
104 media::AudioParameters::kAudioCDSampleRate, 16, 108 media::AudioParameters::kAudioCDSampleRate, 16,
105 media::AudioParameters::kAudioCDSampleRate / 10); 109 media::AudioParameters::kAudioCDSampleRate / 10);
106 } 110 }
107 111
108 } // namespace media 112 } // namespace media
OLDNEW
« no previous file with comments | « media/base/audio_parameters.h ('k') | media/base/sample_format.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698