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

Unified Diff: media/audio/audio_manager_base.cc

Issue 2466463005: Support (E)AC3 passthrough
Patch Set: Improve CastMediaClient::IsSupportedPassthroughAudio() 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 side-by-side diff with in-line comments
Download patch
Index: media/audio/audio_manager_base.cc
diff --git a/media/audio/audio_manager_base.cc b/media/audio/audio_manager_base.cc
index 944156c66c6f8e9eb1e561ea1896b01a9c05a083..f2771081bc3a3520c05d104bce528d7c2428ea30 100644
--- a/media/audio/audio_manager_base.cc
+++ b/media/audio/audio_manager_base.cc
@@ -136,6 +136,10 @@ AudioOutputStream* AudioManagerBase::MakeAudioOutputStream(
case AudioParameters::AUDIO_PCM_LOW_LATENCY:
stream = MakeLowLatencyOutputStream(params, device_id, log_callback);
break;
+ case AudioParameters::AUDIO_RAW_AC3:
+ case AudioParameters::AUDIO_RAW_EAC3:
+ stream = MakeRawOutputStream(params, device_id, log_callback);
+ break;
case AudioParameters::AUDIO_FAKE:
stream = FakeAudioOutputStream::MakeFakeStream(this, params);
break;
@@ -151,6 +155,13 @@ AudioOutputStream* AudioManagerBase::MakeAudioOutputStream(
return stream;
}
+AudioOutputStream* AudioManagerBase::MakeRawOutputStream(
+ const AudioParameters& params,
+ const std::string& device_id,
+ const LogCallback& log_callback) {
+ return nullptr;
+}
+
AudioInputStream* AudioManagerBase::MakeAudioInputStream(
const AudioParameters& params,
const std::string& device_id,
@@ -254,7 +265,8 @@ AudioOutputStream* AudioManagerBase::MakeAudioOutputStreamProxy(
const base::TimeDelta kCloseDelay =
base::TimeDelta::FromSeconds(kStreamCloseDelaySeconds);
scoped_refptr<AudioOutputDispatcher> dispatcher;
- if (output_params.format() != AudioParameters::AUDIO_FAKE) {
+ if (output_params.format() != AudioParameters::AUDIO_FAKE &&
+ !output_params.IsRawFormat()) {
dispatcher = new AudioOutputResampler(this, params, output_params,
output_device_id,
kCloseDelay);

Powered by Google App Engine
This is Rietveld 408576698