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

Side by Side Diff: media/audio/audio_manager_base.cc

Issue 2503233003: Add enumerations for compressed (E)AC3 sample format (Closed)
Patch Set: 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
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/audio/audio_manager_base.h" 5 #include "media/audio/audio_manager_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 AudioOutputStream* stream; 129 AudioOutputStream* stream;
130 switch (params.format()) { 130 switch (params.format()) {
131 case AudioParameters::AUDIO_PCM_LINEAR: 131 case AudioParameters::AUDIO_PCM_LINEAR:
132 DCHECK(AudioDeviceDescription::IsDefaultDevice(device_id)) 132 DCHECK(AudioDeviceDescription::IsDefaultDevice(device_id))
133 << "AUDIO_PCM_LINEAR supports only the default device."; 133 << "AUDIO_PCM_LINEAR supports only the default device.";
134 stream = MakeLinearOutputStream(params, log_callback); 134 stream = MakeLinearOutputStream(params, log_callback);
135 break; 135 break;
136 case AudioParameters::AUDIO_PCM_LOW_LATENCY: 136 case AudioParameters::AUDIO_PCM_LOW_LATENCY:
137 stream = MakeLowLatencyOutputStream(params, device_id, log_callback); 137 stream = MakeLowLatencyOutputStream(params, device_id, log_callback);
138 break; 138 break;
139 case AudioParameters::AUDIO_BITSTREAM_AC3:
140 case AudioParameters::AUDIO_BITSTREAM_EAC3:
141 // TODO(tsunghung): create passthrough output stream.
DaleCurtis 2016/11/17 00:02:15 NOTREACHED()?
AndyWu 2016/11/17 18:56:55 Done.
142 stream = nullptr;
143 break;
139 case AudioParameters::AUDIO_FAKE: 144 case AudioParameters::AUDIO_FAKE:
140 stream = FakeAudioOutputStream::MakeFakeStream(this, params); 145 stream = FakeAudioOutputStream::MakeFakeStream(this, params);
141 break; 146 break;
142 default: 147 default:
143 stream = NULL; 148 stream = NULL;
144 break; 149 break;
145 } 150 }
146 151
147 if (stream) { 152 if (stream) {
148 ++num_output_streams_; 153 ++num_output_streams_;
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 387
383 return 0; 388 return 0;
384 } 389 }
385 390
386 std::unique_ptr<AudioLog> AudioManagerBase::CreateAudioLog( 391 std::unique_ptr<AudioLog> AudioManagerBase::CreateAudioLog(
387 AudioLogFactory::AudioComponent component) { 392 AudioLogFactory::AudioComponent component) {
388 return audio_log_factory_->CreateAudioLog(component); 393 return audio_log_factory_->CreateAudioLog(component);
389 } 394 }
390 395
391 } // namespace media 396 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698