Update V8 to version 4.7.56.
[chromium-blink-merge.git] / media / base / media_switches.cc
blobfb2363b2ab446f98ea9a9311f25fe93565a4971f
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.
5 #include "media/base/media_switches.h"
7 namespace switches {
9 // Allow users to specify a custom buffer size for debugging purpose.
10 const char kAudioBufferSize[] = "audio-buffer-size";
12 // Disables the new vsync driven video renderering path.
13 const char kDisableNewVideoRenderer[] = "disable-new-video-renderer";
15 // Set number of threads to use for video decoding.
16 const char kVideoThreads[] = "video-threads";
18 #if defined(OS_ANDROID)
19 // Sets the MediaSource player that uses the separate media thread
20 const char kEnableMediaThreadForMediaPlayback[] =
21 "enable-media-thread-for-media-playback";
22 #endif
24 #if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_SOLARIS)
25 // The Alsa device to use when opening an audio input stream.
26 const char kAlsaInputDevice[] = "alsa-input-device";
27 // The Alsa device to use when opening an audio stream.
28 const char kAlsaOutputDevice[] = "alsa-output-device";
29 #endif
31 // Use GpuMemoryBuffers for Video Capture when this is an option for the device.
32 // Experimental, see http://crbug.com/503835 and http://crbug.com/440843.
33 const char kUseGpuMemoryBuffersForCapture[] =
34 "use-gpu-memory-buffers-for-capture";
36 #if defined(OS_MACOSX)
37 // AVFoundation is available in versions 10.7 and onwards, and is to be used
38 // http://crbug.com/288562 for both audio and video device monitoring and for
39 // video capture. Being a dynamically loaded NSBundle and library, it hits the
40 // Chrome startup time (http://crbug.com/311325 and http://crbug.com/311437);
41 // for experimentation purposes, in particular library load time issue, the
42 // usage of this library can be enabled by using this flag.
43 const char kEnableAVFoundation[] = "enable-avfoundation";
45 // QTKit is the media capture API predecessor to AVFoundation, available up and
46 // until Mac OS X 10.9 (despite being deprecated in this last one). This flag
47 // is used for troubleshooting and testing, and forces QTKit in builds and
48 // configurations where AVFoundation would be used otherwise.
49 const char kForceQTKit[] = "force-qtkit";
50 #endif
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";
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";
66 // Force the use of MediaFoundation for video capture. This is only supported in
67 // Windows 7 and above. Used, like |kForceDirectShowVideoCapture|, to
68 // troubleshoot problems in Windows platforms.
69 const char kForceMediaFoundationVideoCapture[] = "force-mediafoundation";
71 // Use Windows WaveOut/In audio API even if Core Audio is supported.
72 const char kForceWaveAudio[] = "force-wave-audio";
74 // Instead of always using the hardware channel layout, check if a driver
75 // supports the source channel layout. Avoids outputting empty channels and
76 // permits drivers to enable stereo to multichannel expansion. Kept behind a
77 // flag since some drivers lie about supported layouts and hang when used. See
78 // http://crbug.com/259165 for more details.
79 const char kTrySupportedChannelLayouts[] = "try-supported-channel-layouts";
81 // Number of buffers to use for WaveOut.
82 const char kWaveOutBuffers[] = "waveout-buffers";
83 #endif
85 #if defined(USE_CRAS)
86 // Use CRAS, the ChromeOS audio server.
87 const char kUseCras[] = "use-cras";
88 #endif
90 // Enables the audio thread hang monitor. Allows us to find users in the field
91 // who have stuck audio threads. See crbug.com/422522 and crbug.com/478932.
92 // TODO(dalecurtis): This should be removed once those issues are resolved.
93 const char kEnableAudioHangMonitor[] = "enable-audio-hang-monitor";
95 // Use fake device for Media Stream to replace actual camera and microphone.
96 const char kUseFakeDeviceForMediaStream[] = "use-fake-device-for-media-stream";
98 // Use an .y4m file to play as the webcam. See the comments in
99 // media/capture/video/file_video_capture_device.h for more details.
100 const char kUseFileForFakeVideoCapture[] = "use-file-for-fake-video-capture";
102 // Play a .wav file as the microphone. Note that for WebRTC calls we'll treat
103 // the bits as if they came from the microphone, which means you should disable
104 // audio processing (lest your audio file will play back distorted). The input
105 // file is converted to suit Chrome's audio buses if necessary, so most sane
106 // .wav files should work.
107 const char kUseFileForFakeAudioCapture[] = "use-file-for-fake-audio-capture";
109 // Enables support for inband text tracks in media content.
110 const char kEnableInbandTextTracks[] = "enable-inband-text-tracks";
112 // When running tests on a system without the required hardware or libraries,
113 // this flag will cause the tests to fail. Otherwise, they silently succeed.
114 const char kRequireAudioHardwareForTesting[] =
115 "require-audio-hardware-for-testing";
117 // Allows clients to override the threshold for when the media renderer will
118 // declare the underflow state for the video stream when audio is present.
119 // TODO(dalecurtis): Remove once experiments for http://crbug.com/470940 finish.
120 const char kVideoUnderflowThresholdMs[] = "video-underflow-threshold-ms";
122 // Use the new rendering algorithm for webrtc, which is designed to improve
123 // smoothness.
124 const char kEnableRTCSmoothnessAlgorithm[] = "enable-rtc-smoothness-algorithm";
126 } // namespace switches