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

Unified Diff: chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc

Issue 1767603003: [chromecast] Add cast_shell --accept-resource-provider switch (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: use kSwitchValue{True,False} and fix DONOTSUBMIT comment Created 4 years, 9 months 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
« chromecast/base/chromecast_switches.cc ('K') | « chromecast/chromecast_tests.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc
diff --git a/chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc b/chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc
index 2f1afc7f9d41a45cb4cbe59754ca1fec65ae1e95..08c203647b16394813d3a456e83240ac06974f61 100644
--- a/chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc
+++ b/chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc
@@ -256,9 +256,13 @@ void StreamMixerAlsa::DefineAlsaParameters() {
}
alsa_avail_min_ = avail_min;
+ // --accept-resource-provider should imply a check close timeout of 0.
+ int default_close_timeout =
+ base::GetSwitchValueBoolean(switches::kAcceptResourceProvider, false)
+ ? 0
+ : kDefaultCheckCloseTimeoutMs;
GetSwitchValueAsNonNegativeInt(switches::kAlsaCheckCloseTimeout,
- kDefaultCheckCloseTimeoutMs,
- &check_close_timeout_);
+ default_close_timeout, &check_close_timeout_);
}
int StreamMixerAlsa::SetAlsaPlaybackParams() {
« chromecast/base/chromecast_switches.cc ('K') | « chromecast/chromecast_tests.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698