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 // Enable EAC3 playback in MSE.
     13 const char kEnableEac3Playback[] = "enable-eac3-playback";
     14 
     15 // Disables Opus playback in media elements.
     16 const char kDisableOpusPlayback[] = "disable-opus-playback";
     17 
     18 // Disables VP8 Alpha playback in media elements.
     19 const char kDisableVp8AlphaPlayback[] = "disable-vp8-alpha-playback";
     20 
     21 // Set number of threads to use for video decoding.
     22 const char kVideoThreads[] = "video-threads";
     23 
     24 // Enables MP3 stream parser for Media Source Extensions.
     25 const char kEnableMP3StreamParser[] = "enable-mp3-stream-parser";
     26 
     27 #if defined(OS_ANDROID)
     28 // Disables the infobar popup for accessing protected media identifier.
     29 const char kDisableInfobarForProtectedMediaIdentifier[] =
     30     "disable-infobar-for-protected-media-identifier";
     31 
     32 // Enables use of non-compositing MediaDrm decoding by default for Encrypted
     33 // Media Extensions implementation.
     34 const char kMediaDrmEnableNonCompositing[] = "mediadrm-enable-non-compositing";
     35 #endif
     36 
     37 #if defined(GOOGLE_TV)
     38 // Use external video surface for video with more than or equal pixels to
     39 // specified value. For example, value of 0 will enable external video surface
     40 // for all videos, and value of 921600 (=1280*720) will enable external video
     41 // surface for 720p video and larger.
     42 const char kUseExternalVideoSurfaceThresholdInPixels[] =
     43     "use-external-video-surface-threshold-in-pixels";
     44 #endif
     45 
     46 #if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_SOLARIS)
     47 // The Alsa device to use when opening an audio input stream.
     48 const char kAlsaInputDevice[] = "alsa-input-device";
     49 // The Alsa device to use when opening an audio stream.
     50 const char kAlsaOutputDevice[] = "alsa-output-device";
     51 #endif
     52 
     53 #if defined(OS_MACOSX)
     54 // Unlike other platforms, OSX requires CoreAudio calls to happen on the main
     55 // thread of the process.  Provide a way to disable this until support is well
     56 // tested.  See http://crbug.com/158170.
     57 // TODO(dalecurtis): Remove this once we're sure nothing has exploded.
     58 const char kDisableMainThreadAudio[] = "disable-main-thread-audio";
     59 // AVFoundation is available in versions 10.7 and onwards, and is to be used
     60 // http://crbug.com/288562 for both audio and video device monitoring and for
     61 // video capture. Being a dynamically loaded NSBundle and library, it hits the
     62 // Chrome startup time (http://crbug.com/311325 and http://crbug.com/311437);
     63 // until development is finished and the library load time issue is solved, the
     64 // usage of this library is hidden behind this flag.
     65 const char kEnableAVFoundation[] = "enable-avfoundation";
     66 #endif
     67 
     68 #if defined(OS_WIN)
     69 // Use exclusive mode audio streaming for Windows Vista and higher.
     70 // Leads to lower latencies for audio streams which uses the
     71 // AudioParameters::AUDIO_PCM_LOW_LATENCY audio path.
     72 // See http://msdn.microsoft.com/en-us/library/windows/desktop/dd370844.aspx
     73 // for details.
     74 const char kEnableExclusiveAudio[] = "enable-exclusive-audio";
     75 
     76 // Used to troubleshoot problems with different video capture implementations
     77 // on Windows.  By default we use the Media Foundation API on Windows 7 and up,
     78 // but specifying this switch will force use of DirectShow always.
     79 // See bug: http://crbug.com/268412
     80 const char kForceDirectShowVideoCapture[] = "force-directshow";
     81 
     82 // Use Windows WaveOut/In audio API even if Core Audio is supported.
     83 const char kForceWaveAudio[] = "force-wave-audio";
     84 
     85 // Instead of always using the hardware channel layout, check if a driver
     86 // supports the source channel layout.  Avoids outputting empty channels and
     87 // permits drivers to enable stereo to multichannel expansion.  Kept behind a
     88 // flag since some drivers lie about supported layouts and hang when used.  See
     89 // http://crbug.com/259165 for more details.
     90 const char kTrySupportedChannelLayouts[] = "try-supported-channel-layouts";
     91 
     92 // Number of buffers to use for WaveOut.
     93 const char kWaveOutBuffers[] = "waveout-buffers";
     94 #endif
     95 
     96 #if defined(USE_CRAS)
     97 // Use CRAS, the ChromeOS audio server.
     98 const char kUseCras[] = "use-cras";
     99 #endif
    100 
    101 // Disables system sounds manager.
    102 const char kDisableSystemSoundsManager[] = "disable-system-sounds-manager";
    103 
    104 // Use a raw video file as fake video capture device.
    105 const char kUseFileForFakeVideoCapture[] = "use-file-for-fake-video-capture";
    106 
    107 }  // namespace switches
    108