Chromium Code Reviews| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 76 const char kMinAspectRatio[] = "minAspectRatio"; | 76 const char kMinAspectRatio[] = "minAspectRatio"; |
| 77 const char kMaxAspectRatio[] = "maxAspectRatio"; | 77 const char kMaxAspectRatio[] = "maxAspectRatio"; |
| 78 const char kMaxWidth[] = "maxWidth"; | 78 const char kMaxWidth[] = "maxWidth"; |
| 79 const char kMinWidth[] = "minWidth"; | 79 const char kMinWidth[] = "minWidth"; |
| 80 const char kMaxHeight[] = "maxHeight"; | 80 const char kMaxHeight[] = "maxHeight"; |
| 81 const char kMinHeight[] = "minHeight"; | 81 const char kMinHeight[] = "minHeight"; |
| 82 const char kMaxFrameRate[] = "maxFrameRate"; | 82 const char kMaxFrameRate[] = "maxFrameRate"; |
| 83 const char kMinFrameRate[] = "minFrameRate"; | 83 const char kMinFrameRate[] = "minFrameRate"; |
| 84 // From content/common/media/media_stream_options.cc | 84 // From content/common/media/media_stream_options.cc |
| 85 const char kMediaStreamSource[] = "chromeMediaSource"; | 85 const char kMediaStreamSource[] = "chromeMediaSource"; |
| 86 const char kMuteSourceAudio[] = "muteSourceAudio"; | |
|
miu
2016/09/12 23:13:12
In answer to your question: Yes, this does need th
qiangchen
2016/09/13 21:46:57
Done.
| |
| 86 const char kMediaStreamSourceId[] = "chromeMediaSourceId"; // mapped to deviceId | 87 const char kMediaStreamSourceId[] = "chromeMediaSourceId"; // mapped to deviceId |
| 87 const char kMediaStreamSourceInfoId[] = "sourceId"; // mapped to deviceId | 88 const char kMediaStreamSourceInfoId[] = "sourceId"; // mapped to deviceId |
| 88 const char kMediaStreamRenderToAssociatedSink[] = "chromeRenderToAssociatedSink" ; | 89 const char kMediaStreamRenderToAssociatedSink[] = "chromeRenderToAssociatedSink" ; |
| 89 // RenderToAssociatedSink will be going away in M50-M60 some time. | 90 // RenderToAssociatedSink will be going away in M50-M60 some time. |
| 90 const char kMediaStreamAudioHotword[] = "googHotword"; | 91 const char kMediaStreamAudioHotword[] = "googHotword"; |
| 91 // TODO(hta): googHotword should go away. https://crbug.com/577627 | 92 // TODO(hta): googHotword should go away. https://crbug.com/577627 |
| 92 // From content/renderer/media/media_stream_audio_processor_options.cc | 93 // From content/renderer/media/media_stream_audio_processor_options.cc |
| 93 const char kEchoCancellation[] = "echoCancellation"; | 94 const char kEchoCancellation[] = "echoCancellation"; |
| 94 const char kGoogEchoCancellation[] = "googEchoCancellation"; | 95 const char kGoogEchoCancellation[] = "googEchoCancellation"; |
| 95 const char kGoogExperimentalEchoCancellation[] = "googEchoCancellation2"; | 96 const char kGoogExperimentalEchoCancellation[] = "googEchoCancellation2"; |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 287 result.frameRate.setMin(atof(constraint.m_value.utf8().c_str())); | 288 result.frameRate.setMin(atof(constraint.m_value.utf8().c_str())); |
| 288 } else if (constraint.m_name.equals(kMaxFrameRate)) { | 289 } else if (constraint.m_name.equals(kMaxFrameRate)) { |
| 289 result.frameRate.setMax(atof(constraint.m_value.utf8().c_str())); | 290 result.frameRate.setMax(atof(constraint.m_value.utf8().c_str())); |
| 290 } else if (constraint.m_name.equals(kEchoCancellation)) { | 291 } else if (constraint.m_name.equals(kEchoCancellation)) { |
| 291 result.echoCancellation.setExact(toBoolean(constraint.m_value)); | 292 result.echoCancellation.setExact(toBoolean(constraint.m_value)); |
| 292 } else if (constraint.m_name.equals(kMediaStreamSource)) { | 293 } else if (constraint.m_name.equals(kMediaStreamSource)) { |
| 293 // TODO(hta): This has only a few legal values. Should be | 294 // TODO(hta): This has only a few legal values. Should be |
| 294 // represented as an enum, and cause type errors. | 295 // represented as an enum, and cause type errors. |
| 295 // https://crbug.com/576582 | 296 // https://crbug.com/576582 |
| 296 result.mediaStreamSource.setExact(constraint.m_value); | 297 result.mediaStreamSource.setExact(constraint.m_value); |
| 298 } else if (constraint.m_name.equals(kMuteSourceAudio)) { | |
| 299 result.muteSourceAudio.setExact(toBoolean(constraint.m_value)); | |
| 297 } else if (constraint.m_name.equals(kMediaStreamSourceId) | 300 } else if (constraint.m_name.equals(kMediaStreamSourceId) |
| 298 || constraint.m_name.equals(kMediaStreamSourceInfoId)) { | 301 || constraint.m_name.equals(kMediaStreamSourceInfoId)) { |
| 299 result.deviceId.setExact(constraint.m_value); | 302 result.deviceId.setExact(constraint.m_value); |
| 300 } else if (constraint.m_name.equals(kMediaStreamRenderToAssociatedSink)) { | 303 } else if (constraint.m_name.equals(kMediaStreamRenderToAssociatedSink)) { |
| 301 // TODO(hta): This is a boolean represented as string. | 304 // TODO(hta): This is a boolean represented as string. |
| 302 // Should give TypeError when it's not parseable. | 305 // Should give TypeError when it's not parseable. |
| 303 // https://crbug.com/576582 | 306 // https://crbug.com/576582 |
| 304 result.renderToAssociatedSink.setExact(toBoolean(constraint.m_value) ); | 307 result.renderToAssociatedSink.setExact(toBoolean(constraint.m_value) ); |
| 305 } else if (constraint.m_name.equals(kMediaStreamAudioHotword)) { | 308 } else if (constraint.m_name.equals(kMediaStreamAudioHotword)) { |
| 306 result.hotwordEnabled.setExact(toBoolean(constraint.m_value)); | 309 result.hotwordEnabled.setExact(toBoolean(constraint.m_value)); |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 765 MediaTrackConstraintSet element; | 768 MediaTrackConstraintSet element; |
| 766 convertConstraintSet(it, element); | 769 convertConstraintSet(it, element); |
| 767 advancedVector.append(element); | 770 advancedVector.append(element); |
| 768 } | 771 } |
| 769 if (!advancedVector.isEmpty()) | 772 if (!advancedVector.isEmpty()) |
| 770 output.setAdvanced(advancedVector); | 773 output.setAdvanced(advancedVector); |
| 771 } | 774 } |
| 772 | 775 |
| 773 } // namespace MediaConstraintsImpl | 776 } // namespace MediaConstraintsImpl |
| 774 } // namespace blink | 777 } // namespace blink |
| OLD | NEW |