| 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 "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 #include "media/base/media_switches.h" | 6 #include "media/base/media_switches.h" |
| 7 | 7 |
| 8 namespace switches { | 8 namespace switches { |
| 9 | 9 |
| 10 // Allow users to specify a custom buffer size for debugging purpose. | 10 // Allow users to specify a custom buffer size for debugging purpose. |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 59 |
| 60 // Number of buffers to use for WaveOut. | 60 // Number of buffers to use for WaveOut. |
| 61 const char kWaveOutBuffers[] = "waveout-buffers"; | 61 const char kWaveOutBuffers[] = "waveout-buffers"; |
| 62 #endif | 62 #endif |
| 63 | 63 |
| 64 #if defined(USE_CRAS) | 64 #if defined(USE_CRAS) |
| 65 // Use CRAS, the ChromeOS audio server. | 65 // Use CRAS, the ChromeOS audio server. |
| 66 const char kUseCras[] = "use-cras"; | 66 const char kUseCras[] = "use-cras"; |
| 67 #endif | 67 #endif |
| 68 | 68 |
| 69 #if !defined(OS_ANDROID) | 69 #if !defined(OS_ANDROID) || defined(ENABLE_PLUGINS) |
| 70 // Use a media session for each tabs in a way that two tabs can't play on top of | 70 // Use a media session for each tabs in a way that two tabs can't play on top of |
| 71 // each other. This is different from the Media Session API as it is enabling a | 71 // each other. This is different from the Media Session API as it is enabling a |
| 72 // default behaviour for the browser. | 72 // default behaviour for the browser. The allowed values are: "" (empty), |
| 73 // |kEnableDefaultMediaSessionWithFlash|. |
| 73 const char kEnableDefaultMediaSession[] = "enable-default-media-session"; | 74 const char kEnableDefaultMediaSession[] = "enable-default-media-session"; |
| 74 #endif | 75 #endif // !defined(OS_ANDROID) || defined(ENABLE_PLUGINS) |
| 76 |
| 77 #if defined(ENABLE_PLUGINS) |
| 78 // This value is used as an option for |kEnableDefaultMediaSession|. |
| 79 const char kEnableDefaultMediaSessionWithFlash[] = "with-flash"; |
| 80 #endif // defined(ENABLE_PLUGINS) |
| 75 | 81 |
| 76 // Use fake device for Media Stream to replace actual camera and microphone. | 82 // Use fake device for Media Stream to replace actual camera and microphone. |
| 77 const char kUseFakeDeviceForMediaStream[] = "use-fake-device-for-media-stream"; | 83 const char kUseFakeDeviceForMediaStream[] = "use-fake-device-for-media-stream"; |
| 78 | 84 |
| 79 // Use an .y4m file to play as the webcam. See the comments in | 85 // Use an .y4m file to play as the webcam. See the comments in |
| 80 // media/capture/video/file_video_capture_device.h for more details. | 86 // media/capture/video/file_video_capture_device.h for more details. |
| 81 const char kUseFileForFakeVideoCapture[] = "use-file-for-fake-video-capture"; | 87 const char kUseFileForFakeVideoCapture[] = "use-file-for-fake-video-capture"; |
| 82 | 88 |
| 83 // Play a .wav file as the microphone. Note that for WebRTC calls we'll treat | 89 // Play a .wav file as the microphone. Note that for WebRTC calls we'll treat |
| 84 // the bits as if they came from the microphone, which means you should disable | 90 // the bits as if they came from the microphone, which means you should disable |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 } // namespace switches | 127 } // namespace switches |
| 122 | 128 |
| 123 namespace media { | 129 namespace media { |
| 124 | 130 |
| 125 #if defined(OS_WIN) | 131 #if defined(OS_WIN) |
| 126 // Enables H264 HW encode acceleration using Media Foundation for Windows. | 132 // Enables H264 HW encode acceleration using Media Foundation for Windows. |
| 127 const base::Feature kMediaFoundationH264Encoding{ | 133 const base::Feature kMediaFoundationH264Encoding{ |
| 128 "MediaFoundationH264Encoding", base::FEATURE_DISABLED_BY_DEFAULT}; | 134 "MediaFoundationH264Encoding", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 129 #endif // defined(OS_WIN) | 135 #endif // defined(OS_WIN) |
| 130 | 136 |
| 131 #if defined(ENABLE_PLUGINS) | |
| 132 // Let flash join and be controlled by media session, only valid when | |
| 133 // |kEnableDefaultMediaSession| is on. | |
| 134 const base::Feature kFlashJoinsMediaSession{"FlashJoinsMediaSession", | |
| 135 base::FEATURE_DISABLED_BY_DEFAULT}; | |
| 136 #endif // defined(ENABLE_PLUGINS) | |
| 137 | |
| 138 // Use new audio rendering mixer. | 137 // Use new audio rendering mixer. |
| 139 const base::Feature kNewAudioRenderingMixingStrategy{ | 138 const base::Feature kNewAudioRenderingMixingStrategy{ |
| 140 "NewAudioRenderingMixingStrategy", base::FEATURE_DISABLED_BY_DEFAULT}; | 139 "NewAudioRenderingMixingStrategy", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 141 | 140 |
| 142 // Only used for disabling overlay fullscreen (aka SurfaceView) in Clank. | 141 // Only used for disabling overlay fullscreen (aka SurfaceView) in Clank. |
| 143 const base::Feature kOverlayFullscreenVideo{"overlay-fullscreen-video", | 142 const base::Feature kOverlayFullscreenVideo{"overlay-fullscreen-video", |
| 144 base::FEATURE_ENABLED_BY_DEFAULT}; | 143 base::FEATURE_ENABLED_BY_DEFAULT}; |
| 145 | 144 |
| 146 // Let videos be resumed via remote controls (for example, the notification) | 145 // Let videos be resumed via remote controls (for example, the notification) |
| 147 // when in background. | 146 // when in background. |
| (...skipping 20 matching lines...) Expand all Loading... |
| 168 const base::Feature kExternalClearKeyForTesting{ | 167 const base::Feature kExternalClearKeyForTesting{ |
| 169 "external-clear-key-for-testing", base::FEATURE_DISABLED_BY_DEFAULT}; | 168 "external-clear-key-for-testing", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 170 | 169 |
| 171 #if defined(OS_ANDROID) | 170 #if defined(OS_ANDROID) |
| 172 // Replaces WPMA by the MediaPlayerRenderer for HLS and fallback playback. | 171 // Replaces WPMA by the MediaPlayerRenderer for HLS and fallback playback. |
| 173 const base::Feature kAndroidMediaPlayerRenderer{ | 172 const base::Feature kAndroidMediaPlayerRenderer{ |
| 174 "android-media-player-renderer", base::FEATURE_DISABLED_BY_DEFAULT}; | 173 "android-media-player-renderer", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 175 #endif | 174 #endif |
| 176 | 175 |
| 177 } // namespace media | 176 } // namespace media |
| OLD | NEW |