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 3 // found in the LICENSE file. 4 5 #include "media/base/media_switches.h" 6 7 namespace switches { 8 9 // Allow users to specify a custom buffer size for debugging purpose. 10 const char kAudioBufferSize[] = "audio-buffer-size"; 11 12 // Enable EAC3 playback in MSE. 13 const char kEnableEac3Playback[] = "enable-eac3-playback"; 14 15 // Enables Opus playback in media elements. 16 const char kEnableOpusPlayback[] = "enable-opus-playback"; 17 18 // Enables VP8 Alpha playback in media elements. 19 const char kEnableVp8AlphaPlayback[] = "enable-vp8-alpha-playback"; 20 21 // Set number of threads to use for video decoding. 22 const char kVideoThreads[] = "video-threads"; 23 24 // Override suppressed responses to canPlayType(). 25 const char kOverrideEncryptedMediaCanPlayType[] = 26 "override-encrypted-media-canplaytype"; 27 28 #if defined(GOOGLE_TV) 29 // Use external video surface for video with more than or equal pixels to 30 // specified value. For example, value of 0 will enable external video surface 31 // for all videos, and value of 921600 (=1280*720) will enable external video 32 // surface for 720p video and larger. 33 const char kUseExternalVideoSurfaceThresholdInPixels[] = 34 "use-external-video-surface-threshold-in-pixels"; 35 #endif 36 37 #if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_SOLARIS) 38 // The Alsa device to use when opening an audio input stream. 39 const char kAlsaInputDevice[] = "alsa-input-device"; 40 // The Alsa device to use when opening an audio stream. 41 const char kAlsaOutputDevice[] = "alsa-output-device"; 42 #endif 43 44 #if defined(OS_MACOSX) 45 // Unlike other platforms, OSX requires CoreAudio calls to happen on the main 46 // thread of the process. Provide a way to disable this until support is well 47 // tested. See http://crbug.com/158170. 48 // TODO(dalecurtis): Remove this once we're sure nothing has exploded. 49 const char kDisableMainThreadAudio[] = "disable-main-thread-audio"; 50 #endif 51 52 #if defined(OS_WIN) 53 // Use exclusive mode audio streaming for Windows Vista and higher. 54 // Leads to lower latencies for audio streams which uses the 55 // AudioParameters::AUDIO_PCM_LOW_LATENCY audio path. 56 // See http://msdn.microsoft.com/en-us/library/windows/desktop/dd370844.aspx 57 // for details. 58 const char kEnableExclusiveAudio[] = "enable-exclusive-audio"; 59 60 // Used to troubleshoot problems with different video capture implementations 61 // on Windows. By default we use the Media Foundation API on Windows 7 and up, 62 // but specifying this switch will force use of DirectShow always. 63 // See bug: http://crbug.com/268412 64 const char kForceDirectShowVideoCapture[] = "force-directshow"; 65 66 // Use Windows WaveOut/In audio API even if Core Audio is supported. 67 const char kForceWaveAudio[] = "force-wave-audio"; 68 69 // Instead of always using the hardware channel layout, check if a driver 70 // supports the source channel layout. Avoids outputting empty channels and 71 // permits drivers to enable stereo to multichannel expansion. Kept behind a 72 // flag since some drivers lie about supported layouts and hang when used. See 73 // http://crbug.com/259165 for more details. 74 const char kTrySupportedChannelLayouts[] = "try-supported-channel-layouts"; 75 76 // Number of buffers to use for WaveOut. 77 const char kWaveOutBuffers[] = "waveout-buffers"; 78 #endif 79 80 #if defined(USE_CRAS) 81 // Use CRAS, the ChromeOS audio server. 82 const char kUseCras[] = "use-cras"; 83 #endif 84 85 } // namespace switches 86