15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Copyright (c) 2012 The Chromium Authors. All rights reserved. 25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// found in the LICENSE file. 45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 55821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "media/base/media_switches.h" 65821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 75821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)namespace switches { 85821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 92a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Allow users to specify a custom buffer size for debugging purpose. 102a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)const char kAudioBufferSize[] = "audio-buffer-size"; 112a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 12868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// Set number of threads to use for video decoding. 13868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)const char kVideoThreads[] = "video-threads"; 14868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) 15cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)// Bypass autodetection of the upper limit on resolution of streams that can 16cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)// be hardware decoded. 17cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)const char kIgnoreResolutionLimitsForAcceleratedVideoDecode[] = 18cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) "ignore-resolution-limits-for-accelerated-video-decode"; 195d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2058537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)#if defined(OS_ANDROID) 2168043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)// Disables the infobar popup for accessing protected media identifier. 2268043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)const char kDisableInfobarForProtectedMediaIdentifier[] = 2368043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles) "disable-infobar-for-protected-media-identifier"; 2468043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles) 2558537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)// Enables use of non-compositing MediaDrm decoding by default for Encrypted 2658537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)// Media Extensions implementation. 2758537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)const char kMediaDrmEnableNonCompositing[] = "mediadrm-enable-non-compositing"; 2858537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)#endif 2958537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) 305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_SOLARIS) 315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// The Alsa device to use when opening an audio input stream. 325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kAlsaInputDevice[] = "alsa-input-device"; 33868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// The Alsa device to use when opening an audio stream. 34868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)const char kAlsaOutputDevice[] = "alsa-output-device"; 355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif 365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 37868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)#if defined(OS_MACOSX) 38f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)// AVFoundation is available in versions 10.7 and onwards, and is to be used 39f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)// http://crbug.com/288562 for both audio and video device monitoring and for 40f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)// video capture. Being a dynamically loaded NSBundle and library, it hits the 41f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)// Chrome startup time (http://crbug.com/311325 and http://crbug.com/311437); 425d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// for experimentation purposes, in particular library load time issue, the 43a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)// usage of this library can be enabled by using this flag. 44a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)const char kEnableAVFoundation[] = "enable-avfoundation"; 45cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 46010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)// QTKit is the media capture API predecessor to AVFoundation, available up and 47010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)// until Mac OS X 10.9 (despite being deprecated in this last one). This flag 48010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)// is used for troubleshooting and testing, and forces QTKit in builds and 49010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)// configurations where AVFoundation would be used otherwise. 50010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)const char kForceQTKit[] = "force-qtkit"; 515821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif 525821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 535821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#if defined(OS_WIN) 545821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Use exclusive mode audio streaming for Windows Vista and higher. 555821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Leads to lower latencies for audio streams which uses the 565821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// AudioParameters::AUDIO_PCM_LOW_LATENCY audio path. 57868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// See http://msdn.microsoft.com/en-us/library/windows/desktop/dd370844.aspx 585821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// for details. 595821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableExclusiveAudio[] = "enable-exclusive-audio"; 605821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 61ba5b9a6411cb1792fd21f0a078d7a25cd1ceec16Ben Murdoch// Used to troubleshoot problems with different video capture implementations 62ba5b9a6411cb1792fd21f0a078d7a25cd1ceec16Ben Murdoch// on Windows. By default we use the Media Foundation API on Windows 7 and up, 63ba5b9a6411cb1792fd21f0a078d7a25cd1ceec16Ben Murdoch// but specifying this switch will force use of DirectShow always. 64ba5b9a6411cb1792fd21f0a078d7a25cd1ceec16Ben Murdoch// See bug: http://crbug.com/268412 65ba5b9a6411cb1792fd21f0a078d7a25cd1ceec16Ben Murdochconst char kForceDirectShowVideoCapture[] = "force-directshow"; 66ba5b9a6411cb1792fd21f0a078d7a25cd1ceec16Ben Murdoch 675d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// Force the use of MediaFoundation for video capture. This is only supported in 685d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// Windows 7 and above. Used, like |kForceDirectShowVideoCapture|, to 695d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// troubleshoot problems in Windows platforms. 705d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)const char kForceMediaFoundationVideoCapture[] = "force-mediafoundation"; 715d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 72c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)// Use Windows WaveOut/In audio API even if Core Audio is supported. 73c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)const char kForceWaveAudio[] = "force-wave-audio"; 74c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) 753551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)// Instead of always using the hardware channel layout, check if a driver 763551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)// supports the source channel layout. Avoids outputting empty channels and 773551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)// permits drivers to enable stereo to multichannel expansion. Kept behind a 783551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)// flag since some drivers lie about supported layouts and hang when used. See 793551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)// http://crbug.com/259165 for more details. 803551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)const char kTrySupportedChannelLayouts[] = "try-supported-channel-layouts"; 813551c9c881056c480085172ff9840cab31610854Torne (Richard Coles) 82868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// Number of buffers to use for WaveOut. 832a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)const char kWaveOutBuffers[] = "waveout-buffers"; 842a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#endif 852a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 86868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)#if defined(USE_CRAS) 87868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// Use CRAS, the ChromeOS audio server. 88868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)const char kUseCras[] = "use-cras"; 89b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)#endif 90b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles) 91cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)// Use fake device for Media Stream to replace actual camera and microphone. 92cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)const char kUseFakeDeviceForMediaStream[] = "use-fake-device-for-media-stream"; 93cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 94a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)// Use a raw video file as fake video capture device. 95a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)const char kUseFileForFakeVideoCapture[] = "use-file-for-fake-video-capture"; 96a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles) 971320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci// Enables support for inband text tracks in media content. 981320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucciconst char kEnableInbandTextTracks[] = "enable-inband-text-tracks"; 991320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci 1005821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)} // namespace switches 101