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