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 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 #include "ppapi/features/features.h" | 8 #include "ppapi/features/features.h" |
9 | 9 |
10 namespace switches { | 10 namespace switches { |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 "MediaDrmPersistentLicense", base::FEATURE_DISABLED_BY_DEFAULT}; | 270 "MediaDrmPersistentLicense", base::FEATURE_DISABLED_BY_DEFAULT}; |
271 | 271 |
272 #endif | 272 #endif |
273 | 273 |
274 #if defined(OS_WIN) | 274 #if defined(OS_WIN) |
275 // Enables video decode acceleration using the D3D11 video decoder api. | 275 // Enables video decode acceleration using the D3D11 video decoder api. |
276 // This is completely insecure - DO NOT USE except for testing. | 276 // This is completely insecure - DO NOT USE except for testing. |
277 const base::Feature kD3D11VideoDecoding{"D3D11VideoDecoding", | 277 const base::Feature kD3D11VideoDecoding{"D3D11VideoDecoding", |
278 base::FEATURE_DISABLED_BY_DEFAULT}; | 278 base::FEATURE_DISABLED_BY_DEFAULT}; |
279 | 279 |
| 280 // Does NV12->NV12 video copy on the main thread right before the texture's |
| 281 // used by GL. |
| 282 const base::Feature kDelayCopyNV12Textures{"DelayCopyNV12Textures", |
| 283 base::FEATURE_ENABLED_BY_DEFAULT}; |
| 284 |
280 // Enables H264 HW encode acceleration using Media Foundation for Windows. | 285 // Enables H264 HW encode acceleration using Media Foundation for Windows. |
281 const base::Feature kMediaFoundationH264Encoding{ | 286 const base::Feature kMediaFoundationH264Encoding{ |
282 "MediaFoundationH264Encoding", base::FEATURE_ENABLED_BY_DEFAULT}; | 287 "MediaFoundationH264Encoding", base::FEATURE_ENABLED_BY_DEFAULT}; |
283 #endif // defined(OS_WIN) | 288 #endif // defined(OS_WIN) |
284 | 289 |
285 std::string GetEffectiveAutoplayPolicy(const base::CommandLine& command_line) { | 290 std::string GetEffectiveAutoplayPolicy(const base::CommandLine& command_line) { |
286 // |kIgnoreAutoplayRestrictionsForTests| overrides all other settings. | 291 // |kIgnoreAutoplayRestrictionsForTests| overrides all other settings. |
287 if (command_line.HasSwitch(switches::kIgnoreAutoplayRestrictionsForTests)) | 292 if (command_line.HasSwitch(switches::kIgnoreAutoplayRestrictionsForTests)) |
288 return switches::autoplay::kNoUserGestureRequiredPolicy; | 293 return switches::autoplay::kNoUserGestureRequiredPolicy; |
289 | 294 |
290 // Return the autoplay policy set in the command line, if any. | 295 // Return the autoplay policy set in the command line, if any. |
291 if (command_line.HasSwitch(switches::kAutoplayPolicy)) | 296 if (command_line.HasSwitch(switches::kAutoplayPolicy)) |
292 return command_line.GetSwitchValueASCII(switches::kAutoplayPolicy); | 297 return command_line.GetSwitchValueASCII(switches::kAutoplayPolicy); |
293 | 298 |
294 // The default value is platform dependent. | 299 // The default value is platform dependent. |
295 #if defined(OS_ANDROID) | 300 #if defined(OS_ANDROID) |
296 return switches::autoplay::kUserGestureRequiredPolicy; | 301 return switches::autoplay::kUserGestureRequiredPolicy; |
297 #else | 302 #else |
298 return switches::autoplay::kNoUserGestureRequiredPolicy; | 303 return switches::autoplay::kNoUserGestureRequiredPolicy; |
299 #endif | 304 #endif |
300 } | 305 } |
301 | 306 |
302 } // namespace media | 307 } // namespace media |
OLD | NEW |