Improve device list change coalescing
Categories
(Core :: WebRTC: Audio/Video, task, P1)
Tracking
()
People
(Reporter: karlt, Assigned: karlt)
References
Details
Attachments
(4 files, 2 obsolete files)
MediaManager and MediaDevices each have code to merge device list changes.
These can be merged into one set of logic.
Hardware device change events were first coalesced over 1s in MediaDevices, with the timer being extended by 1s each time a new hardware event was received. https://hg.mozilla.org/mozilla-central/rev/d7cb0a69d237b625a36505941644390c3c1e5378
A 0.1s main-thread-blocking sleep was then added in MediaManager before stopping tracks after every hardware event,
https://hg.mozilla.org/mozilla-central/rev/00af61b0dd2ff664ecc4b23d668219505930ee92
which was subsequently extended to 0.2s.
https://hg.mozilla.org/mozilla-central/rev/fb45e3d534cd
The MediaDevices timer was changed so as not to extend but always fire within 1s of a hardware event.
https://hg.mozilla.org/mozilla-central/rev/d6f3399cc0abc5c4c68e78a0a1f6a8e5b999b19a
The MediaManager sleep was then changed to a (still 0.2s) non-blocking timer, extended by 0.2s on each new hardware event.
https://hg.mozilla.org/mozilla-central/rev/098923480472
| Assignee | ||
Comment 1•4 years ago
|
||
https://google.github.io/styleguide/cppguide.html#Inputs_and_Outputs
Depends on D132888
| Assignee | ||
Comment 2•4 years ago
|
||
GetUserMediaWindowListener() does not have active listeners for speakers.
Depends on D132889
| Assignee | ||
Comment 3•4 years ago
|
||
This will simplify invocation from more than one call site.
Depends on D132890
| Assignee | ||
Comment 4•4 years ago
|
||
Depends on D132891
| Assignee | ||
Comment 5•4 years ago
|
||
There is a chance that this may result in some associated events no longer
being coalesced into a single devicechange event, but there is little
disadvantage to this while there is an advantage to getting devicechange
events promptly.
Future changes for https://bugzilla.mozilla.org/show_bug.cgi?id=1732409 will
track exactly which devices have changed and so filter out no-op
notifications.
Depends on D132892
| Assignee | ||
Comment 6•4 years ago
|
||
Depends on D132909
| Assignee | ||
Updated•4 years ago
|
Comment 8•4 years ago
|
||
| bugherder | ||
| Assignee | ||
Comment 9•4 years ago
|
||
I'll move the remaining patches to bug 1753131.
Comment 10•4 years ago
|
||
Comment on attachment 9253806 [details]
Bug 1744364 use MediaManager device list change coalescing for MediaDevices r?jib
Revision D132893 was moved to bug 1753131. Setting attachment 9253806 [details] to obsolete.
Comment 11•4 years ago
|
||
Comment on attachment 9253823 [details]
Bug 1744364 test that devicechange event is fired even when hardware changes continue r?jib
Revision D132910 was moved to bug 1753131. Setting attachment 9253823 [details] to obsolete.
Updated•4 years ago
|
Updated•4 years ago
|
Description
•