Граф коммитов

783 Коммитов

Автор SHA1 Сообщение Дата
Dan Minor 4967afba54 Bug 1376873 - Updates to dom/media/, dom/media/systemservices and dom/media/webrtc; r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D7438

--HG--
extra : rebase_source : 940e0276f8881e4697771f49e85bca6e41fd7c47
2018-02-20 15:23:09 -05:00
Paul Adenot 71204ef979 Bug 1502927 - Remove MediaStream.currentTime. r=baku,jib
This has never been specced and is unused appart from our tests.

Differential Revision: https://phabricator.services.mozilla.com/D10082

--HG--
extra : rebase_source : c044f11325ec630dcabb673c85531a2283ff6ad4
extra : source : db3c2a88f79cb28440f4e13bcf27c5165c6ee060
2018-10-29 17:38:19 +01:00
Cosmin Sabou dd34f6cbd5 Backed out changeset db3c2a88f79c (bug 1502927) for mochitest failures on test_reduce_time_precision. 2018-11-05 19:46:42 +02:00
Paul Adenot 6c82d39b64 Bug 1502927 - Remove MediaStream.currentTime. r=baku,jib
This has never been specced and is unused appart from our tests.

Differential Revision: https://phabricator.services.mozilla.com/D10082

--HG--
extra : rebase_source : 4c54d808fb69c0e403ff2e1775b97571889efca4
extra : histedit_source : bc568066b0684bb82b4f553b99f0dd48212aa633
2018-10-29 17:38:19 +01:00
Andreas Pehrson 7561a1fdef Bug 1258143 - Remove LocalMediaStream. r=jib,smaug
Differential Revision: https://phabricator.services.mozilla.com/D8064

--HG--
extra : moz-landing-system : lando
2018-10-15 08:17:07 +00:00
Daniel Varga 9e234e00ff Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2018-10-13 00:55:54 +03:00
Cosmin Sabou edbc4c6715 Merge mozilla-central to autoland. a=merge CLOSED TREE
--HG--
extra : amend_source : 85893d4f90b3faf7e1cc6b214501c41a9837bd96
2018-10-12 20:35:52 +03:00
Jan-Ivar Bruaroey 7d40419bc8 Bug 1497390 - Remove support for legacy mozAutoGainControl and mozNoiseSuppression constraints. r=bzbarsky,achronop a=reland
Differential Revision: https://phabricator.services.mozilla.com/D8053

--HG--
extra : amend_source : 99bbce10577ac5fb2c32a869d74e52b0f4f02142
2018-10-12 20:25:07 +03:00
Csoregi Natalia 86dc471972 Merge autoland to mozilla-central. a=merge 2018-10-12 19:55:37 +03:00
Sebastian Hengst b219f1c732 Backed out changeset 419218259bc1 (Bug 1497390) for frequently failing mda's dom/media/tests/mochitest/identity/test_fingerprints.html (bug 1498326). a=backout 2018-10-12 19:50:42 +03:00
Alex Chronopoulos 662ff54a4e Bug 934425 - Create a method in MediaManager to look up a given sink id. r=jib
Implement a new method in MediaManager that enumerates audio output devices and looks up for a given sink id asynchronously.

Differential Revision: https://phabricator.services.mozilla.com/D5870

--HG--
extra : moz-landing-system : lando
2018-10-12 08:44:23 +00:00
Alex Chronopoulos 12ad318568 Bug 934425 - Add device info in MediaDevice. r=jib
MediaDevice is the core object for audio device enumeration. By adding AudioDeviceInfo every information of audio devices will be available. In this case device id will be available from the first enumeration and there is no need to enumerate multiple times to get that info.

Differential Revision: https://phabricator.services.mozilla.com/D5869

--HG--
extra : moz-landing-system : lando
2018-10-12 08:48:22 +00:00
Csoregi Natalia 0405a5a7d2 Merge mozilla-central to autoland. CLOSED TREE 2018-10-12 19:58:03 +03:00
Alex Chronopoulos 77cf84db03 Bug 1498520 - Add missing header file to fix MinGW64 build. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D8558

--HG--
extra : moz-landing-system : lando
2018-10-12 15:08:36 +00:00
Bogdan Tara db185e5d31 Backed out 2 changesets (bug 1258143) for dom/media/tests/crashtests/791330.html failures CLOSED TREE
Backed out changeset 514420f15a67 (bug 1258143)
Backed out changeset 905c871bcf03 (bug 1258143)
2018-10-12 17:42:26 +03:00
Andreas Pehrson ecdb48777f Bug 1258143 - Remove LocalMediaStream. r=jib,smaug
Differential Revision: https://phabricator.services.mozilla.com/D8064

--HG--
extra : moz-landing-system : lando
2018-10-11 12:43:34 +00:00
Cosmin Sabou 386468ce92 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-10-12 20:42:30 +03:00
Csoregi Natalia 4688712435 Merge mozilla-central to mozilla-inbound. CLOSED TREE
--HG--
rename : testing/web-platform/tests/css/cssom/cssstyledeclaration-mutationrecord-002.html => testing/web-platform/tests/css/cssom/cssstyledeclaration-mutationrecord-005.html
extra : rebase_source : ced056102700e812cb71f2301aa74558341e67ac
2018-10-12 20:00:55 +03:00
Jan-Ivar Bruaroey 20f3798c41 Bug 1497390 - Remove support for legacy mozAutoGainControl and mozNoiseSuppression constraints. r=bzbarsky,achronop
Differential Revision: https://phabricator.services.mozilla.com/D8053

--HG--
extra : moz-landing-system : lando
2018-10-11 02:02:32 +00:00
Andrea Marchesini 38a1af1893 Bug 1497141 - FeaturePolicy: microphone, r=jib 2018-10-10 16:54:18 +02:00
Andrea Marchesini 172ef9c621 Bug 1497141 - FeaturePolicy: camera, r=jib 2018-10-10 16:54:17 +02:00
Haik Aftandilian 206f542c37 Bug 1479051 - [macOS 10.14] WebRTC sites silently fail if user previously clicked "Don't Allow" for Firefox camera/mic access r=johannh
Check if we have permission from the OS to access the camera and microphone after the user has granted access to a site.

If permission is denied at the OS level, but granted to the site within Firefox, return NotFoundError.

Differential Revision: https://phabricator.services.mozilla.com/D5458

--HG--
extra : moz-landing-system : lando
2018-10-10 08:28:41 +00:00
Alex Chronopoulos 623b33566d Bug 1479841 - Use promises instead of pledges through out audio device enumeration code path. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D6249

--HG--
extra : moz-landing-system : lando
2018-09-25 17:03:50 +00:00
Andreas Pehrson 3f65f029bf Bug 1488832 - Improve window validity checks after async gUM steps. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D6143

--HG--
extra : moz-landing-system : lando
2018-09-21 08:29:12 +00:00
Paul Adenot 3f4724fcbb Bug 1487057 - Part 4 - Remove AsyncLatencyLogger and associated code. r=pehrsons
It's not maintained and probably does not work anymore.

Differential Revision: https://phabricator.services.mozilla.com/D5438

--HG--
extra : rebase_source : ccd622e40844dda5d16266e49991462d4ea94224
2018-08-30 17:11:57 +02:00
Mike Hommey 117e48720c Bug 1489363 - Replace some string.Assign* with AssignLiteral. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D5224

--HG--
extra : moz-landing-system : lando
2018-09-07 22:12:01 +00:00
Brian Hackett 44f3ddf9d7 Bug 1486562 - Record reference count changes for SourceListener, r=jib.
--HG--
extra : rebase_source : efd7935de09e85e15d6bd77fd65a49c42be7ff6f
2018-08-31 05:24:09 -10:00
Boris Zbarsky 6748ffcaed Bug 1478890. Stop using ToXPCOMCallback in GetUserMediaDevices. r=jib 2018-07-28 00:40:29 -04:00
Boris Zbarsky 057c310979 Bug 1478890. Stop using ToXPCOMCallback in GetUserMedia code. r=jib
We don't want to expose nsXPCWrappedJS to the web, and this code is doing that.
2018-07-28 00:40:26 -04:00
Alex Chronopoulos 300cdedf50 Bug 1152401 - Rename SourceSet to MediaDeviceSet to help readability. r=jib
MozReview-Commit-ID: KLXeicyEBFG

--HG--
extra : rebase_source : 02b70606e708d414cfeb3e38a2569c1d85c1d853
2018-07-16 11:30:46 +02:00
Alex Chronopoulos cf8c19c806 Bug 1152401 - Create pref to enable enumeration of output devices. r=jib
MozReview-Commit-ID: G1oB6hlBcsl

--HG--
extra : rebase_source : f966c58496394947094ca66de0079a79b33a745d
2018-07-16 11:30:46 +02:00
Alex Chronopoulos 9e8bb0c379 Bug 1152401 - Update enumerate methods of MediaManager and MediaEngine to accept audio sink type. r=jib
MozReview-Commit-ID: 1RClh9UNQck

--HG--
extra : rebase_source : 23e3f1b9e4ad42f0cff86d3903e2b0c7e5bc6a01
2018-07-16 11:30:46 +02:00
Alex Chronopoulos 367ccc1325 Bug 1152401 - Add MediaDeviceKind member in MediaDevice to differentiate sink devices. r=jib
MozReview-Commit-ID: E6SGabjpqIA

--HG--
extra : rebase_source : ec79f2f8d949334209c0346e624fa4b16c8732a5
2018-07-16 11:29:12 +02:00
Alex Chronopoulos 5d13851360 Bug 1152401 - Use MediaDevice in MediaEngine to allow enumeration of both sinks and sources. r=jib
MozReview-Commit-ID: 6ntA5YUFSnN

--HG--
extra : rebase_source : d90bc121bc8e4152d76429e2a49f4d4cc1cf439e
2018-07-11 08:59:13 +02:00
Margareta Eliza Balazs 0cf58ddcab Backed out 9 changesets (bug 1152401) for android gv-junit failures org.mozilla.geckoview.test.PermissionDelegateTest.media on a CLOSED TREE
Backed out changeset 987f2e0b2cb1 (bug 1152401)
Backed out changeset e45630a7c7b1 (bug 1152401)
Backed out changeset 95661c6cd914 (bug 1152401)
Backed out changeset d68ab111809f (bug 1152401)
Backed out changeset 10b039210911 (bug 1152401)
Backed out changeset aebabaa96ad3 (bug 1152401)
Backed out changeset 93457990e40f (bug 1152401)
Backed out changeset 1630f67ac197 (bug 1152401)
Backed out changeset aef64bf5b024 (bug 1152401)
2018-07-19 13:35:58 +03:00
Alex Chronopoulos 9e3e8b757e Bug 1152401 - Rename SourceSet to MediaDeviceSet to help readability. r=jib
MozReview-Commit-ID: KLXeicyEBFG

--HG--
extra : rebase_source : 02b70606e708d414cfeb3e38a2569c1d85c1d853
2018-07-16 11:30:46 +02:00
Alex Chronopoulos fb5a69fe6f Bug 1152401 - Create pref to enable enumeration of output devices. r=jib
MozReview-Commit-ID: G1oB6hlBcsl

--HG--
extra : rebase_source : f966c58496394947094ca66de0079a79b33a745d
2018-07-16 11:30:46 +02:00
Alex Chronopoulos 0a08cf0372 Bug 1152401 - Update enumerate methods of MediaManager and MediaEngine to accept audio sink type. r=jib
MozReview-Commit-ID: 1RClh9UNQck

--HG--
extra : rebase_source : 23e3f1b9e4ad42f0cff86d3903e2b0c7e5bc6a01
2018-07-16 11:30:46 +02:00
Alex Chronopoulos 0e13e8f104 Bug 1152401 - Add MediaDeviceKind member in MediaDevice to differentiate sink devices. r=jib
MozReview-Commit-ID: E6SGabjpqIA

--HG--
extra : rebase_source : ec79f2f8d949334209c0346e624fa4b16c8732a5
2018-07-16 11:29:12 +02:00
Alex Chronopoulos 43ba614cd9 Bug 1152401 - Use MediaDevice in MediaEngine to allow enumeration of both sinks and sources. r=jib
MozReview-Commit-ID: 6ntA5YUFSnN

--HG--
extra : rebase_source : d90bc121bc8e4152d76429e2a49f4d4cc1cf439e
2018-07-11 08:59:13 +02:00
Andrea Marchesini a053cf1c15 Bug 1476306 - Moving NullPrincipal/ContentPrincipal/SystemPrincipal under mozilla namespace - part 1 - NullPrincipal, r=ckerschb 2018-07-17 21:37:48 +02:00
Chris Pearce 3bd3559da3 Bug 1470932 - Get principal from nsGlobalWindowInner directly in MediaManaager::IsActivelyCapturingOrHasAPermission(). r=baku
nsGlobalWindowInner::GetExtantDoc() can potentially return null, and
we're not null checking its return value in
MediaManaager::IsActivelyCapturingOrHasAPermission() which I think is the
cause of this crash.

So instead of getting the principal from the window's extant doc, we can
get the principal directly from the nsGlobalWindowInner.

MozReview-Commit-ID: BUwiJGLss2a

--HG--
extra : rebase_source : 5135a2ef524044c44046705f4a7c7516f01f6b34
2018-07-04 12:53:18 +12:00
Emilio Cobos Álvarez 1e9c395548 Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj
Same approach as the other bug, mostly replacing automatically by removing
'using mozilla::Forward;' and then:

  s/mozilla::Forward/std::forward/
  s/Forward</std::forward</

The only file that required manual fixup was TestTreeTraversal.cpp, which had
a class called TestNodeForward with template parameters :)

MozReview-Commit-ID: A88qFG5AccP
2018-06-02 09:33:26 +02:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Dan Minor a20dc982b3 Bug 1450658 - Add preference to disable focusing source; r=pehrsons
Focusing a source during a test run can cause Firefox to lose focus and
subsequent tests to timeout. This adds a preference which defaults to true
that allows the source to be focused. It is then set to false for tests that
involve screen sharing.

MozReview-Commit-ID: CNq2c87y8Ho

--HG--
extra : rebase_source : 805e2cbf9c09af419419a64d074e020784185b1d
2018-05-29 16:14:38 -04:00
Dan Minor 50a3ab6cd4 Bug 1450658 - Should bring window to front when screen-sharing a window; r=pehrsons
This adds a FocusOnSelectedSource method to PCameras and uses it to focus the
selected window while window sharing. We can't just focus the window as soon as
it is shared because we have a live preview in the getUserMedia permissions
prompt which would cause the prompt to lose focus. Instead, this only focuses the
window when the sharing is not done from a chrome context.


MozReview-Commit-ID: 5jre75E3JLi

--HG--
extra : rebase_source : 5f5154fc9fc7590cc02eb25146e5bc20b2243fa3
2018-05-08 15:55:36 -04:00
Dorel Luca 8e1a0ee1c6 Backed out changeset c13ca75c9bcb (bug 1450658) for Browser-Chrome failures on browser/base/content/test/webrtc/browser_devices_get_user_media_screen.js 2018-05-23 17:07:33 +03:00
Dan Minor 40fcbf60d9 Bug 1450658 - Should bring window to front when screen-sharing a window; r=pehrsons
This adds a FocusOnSelectedSource method to PCameras and uses it to focus the
selected window while window sharing. We can't just focus the window as soon as
it is shared because we have a live preview in the getUserMedia permissions
prompt which would cause the prompt to lose focus. Instead, this only focuses the
window when the sharing is not done from a chrome context.


MozReview-Commit-ID: 5jre75E3JLi

--HG--
extra : rebase_source : 97f472f6ed1c5d6bed1af01fb7243a82b2629b03
2018-05-08 15:55:36 -04:00
Kyle Machulis 541d6f6f00 Bug 1453517 - Remove nsPopupWindowManager and related XPCOM bits; r=bz
MozReview-Commit-ID: JIDdZfnNN8E

--HG--
extra : rebase_source : 8b92fec383a21f80fceb87502e9a7accdb7dd74f
2018-04-11 16:16:13 -07:00
Alex Chronopoulos a1457bde95 Bug 1452993 - Get MSG instance from MediaStream to avoid the risk of creating new instance. r=padenot
MozReview-Commit-ID: F1R4FCEe1Gf

--HG--
extra : rebase_source : cfafb0b1ba95ae2aa2dcd77ba681a1026e89f1f5
2018-04-10 18:06:32 +03:00
Jan-Ivar Bruaroey 6a472b4cb4 Bug 1452031 - Close fingerprint concern by removing code no longer needed to handle NotFoundError spec case. r=pehrsons
MozReview-Commit-ID: KVQjO18PL0I

--HG--
extra : rebase_source : 3e8f94c486bad728c5c54b8ea3f148f452ea2b07
2018-04-10 01:49:15 -04:00
Jan-Ivar Bruaroey 4665da444b Bug 1452031 - InternalError is not a valid gUM error per spec. Use AbortError instead. r=pehrsons
MozReview-Commit-ID: 3pMRl1XgkfS

--HG--
extra : rebase_source : 6e3ce9812657b09f0a38b5e807cc7b01b0a6789e
2018-04-06 15:06:16 -04:00
Jan-Ivar Bruaroey b5b5ad5862 Bug 1452031 - Use strong types for Media error names, fixing OverconstrainedError typo. r=pehrsons
MozReview-Commit-ID: AqGoW9rBdl5

--HG--
extra : rebase_source : fc7a638a2502aaebf318a35c6135755558a7396b
2018-04-10 01:22:53 -04:00
Andreas Pehrson 2027a140e6 Bug 1452472 - Guard against stopped source and removed listener after timer fired. r=jib
MozReview-Commit-ID: 72M3xpbOgXP

--HG--
extra : rebase_source : c4ddcce0eac7b7539a61f389010f09383e15ee1f
2018-04-09 13:53:32 +02:00
Alex Chronopoulos 2ef6a59abe Bug 1387454 - Create a MediaStreamGraph according to the given sample rate. r=padenot
MozReview-Commit-ID: 4YP8oWIVyjy

--HG--
extra : rebase_source : 54c83c0aa122fecc9e07868405e42d31b2172516
2018-04-03 20:02:15 +03:00
Bryce Van Dyk b1fb8c3b44 Bug 1436523 - Change DeviceEnumerationType to scoped enum, add extra logging. r=achronop
Update the DeviceEnumerationType enum to scoped style enum for safety and
consistency. Add extra logging to aid in debugging test issues.

MozReview-Commit-ID: cm5bdlIcEG

--HG--
extra : rebase_source : bfcae3d49f809edfd0ed6ab3e516b8be0c0d517e
2018-03-16 15:09:26 -04:00
Bryce Van Dyk aa68bc0511 Bug 1436523 - Rework media manager enumeration to prefer loopback to fake devices, allow mixing of fake and loopback. r=achronop
Change the media manager so that if fake and loopback devices are requested,
loopback is preferred. With this change loopback and fake devices can also be
mixed. Since the fake flag is coarse, and does not specify fake audio or video,
we would previously just make everything fake. As loopback sets flags for video
and audio separately, we can now request a single loopback device, while also
setting the fake flag to get a mix. E.g. if we request a loopback audio device,
and set the fake flag, we should get loopback audio and fake video.

This change also attempts to somewhat consolidate where these settings take
place. Previously, EnumerateRawDevices did much of the loopback setup. However,
other steps around fingerprint resistance or fake devices were done in earlier
functions (EnumerateDevices and GetUserMedia). This changeset moves the loopback
setup so that it's more consolidated with the other setup code in these
functions.

MozReview-Commit-ID: FF0bR0Nyws9

--HG--
extra : rebase_source : 374a6fd0842a430e27c695bcf956e2e072a77fc3
2018-02-12 16:56:26 -05:00
Bryce Van Dyk 057cac41e3 Bug 1436523 - Add enum to specify select type of devices to enumerate in MediaManager rather than use bools. r=achronop
Prior to this patch various bools are used to track if we requst fake or
loopback devices during enumeration. However, since the normal, fake, and
loopback cases are mutually exclusive, a enum can be used. This provides allows
for having descriptive enum values in code and makes clear that the settings are
mutually exclusive.

MozReview-Commit-ID: FF0bR0Nyws9

--HG--
extra : rebase_source : 498513bdc6673fa299080097364a6d0dff00a073
2018-02-12 16:55:45 -05:00
Nathan Froyd 052d391b9c Bug 1448031 - make various audio/video/media constructors explicit; r=gerald
Attempting to stand up the static analysis for Android builds revealed
that we weren't being explicit enough.
2018-03-27 10:51:32 -04:00
Andreas Pehrson b51b21aa64 Bug 1435036 - Improve window checks. r=jib 2018-03-19 09:40:38 +01:00
Bryce Van Dyk 70d6e49a13 Bug 1434477 - Add extra logging to MediaManager's device enumeration path. r=padenot
Add logging was added to help diagnose gUM failures and provide more log
coverage of that code path.

MozReview-Commit-ID: A76fjlUVpmn

--HG--
extra : rebase_source : 6f67ab223739474c8dec7a72a1ff322503c4df96
2018-03-16 15:09:55 -04:00
Matthew Gregan 3eacaf6b89 Bug 1445546 - Initialize COM on the MediaManager thread. r=padenot
MozReview-Commit-ID: 92FErxjmDE5

--HG--
extra : rebase_source : a1c3c5a1dd08a81fff64c85e7a953052803de64c
2018-03-20 10:31:40 +13:00
Andreas Pehrson 85229c5bef Bug 1438134 - Resolve ApplyConstraints and end track on unexpected error. r=jib
MozReview-Commit-ID: 1uVHTCOwlQw

--HG--
extra : rebase_source : 62a77cacad9de70511fe73006a26da627f002d5c
2018-02-23 10:06:22 +01:00
Andreas Pehrson 1a2a215d37 Bug 1438134 - MozPromisify ApplyConstraints internals. r=jib
MozReview-Commit-ID: Gu9yOxFW1di

--HG--
extra : rebase_source : 419d1a85cb1d94512d7bcb122deedca68dc61b29
2018-02-23 10:05:42 +01:00
Andreas Pehrson ae9597da39 Bug 1436341 - Fix assertion for when a device operation fails. r=jib
The previous assertion was from an earlier developer stage which changed
during development of bug 1299515. It assumed that mDeviceEnabled was
updated only after passing the assert.

In the final version of bug 1299515 that is no longer true, and
both the failed and the successful device operation asserts
can now be unified to one.

MozReview-Commit-ID: KMdnIs0UgPr

--HG--
extra : rebase_source : 936900db168623f913aaa76a9148d4ee80157493
2018-03-07 12:42:58 +01:00
Andreas Pehrson 8edbfe79d6 Bug 1436074 - Reduce turn-off timer by time since we turned on. r=jib
MozReview-Commit-ID: 2AvnJxUSTmy

--HG--
extra : rebase_source : a9251389dac3fd0d0552de28463decb80fa3de3f
extra : source : 1aff350b83b8d504dbaa3d5d8d4fe6cd99512786
extra : histedit_source : 6ffb6b65d3e0a8ecf2744d9b3e758de417c3d727
2018-02-14 16:35:45 +01:00
Andreas Pehrson c9e4a19d1e Bug 1436694 - MozPromisify device initialization and move it to SourceListener. r=jib
This so that SourceListener can keep its internal state in sync with the result
of the start operation.

MozReview-Commit-ID: Cgl5TFnpCeW

--HG--
extra : rebase_source : e2cec60544efcc27c9c8c077fbdb013a8f3b848c
extra : source : 6c38cc382d2114199842dddb14097be8b6d9a961
extra : histedit_source : 00ef8da067eb484b8c5926d008f00f1e9f006e6f
2018-02-16 11:55:27 +01:00
Andreas Pehrson 4327e2bf5c Bug 1436694 - Make a PostTask variant that returns a MozPromise. r=jib, r=jya
MozReview-Commit-ID: 76mLpntaU5v

--HG--
extra : rebase_source : d6122976252f27f49c3115d9be43959b93141b3a
extra : source : ae428bfb913fb929da4d83864e58727177ccd655
extra : histedit_source : 8d71a8bc1fac3741694aebc3df5246b61f31f10d
2018-02-15 15:18:12 +01:00
Andreas Pehrson e3a7f4a047 Bug 1440356 - Only call the window callback for found listeners. r=johannh
--HG--
extra : rebase_source : 8f9d46574cfe42fadd5c325d310df0e6f304f106
extra : histedit_source : 213e340980db569309a994f25e2eb0b2b2de61e6
2018-02-23 16:34:32 +01:00
Andreas Pehrson 7f249574a3 Bug 1440356 - Combine CaptureState for all child windows when calculating overall state. r=johannh
--HG--
extra : rebase_source : 488c2c705b250e4b4fdb7254245946ec2046c8c9
extra : histedit_source : 899c13c81d62e77610150734de629b6143e9f563
2018-02-23 15:52:03 +01:00
Andreas Pehrson f74e7b16c3 Bug 1440356 - Rewrite IterateWindowListeners to use lambdas. r=padenot
--HG--
extra : rebase_source : 8caa10a5168b515b74e0e68e1ce0a9f384f040b3
extra : histedit_source : 5e645781fd3ff2415b620d70abccd37934aa1bf5
2018-02-23 15:50:57 +01:00
Brindusan Cristian e1d9e5f7ed Backed out 4 changesets (bug 1436074, bug 1436694) for frequent asertion failures at MediaEngineWebRTCAudio.cpp CLOSED TREE
Backed out changeset 1aff350b83b8 (bug 1436074)
Backed out changeset f5cc71d38e4a (bug 1436694)
Backed out changeset 6c38cc382d21 (bug 1436694)
Backed out changeset ae428bfb913f (bug 1436694)
2018-02-26 17:54:18 +02:00
Andreas Pehrson 210228f94e Bug 1436074 - Reduce turn-off timer by time since we turned on. r=jib
MozReview-Commit-ID: 2AvnJxUSTmy

--HG--
extra : rebase_source : c0f0755c15e9ed564f333856125a1c1a9e05b4bf
2018-02-14 16:35:45 +01:00
Andreas Pehrson 98c3816ece Bug 1436694 - MozPromisify device initialization and move it to SourceListener. r=jib
This so that SourceListener can keep its internal state in sync with the result
of the start operation.

MozReview-Commit-ID: Cgl5TFnpCeW

--HG--
extra : rebase_source : 4a7e8c1217b0db3879312d4b33dc74227e969608
2018-02-16 11:55:27 +01:00
Andreas Pehrson fc712f4a1a Bug 1436694 - Make a PostTask variant that returns a MozPromise. r=jib, r=jya
MozReview-Commit-ID: 76mLpntaU5v

--HG--
extra : rebase_source : bd0ac6102854b5d50d711c16c94c6cfd07274f69
2018-02-15 15:18:12 +01:00
Andreas Pehrson e52987eee4 Bug 1436352 - Enable turning microphone off on track-disable by default. r=jib
MozReview-Commit-ID: LwIPkOD46p3

--HG--
extra : rebase_source : ddf21aec7f95c4071cc1955f446353e3b0361c36
2018-02-19 16:13:43 +01:00
Andreas Pehrson 4acbf7149c Bug 1438538 - Fix SourceListener::CapturingAudio logic. r=johannh
MozReview-Commit-ID: 9K0kOatj1CQ

--HG--
extra : rebase_source : ff026916008bafa17615d01ad01dd87aafab467a
2018-02-20 13:40:46 +01:00
Paul Adenot 03d4052829 Bug 1434600 - Clean up the MediaEngineWebRTC*Source when navigating away from a document. r=pehrsons
MozReview-Commit-ID: 4XXJ6fcdV9G

--HG--
extra : rebase_source : 610219c774e4fbfe5265d51f9cf818c178e0704b
2018-01-31 19:03:39 +01:00
Paul Adenot 4bf54def7a Bug 1434600 - Plumb the window ID down to Enumerate{Audio,Video}Devices. r=pehrsons
MozReview-Commit-ID: 57d8l89Iq4v

--HG--
extra : rebase_source : a31703dfedadbedfc0dbbb0a4949db672cc16c70
2018-01-31 17:57:59 +01:00
Andreas Pehrson f3cc4b74af Bug 1299515 - Fix bustage on a CLOSED TREE. r=me
--HG--
extra : rebase_source : 5312eaeec727b4cc9ced77fc2adbbff19ab6cc26
extra : histedit_source : c6638f1b1df9af06b30412e774c4a6f782d45c8c
2018-01-31 16:08:13 +01:00
Andreas Pehrson 63cdbabafe Bug 1299515 - Make LocalTrackSource hold a WeakPtr to SourceListener. r=jib
MozReview-Commit-ID: 93jKsK5JfqG

--HG--
extra : rebase_source : f75b7e53760be63123f22ef1f7981c7d8e38132c
2018-01-23 11:31:22 +01:00
Andreas Pehrson 2b25cd7258 Bug 1299515 - Signal SetPullEnabled with a message. r=padenot
With the added invariant that NotifyPull() needs a MediaStreamListener present
to not underrun, we need SetPullEnabled() and AddListener() to stay in sync by
using the same signaling mechanism.

MozReview-Commit-ID: 49KWdiTOG98

--HG--
extra : rebase_source : d0ad44d7ce431aa792c4908f96baf0c0920dbe90
2018-01-03 11:59:41 +01:00
Andreas Pehrson 1eb21f16e5 Bug 1299515 - Replace a rawptr handoff with generalized lambda capture. r=jib
MozReview-Commit-ID: A1hbcpdHygY

--HG--
extra : rebase_source : 97ac2f1fe6da2596754f3ade1a59ceae582294da
2017-12-20 21:54:16 +01:00
Andreas Pehrson 09f130fe44 Bug 1299515 - Wire up track-disabling logic to frontend APIs. r=jib, r=johannh
This modifies mediaCaptureWindowState() to say whether a camera or microphone is
actively captured or not. Note that this is not the same as the device being
on or off. If we disallow a device from being off while disabled, we still
notify chrome that we're not actively capturing.

MozReview-Commit-ID: B1taormqc3j

--HG--
extra : rebase_source : 292d323c4b9711cc242170f5c5c139bb87658c44
2017-11-17 20:13:06 +01:00
Andreas Pehrson a9436d8f79 Bug 1299515 - Stop Camera and Microphone device when tracks become disabled. r=jib
This wires up the disabling of a track with actually stopping the device if we
allow it.

This is possible for:
- Camera (enabled by default, controlled by pref
  "media.getusermedia.camera.off_while_disabled.enabled")
- Microphone (disabled by default, controlled by pref
  "media.getusermedia.microphone.off_while_disabled.enabled")

Screen-, app-, or windowsharing is not supported at this time.

On disabling, there's a delay before the device is ordered to stop. This is
now defaulting to 3 seconds but can be overriden by prefs
"media.getusermedia.camera.off_while_disabled.delay_ms" and
"media.getusermedia.microphone.off_while_disabled.delay_ms".

The delay is in place to prevent misuse by malicious sites. If a track is
re-enabled before the delay has passed, the device will not be touched until
another disable followed by the full delay happens.

MozReview-Commit-ID: D4nZWzrYZGm

--HG--
extra : rebase_source : 6a54fa450bd435ed65de2a30b66d25f4a5e8241e
2017-11-17 19:56:00 +01:00
Andreas Pehrson abde2fb147 Bug 1299516 - Allow MediaEngines to Start() and Stop() without affecting tracks. r=jib, r=padenot
This is the larger change for this bug. In order to turn off a device on
disabling we want to Stop() it without ending the attached track.

To allow this, this patch breaks out track-creation from Start() to SetTrack()
and moves track-ending logic from Stop() to Deallocate().

It is a programming error to Start() or Stop() a MediaEngineSource that hasn't
seen a SetTrack().

MozReview-Commit-ID: 3KzmuDjCAH0

--HG--
extra : rebase_source : 361d9b9c2a818ce51fa90d88950d5992c51407c6
2017-12-18 16:19:33 +01:00
Andreas Pehrson 3ceaba23ab Bug 1299515 - Flatten MediaEngineSource class hierarchy. r=jib
The scope of flattening this hierarchy quickly grows large, so this patch does
a couple more things:
- Creates a pure interface MediaEngineSourceInterface and a base class
  MediaEngineSource with common defaults and refcount support (no state!)
- Breaks out some of the helper classes to dedicated files, e.g.,
  AllocationHandle, MediaEnginePrefs.
- Clarifies the threading model (written on one thread *and* under lock,
  read under either)
- Fixes style, indentation, include-sorting in the affected files
- Adds comments, especially for clarifying what responsibilities methods have,
  and thread usage of class members
- Changes Monitors to Mutexes since we only use them as Mutexes anyhow
- Makes MediaEngineRemoteVideoSource no longer a shared source since we now
  support scaling in this source and CamerasChild can act as a broker of frames.
  This greatly simplifies it. The only shared source is now
  MediaEngineWebRTCMicrophoneSource, so the sharing specific common methods have
  been moved to that source.

MozReview-Commit-ID: KeVZQo6gLm2

--HG--
rename : dom/media/webrtc/MediaEngine.h => dom/media/webrtc/MediaEnginePrefs.h
extra : rebase_source : c785a5feb896312912170475d6b8d997e712e48f
2018-01-24 16:49:13 +01:00
Andreas Pehrson b938a74c42 Bug 1299515 - Remove special handling for releasing callbacks on main thread. r=jib
MozReview-Commit-ID: 1JtVdbkL1DK

--HG--
extra : rebase_source : 2b6ddaef9c44cf0a6a7e044f088ee5818ad1b725
2017-11-15 18:40:35 +01:00
Andreas Pehrson 85f30b0b5b Bug 1299515 - Remove ReleaseMediaOperationResource. r=jib
MozReview-Commit-ID: 184hG8rMCmc

--HG--
extra : rebase_source : e4ac7637254baff5ac2cb093c263d5bcd681a37e
2017-11-14 11:53:52 +01:00
Andreas Pehrson c7709bb25d Bug 1299515 - Remove GetUserMediaNotificationEvent. r=jib
MozReview-Commit-ID: 3ecH5vCce17

--HG--
extra : rebase_source : 37843f4438a61e2415296d608a2506eba100b5b9
2017-11-14 11:50:07 +01:00
Andreas Pehrson 85ded5b958 Bug 1299515 - Plumb MediaStreamTrack enabled state to sources. r=jib
MozReview-Commit-ID: Eg1g9JtLmOz

--HG--
extra : rebase_source : 73057e1093d487736f69addca346b05c48d8d280
2017-11-10 15:55:42 +01:00
Andreas Pehrson ee75d2b969 Bug 1408294 - Assert that NotifyPull produces data. r=padenot
MozReview-Commit-ID: CtC8A83iJgg

--HG--
extra : rebase_source : ada5a771164fafe35d22589956ced6f54545ee73
2017-12-05 14:34:08 +01:00
Johann Hofmann 8a35c0aab3 Bug 1345077 - Part 1 - Add an isHandlingUserInput flag to WebRTC permission requests. r=baku,padenot
MozReview-Commit-ID: SGu9lWjPH5

--HG--
extra : rebase_source : 18e49399247ea5b69dc603b70ef9981f97b618ba
2018-01-10 23:59:55 +01:00
Munro Mengjue Chiang 1051352e87 Bug 1423515 - register callback while creating the real backend. r=pehrsons
MozReview-Commit-ID: 2uVZ9VBAut0

--HG--
extra : rebase_source : e51862ad3f4ec74066b080eac66d69f428b86426
2017-12-06 19:09:40 +08:00
Jan-Ivar Bruaroey 4bed737a12 Bug 1422875 - Fix fake constraint to not apply to screensharing (on all platforms but android). r=pehrsons
MozReview-Commit-ID: K35vaNAolEy

--HG--
extra : rebase_source : 53fae5a862320ae6386e52d4163b06bea5c644d1
2017-12-04 11:56:28 -05:00
Jan-Ivar Bruaroey 22aabfd482 Bug 1422875 - Fix fake constraint to not apply to screensharing for media.navigator.permission.device codepath (aka Android) r=pehrsons
MozReview-Commit-ID: L9IIalMuFoC

--HG--
extra : rebase_source : 04842126225b6d96e37eb07c09e23439be552450
2017-12-04 11:25:50 -05:00
Andreas Pehrson 447e3169a3 Bug 1412394 - Remove window listeners explicitly during shutdown. r=jib
Currently we run the risk of missing MediaManager::OnNavigation() at shutdown in
some cases. When it happens, cleanup of window listeners is delayed to
MediaManager::Shutdown().

Triggering window listener shutdown through the destructor doesn't work when the
destructor is invoked by WindowTable::Clear(), as clearing out the
window listener's SourceListeners will trigger a call back into
WindowTable::Remove() to remove the now empty window listener.
This is not allowed by the hash table implementation.

This patch fixes this by changing strategy from cleanup-in-dtor to explicit-cleanup-before-dtor and making a non-clean state in the dtor an error.

MozReview-Commit-ID: C9FryVlv28d

--HG--
extra : rebase_source : 55ccf96b15eb3261d5176364e6952f51415bc668
2017-11-06 15:27:36 +01:00
Andreas Pehrson 5b49365cb5 Bug 1412394 - Delay blocking MediaManager::PostTask until media thread shutdown. r=jib
This delays setting sInShutdown (renamed to sHasShutdown for better semantics)
until all that remains of shutdown is to shut down the media thread.

From JS this is no change as JS cannot run until Shutdown() is done.

The difference is that we let members and still-active listeners get destroyed
and cause any members that are media-thread only (in this case devices), to shut
down before the thread goes away.

MozReview-Commit-ID: 5NTWwh8Umn8

--HG--
extra : rebase_source : f6b508abc95434f027a6544fdac53949138764da
2017-11-02 16:27:33 +01:00
Tom Ritter 5e81122570 Bug 1411742 Remove the pref media.getusermedia.playout_delay and the field as they are not used anywhere r=jib
MozReview-Commit-ID: Gjbeg0zWtJ1

--HG--
extra : rebase_source : 55ad0e8f5e8ec45e7ed365ea516da9ecbc498253
2017-11-16 21:57:07 -06:00
Tom Ritter 3b8bd8d918 Bug 1411742 Remove the media.navigator.video.default_minfps pref and all uses of it as the field is never actually used r=jib
MozReview-Commit-ID: 3WsdL18BF75

--HG--
extra : rebase_source : 9c0016e5045f50876c8db13930408b54fb8e1ac4
2017-10-26 11:37:16 -05:00