| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "media/base/media_switches.h" | 5 #include "media/base/media_switches.h" |
| 6 | 6 |
| 7 namespace switches { | 7 namespace switches { |
| 8 | 8 |
| 9 // Allow users to specify a custom buffer size for debugging purpose. | 9 // Allow users to specify a custom buffer size for debugging purpose. |
| 10 const char kAudioBufferSize[] = "audio-buffer-size"; | 10 const char kAudioBufferSize[] = "audio-buffer-size"; |
| 11 | 11 |
| 12 #if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_SOLARIS) | |
| 13 // The Alsa device to use when opening an audio stream. | |
| 14 const char kAlsaOutputDevice[] = "alsa-output-device"; | |
| 15 // The Alsa device to use when opening an audio input stream. | |
| 16 const char kAlsaInputDevice[] = "alsa-input-device"; | |
| 17 #endif | |
| 18 | |
| 19 #if defined(USE_CRAS) | |
| 20 // Use CRAS, the ChromeOS audio server. | |
| 21 const char kUseCras[] = "use-cras"; | |
| 22 #endif | |
| 23 | |
| 24 #if defined(OS_WIN) | |
| 25 // Use exclusive mode audio streaming for Windows Vista and higher. | |
| 26 // Leads to lower latencies for audio streams which uses the | |
| 27 // AudioParameters::AUDIO_PCM_LOW_LATENCY audio path. | |
| 28 // See http://msdn.microsoft.com/en-us/library/windows/desktop/dd370844(v=vs.85)
.aspx | |
| 29 // for details. | |
| 30 const char kEnableExclusiveAudio[] = "enable-exclusive-audio"; | |
| 31 | |
| 32 // Use Windows WaveOut/In audio API even if Core Audio is supported. | |
| 33 const char kForceWaveAudio[] = "force-wave-audio"; | |
| 34 #endif | |
| 35 | |
| 36 // Set number of threads to use for video decoding. | |
| 37 const char kVideoThreads[] = "video-threads"; | |
| 38 | |
| 39 // Disables support for Encrypted Media Extensions. | 12 // Disables support for Encrypted Media Extensions. |
| 40 const char kDisableEncryptedMedia[] = "disable-encrypted-media"; | 13 const char kDisableEncryptedMedia[] = "disable-encrypted-media"; |
| 41 | 14 |
| 15 // Enable EAC3 playback in MSE. |
| 16 const char kEnableEac3Playback[] = "enable-eac3-playback"; |
| 17 |
| 42 // Enables Opus playback in media elements. | 18 // Enables Opus playback in media elements. |
| 43 const char kEnableOpusPlayback[] = "enable-opus-playback"; | 19 const char kEnableOpusPlayback[] = "enable-opus-playback"; |
| 44 | 20 |
| 21 // Enables VP8 Alpha playback in media elements. |
| 22 const char kEnableVp8AlphaPlayback[] = "enable-vp8-alpha-playback"; |
| 23 |
| 45 // Enables VP9 playback in media elements. | 24 // Enables VP9 playback in media elements. |
| 46 const char kEnableVp9Playback[] = "enable-vp9-playback"; | 25 const char kEnableVp9Playback[] = "enable-vp9-playback"; |
| 47 | 26 |
| 48 // Enables VP8 Alpha playback in media elements. | 27 // Set number of threads to use for video decoding. |
| 49 const char kEnableVp8AlphaPlayback[] = "enable-vp8-alpha-playback"; | 28 const char kVideoThreads[] = "video-threads"; |
| 50 | |
| 51 // Enable EAC3 playback in MSE. | |
| 52 const char kEnableEac3Playback[] = "enable-eac3-playback"; | |
| 53 | |
| 54 #if defined(OS_WIN) | |
| 55 const char kWaveOutBuffers[] = "waveout-buffers"; | |
| 56 #endif | |
| 57 | 29 |
| 58 #if defined(GOOGLE_TV) | 30 #if defined(GOOGLE_TV) |
| 59 // Use external video surface for video with more than or equal pixels to | 31 // Use external video surface for video with more than or equal pixels to |
| 60 // specified value. For example, value of 0 will enable external video surface | 32 // specified value. For example, value of 0 will enable external video surface |
| 61 // for all videos, and value of 921600 (=1280*720) will enable external video | 33 // for all videos, and value of 921600 (=1280*720) will enable external video |
| 62 // surface for 720p video and larger. | 34 // surface for 720p video and larger. |
| 63 const char kUseExternalVideoSurfaceThresholdInPixels[] = | 35 const char kUseExternalVideoSurfaceThresholdInPixels[] = |
| 64 "use-external-video-surface-threshold-in-pixels"; | 36 "use-external-video-surface-threshold-in-pixels"; |
| 65 #endif | 37 #endif |
| 66 | 38 |
| 39 #if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_SOLARIS) |
| 40 // The Alsa device to use when opening an audio input stream. |
| 41 const char kAlsaInputDevice[] = "alsa-input-device"; |
| 42 // The Alsa device to use when opening an audio stream. |
| 43 const char kAlsaOutputDevice[] = "alsa-output-device"; |
| 44 #endif |
| 45 |
| 46 #if defined(OS_MACOSX) |
| 47 // Unlike other platforms, OSX requires CoreAudio calls to happen on the main |
| 48 // thread of the process. Provide a way to disable this until support is well |
| 49 // tested. See http://crbug.com/158170. |
| 50 // TODO(dalecurtis): Remove this once we're sure nothing has exploded. |
| 51 const char kDisableMainThreadAudio[] = "disable-main-thread-audio"; |
| 52 #endif |
| 53 |
| 54 #if defined(OS_WIN) |
| 55 // Use exclusive mode audio streaming for Windows Vista and higher. |
| 56 // Leads to lower latencies for audio streams which uses the |
| 57 // AudioParameters::AUDIO_PCM_LOW_LATENCY audio path. |
| 58 // See http://msdn.microsoft.com/en-us/library/windows/desktop/dd370844.aspx |
| 59 // for details. |
| 60 const char kEnableExclusiveAudio[] = "enable-exclusive-audio"; |
| 61 |
| 62 // Use Windows WaveOut/In audio API even if Core Audio is supported. |
| 63 const char kForceWaveAudio[] = "force-wave-audio"; |
| 64 |
| 65 // Number of buffers to use for WaveOut. |
| 66 const char kWaveOutBuffers[] = "waveout-buffers"; |
| 67 #endif |
| 68 |
| 69 #if defined(USE_CRAS) |
| 70 // Use CRAS, the ChromeOS audio server. |
| 71 const char kUseCras[] = "use-cras"; |
| 72 #endif |
| 67 | 73 |
| 68 } // namespace switches | 74 } // namespace switches |
| OLD | NEW |