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