New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 823831 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Wire autoGainControl and noiseSuppression constrainable properties

Project Member Reported by guidou@chromium.org, Mar 20 2018

Issue description

Blink supports these constraints internally as goog_auto_gain_control and goog_noise_suppression.

Adding support consists in adding the properties to a number of IDL dictionaries and wiring them in the constraints-parsing code.
 

Comment 1 by guidou@chromium.org, Mar 20 2018

Cc: c.pa...@samsung.com
Owner: guidou@chromium.org
Status: Assigned (was: Untriaged)
c.padhi@: Would you be interested in fixing this, while I prepare a couple of design documents for other projects in which you can contribute?

Comment 2 by c.pa...@samsung.com, Mar 21 2018

Sure. I'll start working on this bug.

Comment 3 by guidou@chromium.org, Mar 21 2018

Wiring these properties to the parser will add support automatically for getUserMedia and applyConstraints.

We also have to add support for getConstraints(), getSettings() and getCapabilities().
In these cases, support should be very similar to how echoCancellation is supported.

Comment 4 by c.pa...@samsung.com, Mar 22 2018

Should we rename goog_auto_gain_control to auto_gain_control in WebMediaTrackConstraintSet?

Also, I see there's another field goog_experimental_auto_gain_control in WebMediaTrackConstraintSet. Is this different from goog_auto_gain_control?

Comment 5 by guidou@chromium.org, Mar 22 2018

Labels: -Pri-3 Pri-2
Yes, the experimental one is different from goog_auto_gain_control.
Let's keep the goog_auto_gain_control name in existing code during development and let's rename it in a final CL just for that purpose once everything works.

Of course, IDL files have to use the spec-compliant name.

Comment 6 by guidou@chromium.org, Mar 22 2018

Cc: -c.pa...@samsung.com guidou@chromium.org
Owner: c.pa...@samsung.com
Project Member

Comment 7 by bugdroid1@chromium.org, Mar 22 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/457331359e46f16a5b8b45c308d99b8b448e028a

commit 457331359e46f16a5b8b45c308d99b8b448e028a
Author: Chandan Padhi <c.padhi@samsung.com>
Date: Thu Mar 22 15:04:12 2018

Add autoGainControl and noiseSuppression to MediaTrackConstraintSet

This CL also wires these constraints to Blink's internal
goog_auto_gain_control and goog_noise_suppression respectively.
This automatically provides support for these constraints in
mediaDevices.getUserMedia(), MediaStreamTrack.applyConstraints()
and MediaStreamTrack.getConstraints().

Intent to ship:
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/ANta5sQXoGA

Bug:  823831 
Change-Id: I71c84e6464533de8abfb51fb12d774849b34a91f
Reviewed-on: https://chromium-review.googlesource.com/975501
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Commit-Queue: Chandan Padhi <c.padhi@samsung.com>
Cr-Commit-Position: refs/heads/master@{#545075}
[modify] https://crrev.com/457331359e46f16a5b8b45c308d99b8b448e028a/third_party/WebKit/LayoutTests/fast/mediastream/MediaStreamTrack-applyConstraints.html
[modify] https://crrev.com/457331359e46f16a5b8b45c308d99b8b448e028a/third_party/WebKit/LayoutTests/fast/mediastream/MediaStreamTrack-getConstraints.html
[modify] https://crrev.com/457331359e46f16a5b8b45c308d99b8b448e028a/third_party/WebKit/LayoutTests/fast/mediastream/getusermedia-constraints.html
[modify] https://crrev.com/457331359e46f16a5b8b45c308d99b8b448e028a/third_party/WebKit/Source/modules/mediastream/MediaConstraintsImpl.cpp
[modify] https://crrev.com/457331359e46f16a5b8b45c308d99b8b448e028a/third_party/WebKit/Source/modules/mediastream/MediaTrackConstraintSet.idl

Comment 8 by c.pa...@samsung.com, Mar 23 2018

guidou@: getSettings() method exists for tracks. Are Settings similar to Capabilities i.e. Settings belong to sources or tracks? If yes, should we move WebMediaStreamTrack::Settings to WebMediaStreamSource as well?

In case of Settings, autoGainControl and noiseSuppression should be set similar to echoCancellation at [1] and [2]?
https://cs.chromium.org/chromium/src/content/renderer/media/stream/user_media_processor.cc?l=106
https://cs.chromium.org/chromium/src/content/renderer/media/stream/user_media_processor.cc?l=836

Comment 9 by guidou@chromium.org, Mar 23 2018

Settings belong to tracks, but in the particular case of audio tracks in Chrome, the audio-processing properties of a track are the same as for its source.

A possible way to implement this would be to do the following in  SurfaceHardwareEchoCancellationSetting() [1].
1. Rename it to SurfaceAudioProcessingSettings()
2. Try to cast the MediaStreamAudioSource* to a ProcessedLocalAudioSource* using ProcessedLocalAudioSource::From() [2]
3. If unsuccessful, the values are false. If successful, the values can be obtained using the appropriate fields from the struct returned by ProcessedLocalAudioSource::audio_processing_properties()

[1] https://cs.chromium.org/chromium/src/content/renderer/media/stream/user_media_processor.cc?type=cs&q=user_media_pr&sq=package:chromium&l=99
[2] https://cs.chromium.org/chromium/src/content/renderer/media/stream/processed_local_audio_source.h?gsn=MediaStreamAudioSource&l=53

Project Member

Comment 10 by bugdroid1@chromium.org, Mar 23 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ea434a2ae6f530bd2fc4bb706228ab3395bc67bd

commit ea434a2ae6f530bd2fc4bb706228ab3395bc67bd
Author: Chandan Padhi <c.padhi@samsung.com>
Date: Fri Mar 23 16:01:07 2018

Add autoGainControl and noiseSuppression to MediaTrackSupportedConstraints

This CL provides support for these constraints in mediaDevices.getSupportedConstraints().

Bug:  823831 
Change-Id: I17e251b5433ad6cb23e92655cfdaf114e9b23002
Reviewed-on: https://chromium-review.googlesource.com/977801
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Commit-Queue: Chandan Padhi <c.padhi@samsung.com>
Cr-Commit-Position: refs/heads/master@{#545466}
[modify] https://crrev.com/ea434a2ae6f530bd2fc4bb706228ab3395bc67bd/third_party/WebKit/LayoutTests/fast/mediastream/MediaDevices-getSupportedConstraints.html
[modify] https://crrev.com/ea434a2ae6f530bd2fc4bb706228ab3395bc67bd/third_party/WebKit/Source/modules/mediastream/MediaTrackSupportedConstraints.idl

Project Member

Comment 11 by bugdroid1@chromium.org, Mar 26 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6520f685d3ec41fcd4bafec8fd7b3038920d5186

commit 6520f685d3ec41fcd4bafec8fd7b3038920d5186
Author: Chandan Padhi <c.padhi@samsung.com>
Date: Mon Mar 26 09:59:00 2018

Add support for autoGainControl and noiseSuppression to getCapabilities()

This CL adds support for autoGainControl and noiseSuppression properties
to MediaStreamTrack.getCapabilities() and InputDeviceInfo.getCapabilities().

Bug:  823831 ,  817769 
Change-Id: Ifdc0e560001e000b12c8d04634d3c52de0a34cc7
Reviewed-on: https://chromium-review.googlesource.com/977251
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Commit-Queue: Chandan Padhi <c.padhi@samsung.com>
Cr-Commit-Position: refs/heads/master@{#545750}
[modify] https://crrev.com/6520f685d3ec41fcd4bafec8fd7b3038920d5186/content/public/renderer/media_stream_utils.cc
[modify] https://crrev.com/6520f685d3ec41fcd4bafec8fd7b3038920d5186/content/renderer/media/stream/media_stream_center.cc
[modify] https://crrev.com/6520f685d3ec41fcd4bafec8fd7b3038920d5186/content/renderer/media/stream/remote_media_stream_track_adapter.cc
[modify] https://crrev.com/6520f685d3ec41fcd4bafec8fd7b3038920d5186/content/renderer/media/stream/user_media_processor.cc
[modify] https://crrev.com/6520f685d3ec41fcd4bafec8fd7b3038920d5186/content/renderer/renderer_blink_platform_impl.cc
[modify] https://crrev.com/6520f685d3ec41fcd4bafec8fd7b3038920d5186/third_party/WebKit/LayoutTests/external/wpt/mediacapture-streams/MediaDevices-enumerateDevices.https.html
[modify] https://crrev.com/6520f685d3ec41fcd4bafec8fd7b3038920d5186/third_party/WebKit/LayoutTests/external/wpt/mediacapture-streams/MediaStreamTrack-getCapabilities.https.html
[modify] https://crrev.com/6520f685d3ec41fcd4bafec8fd7b3038920d5186/third_party/WebKit/LayoutTests/fast/mediastream/MediaStreamTrack-getCapabilities.html
[modify] https://crrev.com/6520f685d3ec41fcd4bafec8fd7b3038920d5186/third_party/WebKit/Source/modules/mediastream/InputDeviceInfo.cpp
[modify] https://crrev.com/6520f685d3ec41fcd4bafec8fd7b3038920d5186/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp
[modify] https://crrev.com/6520f685d3ec41fcd4bafec8fd7b3038920d5186/third_party/WebKit/Source/modules/mediastream/MediaTrackCapabilities.idl
[modify] https://crrev.com/6520f685d3ec41fcd4bafec8fd7b3038920d5186/third_party/WebKit/public/platform/WebMediaStreamSource.h

Project Member

Comment 12 by bugdroid1@chromium.org, Mar 27 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/32ff2fb2094b94ad384c99ce508a662a3abb673b

commit 32ff2fb2094b94ad384c99ce508a662a3abb673b
Author: Chandan Padhi <c.padhi@samsung.com>
Date: Tue Mar 27 12:35:15 2018

Add support for autoGainControl and noiseSuppression to MediaStreamTrack.getSettings()

Bug:  823831 
Change-Id: I60dc7eb1d6a24e6e2e898c23dcacf1a74f06ccfd
Reviewed-on: https://chromium-review.googlesource.com/978223
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Commit-Queue: Chandan Padhi <c.padhi@samsung.com>
Cr-Commit-Position: refs/heads/master@{#546087}
[modify] https://crrev.com/32ff2fb2094b94ad384c99ce508a662a3abb673b/content/renderer/media/stream/user_media_client_impl_unittest.cc
[modify] https://crrev.com/32ff2fb2094b94ad384c99ce508a662a3abb673b/content/renderer/media/stream/user_media_processor.cc
[modify] https://crrev.com/32ff2fb2094b94ad384c99ce508a662a3abb673b/content/renderer/media/stream/user_media_processor.h
[modify] https://crrev.com/32ff2fb2094b94ad384c99ce508a662a3abb673b/third_party/WebKit/LayoutTests/fast/mediastream/MediaStreamTrack-getSettings.html
[modify] https://crrev.com/32ff2fb2094b94ad384c99ce508a662a3abb673b/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp
[modify] https://crrev.com/32ff2fb2094b94ad384c99ce508a662a3abb673b/third_party/WebKit/Source/modules/mediastream/MediaTrackSettings.idl
[modify] https://crrev.com/32ff2fb2094b94ad384c99ce508a662a3abb673b/third_party/WebKit/Source/platform/exported/WebMediaStreamSource.cpp
[modify] https://crrev.com/32ff2fb2094b94ad384c99ce508a662a3abb673b/third_party/WebKit/Source/platform/mediastream/MediaStreamSource.cpp
[modify] https://crrev.com/32ff2fb2094b94ad384c99ce508a662a3abb673b/third_party/WebKit/Source/platform/mediastream/MediaStreamSource.h
[modify] https://crrev.com/32ff2fb2094b94ad384c99ce508a662a3abb673b/third_party/WebKit/public/platform/WebMediaStreamSource.h
[modify] https://crrev.com/32ff2fb2094b94ad384c99ce508a662a3abb673b/third_party/WebKit/public/platform/WebMediaStreamTrack.h

guidou@: We can close this bug now? What should we focus on next?
Status: Fixed (was: Assigned)

Sign in to add a comment