Home | History | Annotate | Download | only in base
      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 // Set number of threads to use for video decoding.
     13 const char kVideoThreads[] = "video-threads";
     14 
     15 // Bypass autodetection of the upper limit on resolution of streams that can
     16 // be hardware decoded.
     17 const char kIgnoreResolutionLimitsForAcceleratedVideoDecode[] =
     18     "ignore-resolution-limits-for-accelerated-video-decode";
     19 
     20 #if defined(OS_ANDROID)
     21 // Disables the infobar popup for accessing protected media identifier.
     22 const char kDisableInfobarForProtectedMediaIdentifier[] =
     23     "disable-infobar-for-protected-media-identifier";
     24 
     25 // Enables use of non-compositing MediaDrm decoding by default for Encrypted
     26 // Media Extensions implementation.
     27 const char kMediaDrmEnableNonCompositing[] = "mediadrm-enable-non-compositing";
     28 #endif
     29 
     30 #if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_SOLARIS)
     31 // The Alsa device to use when opening an audio input stream.
     32 const char kAlsaInputDevice[] = "alsa-input-device";
     33 // The Alsa device to use when opening an audio stream.
     34 const char kAlsaOutputDevice[] = "alsa-output-device";
     35 #endif
     36 
     37 #if defined(OS_MACOSX)
     38 // AVFoundation is available in versions 10.7 and onwards, and is to be used
     39 // http://crbug.com/288562 for both audio and video device monitoring and for
     40 // video capture. Being a dynamically loaded NSBundle and library, it hits the
     41 // Chrome startup time (http://crbug.com/311325 and http://crbug.com/311437);
     42 // for experimentation purposes, in particular library load time issue, the
     43 // usage of this library can be enabled by using this flag.
     44 const char kEnableAVFoundation[] = "enable-avfoundation";
     45 
     46 // QTKit is the media capture API predecessor to AVFoundation, available up and
     47 // until Mac OS X 10.9 (despite being deprecated in this last one). This flag
     48 // is used for troubleshooting and testing, and forces QTKit in builds and
     49 // configurations where AVFoundation would be used otherwise.
     50 const char kForceQTKit[] = "force-qtkit";
     51 #endif
     52 
     53 #if defined(OS_WIN)
     54 // Use exclusive mode audio streaming for Windows Vista and higher.
     55 // Leads to lower latencies for audio streams which uses the
     56 // AudioParameters::AUDIO_PCM_LOW_LATENCY audio path.
     57 // See http://msdn.microsoft.com/en-us/library/windows/desktop/dd370844.aspx
     58 // for details.
     59 const char kEnableExclusiveAudio[] = "enable-exclusive-audio";
     60 
     61 // Used to troubleshoot problems with different video capture implementations
     62 // on Windows.  By default we use the Media Foundation API on Windows 7 and up,
     63 // but specifying this switch will force use of DirectShow always.
     64 // See bug: http://crbug.com/268412
     65 const char kForceDirectShowVideoCapture[] = "force-directshow";
     66 
     67 // Force the use of MediaFoundation for video capture. This is only supported in
     68 // Windows 7 and above. Used, like |kForceDirectShowVideoCapture|, to
     69 // troubleshoot problems in Windows platforms.
     70 const char kForceMediaFoundationVideoCapture[] = "force-mediafoundation";
     71 
     72 // Use Windows WaveOut/In audio API even if Core Audio is supported.
     73 const char kForceWaveAudio[] = "force-wave-audio";
     74 
     75 // Instead of always using the hardware channel layout, check if a driver
     76 // supports the source channel layout.  Avoids outputting empty channels and
     77 // permits drivers to enable stereo to multichannel expansion.  Kept behind a
     78 // flag since some drivers lie about supported layouts and hang when used.  See
     79 // http://crbug.com/259165 for more details.
     80 const char kTrySupportedChannelLayouts[] = "try-supported-channel-layouts";
     81 
     82 // Number of buffers to use for WaveOut.
     83 const char kWaveOutBuffers[] = "waveout-buffers";
     84 #endif
     85 
     86 #if defined(USE_CRAS)
     87 // Use CRAS, the ChromeOS audio server.
     88 const char kUseCras[] = "use-cras";
     89 #endif
     90 
     91 // Use fake device for Media Stream to replace actual camera and microphone.
     92 const char kUseFakeDeviceForMediaStream[] = "use-fake-device-for-media-stream";
     93 
     94 // Use a raw video file as fake video capture device.
     95 const char kUseFileForFakeVideoCapture[] = "use-file-for-fake-video-capture";
     96 
     97 // Enables support for inband text tracks in media content.
     98 const char kEnableInbandTextTracks[] = "enable-inband-text-tracks";
     99 
    100 }  // namespace switches
    101