| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 const char kMediaStreamSourceId[] = | 78 const char kMediaStreamSourceId[] = |
| 79 "chromeMediaSourceId"; // mapped to deviceId | 79 "chromeMediaSourceId"; // mapped to deviceId |
| 80 const char kMediaStreamSourceInfoId[] = "sourceId"; // mapped to deviceId | 80 const char kMediaStreamSourceInfoId[] = "sourceId"; // mapped to deviceId |
| 81 const char kMediaStreamRenderToAssociatedSink[] = | 81 const char kMediaStreamRenderToAssociatedSink[] = |
| 82 "chromeRenderToAssociatedSink"; | 82 "chromeRenderToAssociatedSink"; |
| 83 // RenderToAssociatedSink will be going away in M50-M60 some time. | 83 // RenderToAssociatedSink will be going away in M50-M60 some time. |
| 84 const char kMediaStreamAudioHotword[] = "googHotword"; | 84 const char kMediaStreamAudioHotword[] = "googHotword"; |
| 85 // TODO(hta): googHotword should go away. https://crbug.com/577627 | 85 // TODO(hta): googHotword should go away. https://crbug.com/577627 |
| 86 // From content/renderer/media/media_stream_audio_processor_options.cc | 86 // From content/renderer/media/media_stream_audio_processor_options.cc |
| 87 const char kEchoCancellation[] = "echoCancellation"; | 87 const char kEchoCancellation[] = "echoCancellation"; |
| 88 const char kDisableLocalEcho[] = "disableLocalEcho"; |
| 88 const char kGoogEchoCancellation[] = "googEchoCancellation"; | 89 const char kGoogEchoCancellation[] = "googEchoCancellation"; |
| 89 const char kGoogExperimentalEchoCancellation[] = "googEchoCancellation2"; | 90 const char kGoogExperimentalEchoCancellation[] = "googEchoCancellation2"; |
| 90 const char kGoogAutoGainControl[] = "googAutoGainControl"; | 91 const char kGoogAutoGainControl[] = "googAutoGainControl"; |
| 91 const char kGoogExperimentalAutoGainControl[] = "googAutoGainControl2"; | 92 const char kGoogExperimentalAutoGainControl[] = "googAutoGainControl2"; |
| 92 const char kGoogNoiseSuppression[] = "googNoiseSuppression"; | 93 const char kGoogNoiseSuppression[] = "googNoiseSuppression"; |
| 93 const char kGoogExperimentalNoiseSuppression[] = "googNoiseSuppression2"; | 94 const char kGoogExperimentalNoiseSuppression[] = "googNoiseSuppression2"; |
| 94 const char kGoogBeamforming[] = "googBeamforming"; | 95 const char kGoogBeamforming[] = "googBeamforming"; |
| 95 const char kGoogArrayGeometry[] = "googArrayGeometry"; | 96 const char kGoogArrayGeometry[] = "googArrayGeometry"; |
| 96 const char kGoogHighpassFilter[] = "googHighpassFilter"; | 97 const char kGoogHighpassFilter[] = "googHighpassFilter"; |
| 97 const char kGoogTypingNoiseDetection[] = "googTypingNoiseDetection"; | 98 const char kGoogTypingNoiseDetection[] = "googTypingNoiseDetection"; |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 result.frameRate.setMin(atof(constraint.m_value.utf8().c_str())); | 292 result.frameRate.setMin(atof(constraint.m_value.utf8().c_str())); |
| 292 } else if (constraint.m_name.equals(kMaxFrameRate)) { | 293 } else if (constraint.m_name.equals(kMaxFrameRate)) { |
| 293 result.frameRate.setMax(atof(constraint.m_value.utf8().c_str())); | 294 result.frameRate.setMax(atof(constraint.m_value.utf8().c_str())); |
| 294 } else if (constraint.m_name.equals(kEchoCancellation)) { | 295 } else if (constraint.m_name.equals(kEchoCancellation)) { |
| 295 result.echoCancellation.setExact(toBoolean(constraint.m_value)); | 296 result.echoCancellation.setExact(toBoolean(constraint.m_value)); |
| 296 } else if (constraint.m_name.equals(kMediaStreamSource)) { | 297 } else if (constraint.m_name.equals(kMediaStreamSource)) { |
| 297 // TODO(hta): This has only a few legal values. Should be | 298 // TODO(hta): This has only a few legal values. Should be |
| 298 // represented as an enum, and cause type errors. | 299 // represented as an enum, and cause type errors. |
| 299 // https://crbug.com/576582 | 300 // https://crbug.com/576582 |
| 300 result.mediaStreamSource.setExact(constraint.m_value); | 301 result.mediaStreamSource.setExact(constraint.m_value); |
| 302 } else if (constraint.m_name.equals(kDisableLocalEcho) && |
| 303 RuntimeEnabledFeatures:: |
| 304 desktopCaptureDisableLocalEchoControlEnabled()) { |
| 305 result.disableLocalEcho.setExact(toBoolean(constraint.m_value)); |
| 301 } else if (constraint.m_name.equals(kMediaStreamSourceId) || | 306 } else if (constraint.m_name.equals(kMediaStreamSourceId) || |
| 302 constraint.m_name.equals(kMediaStreamSourceInfoId)) { | 307 constraint.m_name.equals(kMediaStreamSourceInfoId)) { |
| 303 result.deviceId.setExact(constraint.m_value); | 308 result.deviceId.setExact(constraint.m_value); |
| 304 } else if (constraint.m_name.equals(kMediaStreamRenderToAssociatedSink)) { | 309 } else if (constraint.m_name.equals(kMediaStreamRenderToAssociatedSink)) { |
| 305 // TODO(hta): This is a boolean represented as string. | 310 // TODO(hta): This is a boolean represented as string. |
| 306 // Should give TypeError when it's not parseable. | 311 // Should give TypeError when it's not parseable. |
| 307 // https://crbug.com/576582 | 312 // https://crbug.com/576582 |
| 308 result.renderToAssociatedSink.setExact(toBoolean(constraint.m_value)); | 313 result.renderToAssociatedSink.setExact(toBoolean(constraint.m_value)); |
| 309 } else if (constraint.m_name.equals(kMediaStreamAudioHotword)) { | 314 } else if (constraint.m_name.equals(kMediaStreamAudioHotword)) { |
| 310 result.hotwordEnabled.setExact(toBoolean(constraint.m_value)); | 315 result.hotwordEnabled.setExact(toBoolean(constraint.m_value)); |
| (...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 795 MediaTrackConstraintSet element; | 800 MediaTrackConstraintSet element; |
| 796 convertConstraintSet(it, element); | 801 convertConstraintSet(it, element); |
| 797 advancedVector.append(element); | 802 advancedVector.append(element); |
| 798 } | 803 } |
| 799 if (!advancedVector.isEmpty()) | 804 if (!advancedVector.isEmpty()) |
| 800 output.setAdvanced(advancedVector); | 805 output.setAdvanced(advancedVector); |
| 801 } | 806 } |
| 802 | 807 |
| 803 } // namespace MediaConstraintsImpl | 808 } // namespace MediaConstraintsImpl |
| 804 } // namespace blink | 809 } // namespace blink |
| OLD | NEW |