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

856 Коммитов

Автор SHA1 Сообщение Дата
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
Tom Ritter f9e8727c01 Bug 1411739 Use window::IsSecureContext to determine if screensharing is allowed instead of checking for https r=jib
MozReview-Commit-ID: HCKY1bNcpy4

--HG--
extra : rebase_source : 43ae071aef39bcf6af945fcd850721837505aed3
2017-10-26 11:09:29 -05:00
Chung-Sheng Fu 75fb42afad Bug 1372073 - Ignore constraints in getUserMedia. r=arthuredelstein,jib
MozReview-Commit-ID: KdA9abmg3UA

--HG--
extra : rebase_source : f72c8e0d48ad86780f98e2b61e30fd67cc849f82
2017-09-18 17:51:51 +08:00
Chung-Sheng Fu 03debed820 Bug 1372073 - Spoof navigator.mediaDevices.enumerateDevices. r=arthuredelstein,jib,smaug
MozReview-Commit-ID: HubfB6M4UM0

--HG--
extra : rebase_source : 050065e484bdae32bf6cfcd730a6bfb626ad0508
2017-09-18 09:52:06 +08:00
Nika Layzell 2cb3ebf10d Bug 1414974 - Part 4: Split WindowByIdTable into two separate tables for inner and outer windows, r=bz
MozReview-Commit-ID: LH3lKkFqTgG
2017-11-09 10:44:48 -05:00
Nika Layzell ff8b5bd178 Bug 1414974 - Part 3: Move Get{Inner,Outer}WindowWithId onto the specific subclasses, r=smaug
These were originally exposed directly as static methods on nsGlobalWindow, but
as they are clearly associated with either the inner or outer window, it makes
more sense for them to be called as such.

MozReview-Commit-ID: LFq8EfnhDlo
2017-11-09 10:44:47 -05:00
Nika Layzell 3409141758 Bug 1414974 - Part 2: Switch many consumers to nsGlobalWindow{Inner,Outer}, r=smaug
This is a large patch which tries to switch many of the external consumers of
nsGlobalWindow to instead use the new Inner or Outer variants.

MozReview-Commit-ID: 99648Lm46T5
2017-11-09 10:44:47 -05:00
Andreas Pehrson 79107aea64 Bug 1405599 - GetUserMedia should reject when document not fully active. r=jib, r=bz
MozReview-Commit-ID: DLIuFMZLGFc

--HG--
extra : rebase_source : 6043b392bd659deb4c1c7ec012014cb264c38417
2017-10-04 11:24:35 +02:00
Masatoshi Kimura dbd92543c6 Bug 1313150 - Remove |weak| parameter from nsIMutableArray methods. r=froydnj
MozReview-Commit-ID: 7JoD4VYzZp3

--HG--
extra : rebase_source : 5db437f1c34608aa223916874d62b48c59baeae8
2017-10-21 23:53:02 +09:00
Andreas Pehrson b46de63fa2 Bug 1403186 - Add guards and sanity checks for Activated vs Stopped state. r=jib
MozReview-Commit-ID: 8Rdm3I0Z4SP

--HG--
extra : rebase_source : eccb161b3378961c0a4e01f809a1ac957ae32338
2017-10-02 15:13:15 +02:00
Andreas Pehrson 47611af5a5 Bug 1403186 - Don't call NotifyFinished if not activated. r=jib
MozReview-Commit-ID: JTUIXhK6mfi

--HG--
extra : rebase_source : 8158cf363516013a7dce35a6271dac75ac444ed3
2017-10-03 11:52:18 +02:00
Jan-Ivar Bruaroey 6a80cdfeb9 Bug 1406988 - Assert MediaManager invariant where applicable, and check for existence everywhere else. r=pehrsons
MozReview-Commit-ID: KfGP96IE17G

--HG--
extra : rebase_source : d03aeea5f8809b07d2172ee706a616b863526505
2017-09-29 15:06:51 -04:00
Wes Kocher eb9a2ed0f2 Merge inbound to central, a=merge
MozReview-Commit-ID: IqwKWn7ceHC
2017-09-29 14:47:25 -07:00
Andreas Farre 2e8f0b10d0 Bug 1403586 - Don't disble budget throttling due to gUM. r=smaug,padenot 2017-09-29 15:21:45 +02:00
Munro Mengjue Chiang e39858f1cd Bug 1402377 - Stop the corresponding track instead of the whole stream when an external device is plugged out. r=jib,pehrsons
MozReview-Commit-ID: 7gbB5sgn6xI

--HG--
extra : rebase_source : 9dc0b1cc8d1dd55c4fb71f444c165498f0e7f7ad
2017-09-27 10:16:46 +08:00
Andreas Pehrson d918302551 Bug 1319446 - DirectMediaStreamListener, you are dead to me. r=padenot
MozReview-Commit-ID: KwztE5ogSj9

--HG--
extra : rebase_source : e8e6bb3548c5697c5db901c0310ea5067a30c895
2017-09-27 12:01:46 +02:00
Chris Peterson 210c7f9690 Bug 870698 - Part 9: Replace Assign(NS_LITERAL_STRING("")) with AssignLiteral(u""). r=erahm
The NS_LITERAL_STRING macro creates a temporary nsLiteralString to encapsulate the char16_t string literal and its length, but AssignLiteral() can determine the char16_t string literal's length at compile-time without nsLiteralString.

MozReview-Commit-ID: 6vgQiU8zN3o

--HG--
extra : rebase_source : 1b536b92ef43f610db057ace6f108620e8d8b4d5
extra : source : 336e21386d5eeb16f1c9893c29377f23b67cc4b0
2017-09-06 01:43:13 -07:00
Nicholas Nethercote e3c9cbb969 Bug 1401813 - Rename Null[C]String() as Void[C]String(). r=erahm.
XPCOM's string API doesn't have the notion of a "null string". But it does have
the notion of a "void string" (or "voided string"), and that's what these
functions are returning. So the names should reflect that.

--HG--
extra : rebase_source : 4e3f982e0873877174a08a25413595ff66f7d20e
2017-09-22 14:35:46 +10:00
Jan-Ivar Bruaroey c0da003175 Bug 1381638 - Prevent sharing multiple input devices in the same process. r=jesup 2017-09-15 23:00:39 -04:00
Munro Mengjue Chiang bb4430fa36 Bug 1399395 - skip devicechange event handler in shutdown stage. r=pehrsons
MozReview-Commit-ID: 8skWP7LuGvR

--HG--
extra : rebase_source : 4003690eedd10ee1676aecfc8f304593004f66ce
2017-09-14 11:16:42 +08:00
Andreas Farre 2a3cdfc4f6 Bug 1393359 - Register active user media on top level window. r=smaug,jib 2017-09-04 14:40:30 +02:00
Andrew McCreight 78807d8776 Bug 1391005 - Eliminate NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED. r=peterv
Replace it with NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION, because it
has been the same for a while.

MozReview-Commit-ID: 5agRGFyUry1

--HG--
extra : rebase_source : 5388c56b2f6905c6ef969150f0c5b77bf247624d
2017-08-29 16:02:48 -07:00
Matthew Gregan 2f8cc7804c Bug 1388236 - Remove B2G-only AudioChannel code from MSG. r=padenot 2017-08-10 13:00:08 +12:00
Eric Rahm 01f545fea7 Bug 1386825 - Part 1: Remove MOZ_B2G from dom. r=bkelly
MozReview-Commit-ID: 1zzP2r01B7U
2017-08-08 14:41:05 -07:00
Sebastian Hengst 915c63c332 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-07-31 11:28:37 +02:00
Nicholas Nethercote 72c884bf74 Bug 1384835 (part 3, attempt 2) - Remove the Preferences::Get*CString() variants that return nsAdoptingCString. r=froydnj.
--HG--
extra : rebase_source : d317b25be2ec21d1a60d25da3689e46cdce0b649
2017-07-31 14:28:48 +10:00
Munro Mengjue Chiang d92f208dba Bug 1364038 - Call SourceListener::StopTrack when the coresponding external device is disconnected. r=jib
MozReview-Commit-ID: EfpmXBJf7PP

--HG--
extra : rebase_source : b79b7969c6693ba980c5135784ddb1753e711ec4
2017-07-27 16:51:24 +08:00
Sebastian Hengst 5a483737cd Backed out changeset 0cce9f382987 (bug 1364038) for failing mda's dom/media/tests/mochitest/test_peerConnection_addSecondVideoStream.html. r=backout on a CLOSED TREE 2017-07-27 18:32:58 +02:00
Munro Mengjue Chiang dc857a8098 Bug 1364038 - Call SourceListener::StopTrack when the coresponding external device is disconnected. r=jib
MozReview-Commit-ID: EfpmXBJf7PP

--HG--
extra : rebase_source : 328b146ba3531f10a36147f820e84f4d8402ff8a
2017-07-27 16:51:24 +08:00
Nicholas Nethercote 90eaa02ea0 Bug 1382099 - Remove MOZ_WIDGET_GONK from dom/media/. r=gerald.
As well as the obvious #ifdefs, this allows DOMHwMediaStream to be
removed, and also the "phone-state-changed" observer.

--HG--
extra : rebase_source : 373280183e228bd4b9bd9d866959409f2444c77e
2017-07-24 10:08:55 +10:00
Carsten "Tomcat" Book daa67cc9e3 merge mozilla-inbound to mozilla-central a=merge 2017-06-30 12:59:45 +02:00
Paul Adenot 404c800005 Bug 1341555 - Consolidate use of the MSG's AbstractMainThread, and stop having AbstractMainThread on MediaStreams. r=pehrsons
MozReview-Commit-ID: 5hGDQcfpH6a

--HG--
extra : rebase_source : 41bb678f37cfcdbc9912a25f45a5ca488084aabe
2017-06-29 11:30:57 -07:00
Paul Adenot 6e485889b8 Bug 1330360 - Create new MSGs for each nsPIDOMWindow. r=jesup
MozReview-Commit-ID: 5m1MGcLmT7J

--HG--
extra : rebase_source : b9c05464bb545c047b7718a048eb7e5de3fe275d
2017-06-23 16:18:34 -07:00
Alex Chronopoulos 41737dc1af Bug 1213414 - Implement channelCount audio constraint. r=jib,padenot
MozReview-Commit-ID: K95iBYOE1nR

--HG--
extra : rebase_source : 5c73eea4902933faec75e37d90e42a2f38c51b81
2017-06-29 21:01:17 -07:00
Andreas Pehrson 0a679e33cf Bug 1376885 - Add prefs for automatically denying camera/microphone gUM prompts. r=jib
MozReview-Commit-ID: ISWek1BcLss

--HG--
extra : rebase_source : cc55cdce0e90ab56de05a165b7e1438830006f30
2017-06-28 12:09:14 -07:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Carsten "Tomcat" Book 8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Bill McCloskey 6b3e84ed5f Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
Carsten "Tomcat" Book ea1b86680c Backed out changeset 9846de3bd954 (bug 1372405)
--HG--
extra : rebase_source : 5d4a48e8ec394c329994689d938d2a6e9b2752b0
2017-06-20 08:27:02 +02:00
Bill McCloskey 4592152411 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
Carsten "Tomcat" Book 0aaf610c0f Merge mozilla-central to autoland 2017-06-13 12:14:05 +02:00
Bill McCloskey bd66079b0c Bug 1371127 - Use GetCurrentVirtualThread() in MediaManager (r=jesup)
MozReview-Commit-ID: 2Wf9Ln8TMOx
2017-06-12 20:21:43 -07:00
Bill McCloskey d6affd5261 Bug 1365098 - Convert NS_GetCurrentThread uses in dom/media (r=cpearce)
MozReview-Commit-ID: DUPt6xj49zz
2017-06-12 20:20:08 -07:00
Munro Mengjue Chiang ac029ed760 Bug 861716 - queue a gUM request if there has been a pending one. r=jib
MozReview-Commit-ID: 52KcsN27AR3

--HG--
extra : rebase_source : edd74624d32f964eee619e651be0c93dbaae0ac6
2017-05-12 11:32:14 +08:00
Jim Chen 378c61c98f Bug 1369108 - 1. Introduce optional device permission step; r=jesup
Right before `MediaManager::EnumerateRawDevices` posts its enumeration
task to the background thread, add the option to send out a
"getUserMedia:ask-device-permission" notification, whose purpose is to
give frontend UI a chance to ask for device permissions (e.g. permission
to enumerate cameras on Android).

The subject parameter of the notification is an `nsIRunnable` task,
which is passed back to `MediaManager`, after receiving permission,
through the `getUserMedia:got-device-permission` notification. The
notification listener then posts the task and enumeration proceeds as
before.

MozReview-Commit-ID: IhRXTdIplvN
2017-06-02 16:11:53 -04:00
Jan-Ivar Bruaroey 362c199aef Bug 1368875 - Count {video: true} and {audio: true} toward cam and mic counts respectively. r=jesup
MozReview-Commit-ID: BgdvRLpueit

--HG--
extra : rebase_source : 0e271bfd7547099586b3014e551bf6e3282c010a
2017-05-30 21:57:37 -04:00
Jan-Ivar Bruaroey 85b8864f71 Bug 1366415: Unprefix mozAutoGainControl and mozNoiseSuppression w/deprecation warnings. r=jesup,smaug
MozReview-Commit-ID: EdWjSsIhtIM

--HG--
extra : rebase_source : 373bf802ae7a0f957770f2f6ec18fa4cc6c736da
2017-05-19 20:57:44 -04:00
Benjamin Peterson d7205479b1 No bug - fix indentation DONTBUILD
--HG--
extra : rebase_source : 98b121a221b63f701e65536c602504d702945e0a
2017-05-09 22:19:23 -07:00
Munro Mengjue Chiang c8de52fd2d Bug 1363261 - Remove a callId from mCallIds when the corresponding GetUserMediaTask is removed from mActiveCallbacks. r=jib
MozReview-Commit-ID: DcSQ8O9MoCb
2017-04-24 15:11:51 +08:00
Andreas Pehrson 7b778ab6a6 Bug 1320994 - Improve SourceListener logging. r=jib
MozReview-Commit-ID: 1xuLwpMHMQB

--HG--
extra : rebase_source : 9276fc7db3566cf0d46a37811a044a25a19bfcbc
2017-03-29 12:07:45 +02:00
Andreas Pehrson 1fc0f176be Bug 1320994 - Unify MediaManager logging macros. r=jib
MozReview-Commit-ID: 14b6cXgOqP8

--HG--
extra : rebase_source : 0170fb2dcf5856e04cb198eaeb7cbd6b296857b4
2017-03-29 12:06:49 +02:00
Andreas Pehrson 57c8cc22d0 Bug 1320994 - Refactor MediaManager's window management. r=jib
This in large does the following:

* Changes the model in MediaManager to align with that of chrome code, namely:
 - One GetUserMediaWindowListener *per window*, containing N SourceListeners for N gUM requests, and
 - GetUserMediaWindowListener replaces GetUserMediaStreamListener
 - So if two SourceListeners stop we can still send only one event
* Breaks a special event specific to B2G chrome

MozReview-Commit-ID: 3wbPFmc9yWj

--HG--
extra : rebase_source : dff76a1fa604962b45446d632ffb4da58853cfa0
2017-04-26 11:13:40 +02:00
Sebastian Hengst 82e2afb73a Backed out changeset b17aaf7a8689 (bug 1320994) 2017-05-03 13:14:18 +02:00
Sebastian Hengst 7211725673 Backed out changeset c60c97633ac8 (bug 1320994) 2017-05-03 13:14:09 +02:00
Sebastian Hengst 23ee24c08b Backed out changeset cf74f8bacbc1 (bug 1320994) 2017-05-03 13:14:05 +02:00
Andreas Pehrson ade3807eea Bug 1320994 - Improve SourceListener logging. r=jib
MozReview-Commit-ID: 1xuLwpMHMQB

--HG--
extra : rebase_source : 0e964f4b41ff53c678fa015001156f3af27563db
2017-03-29 12:07:45 +02:00
Andreas Pehrson 7bd84f27d8 Bug 1320994 - Unify MediaManager logging macros. r=jib
MozReview-Commit-ID: 14b6cXgOqP8

--HG--
extra : rebase_source : cb702280e9b3fcfcd09a11feeb9f8dfbdf115580
2017-03-29 12:06:49 +02:00
Andreas Pehrson 5db9427abb Bug 1320994 - Refactor MediaManager's window management. r=jib
This in large does the following:

* Changes the model in MediaManager to align with that of chrome code, namely:
 - One GetUserMediaWindowListener *per window*, containing N SourceListeners for N gUM requests, and
 - GetUserMediaWindowListener replaces GetUserMediaStreamListener
 - So if two SourceListeners stop we can still send only one event
* Breaks a special event specific to B2G chrome

MozReview-Commit-ID: 3wbPFmc9yWj

--HG--
extra : rebase_source : 4ad324f6bb1be637da584f323a3e039c5b4f664d
2017-04-26 11:13:40 +02:00
Wes Kocher 2768cd5d15 Backed out 5 changesets (bug 1320994) for browser_downloads_panel_block.js permafails on Win7VM a=backout
Backed out changeset b744a070cafb (bug 1320994)
Backed out changeset 5766ba7143b4 (bug 1320994)
Backed out changeset 31afc3fcd61f (bug 1320994)
Backed out changeset 78e5f8775727 (bug 1320994)
Backed out changeset 6d4e1736fd69 (bug 1320994)

MozReview-Commit-ID: 9tPD6gwXttd

--HG--
extra : rebase_source : 56cb2ac6d2e057b171d74cd529b53e617c716b4c
2017-04-26 15:21:54 -07:00
Andreas Pehrson 0dcc290a85 Bug 1320994 - Improve SourceListener logging. r=jib
MozReview-Commit-ID: 1xuLwpMHMQB

--HG--
extra : rebase_source : 0e964f4b41ff53c678fa015001156f3af27563db
2017-03-29 12:07:45 +02:00
Andreas Pehrson 3294058c0a Bug 1320994 - Unify MediaManager logging macros. r=jib
MozReview-Commit-ID: 14b6cXgOqP8

--HG--
extra : rebase_source : cb702280e9b3fcfcd09a11feeb9f8dfbdf115580
2017-03-29 12:06:49 +02:00
Andreas Pehrson edff555cf5 Bug 1320994 - Refactor MediaManager's window management. r=jib
This in large does the following:

* Changes the model in MediaManager to align with that of chrome code, namely:
 - One GetUserMediaWindowListener *per window*, containing N SourceListeners for N gUM requests, and
 - GetUserMediaWindowListener replaces GetUserMediaStreamListener
 - So if two SourceListeners stop we can still send only one event
* Breaks a special event specific to B2G chrome

MozReview-Commit-ID: 3wbPFmc9yWj

--HG--
extra : rebase_source : 4ad324f6bb1be637da584f323a3e039c5b4f664d
2017-04-26 11:13:40 +02:00
Jan-Ivar Bruaroey aa0a07c837 Bug 1354642 - Add MakeRefPtr<> helper class. r=Ehsan
MozReview-Commit-ID: es34uMTZ00

--HG--
extra : rebase_source : 8738a70a47cceece1b56b66f741e29275c066d92
2017-04-07 15:08:42 -04:00
Jan-Ivar Bruaroey ee60830406 Bug 1349480 - s/NotSupportedError/TypeError for getUserMedia({}) r=jesup
MozReview-Commit-ID: 7bJA01u7F0K

--HG--
extra : rebase_source : 383fcf039842bdefac682b4839a04ee8bf5e296c
2017-03-22 08:41:33 -04:00
Andrea Marchesini 507c00cb9f Bug 1343933 - Renaming Principal classes - part 4 - ContentPrincipal, r=qdot
--HG--
rename : caps/nsPrincipal.cpp => caps/ContentPrincipal.cpp
rename : caps/nsPrincipal.h => caps/ContentPrincipal.h
2017-03-22 11:39:31 +01:00
Andrea Marchesini 1fd1bc3935 Bug 1343933 - Renaming Principal classes - part 2 - NullPrincipal, r=qdot
--HG--
rename : caps/nsNullPrincipal.cpp => caps/NullPrincipal.cpp
rename : caps/nsNullPrincipal.h => caps/NullPrincipal.h
rename : caps/nsNullPrincipalURI.cpp => caps/NullPrincipalURI.cpp
rename : caps/nsNullPrincipalURI.h => caps/NullPrincipalURI.h
2017-03-22 11:38:40 +01:00
Michael Layzell cab1a9949b Bug 1336510 - Part 4: Capture a strong reference to this in dom/media, r=jwwang
MozReview-Commit-ID: 4lVGrGzhVXh
2017-02-24 14:34:23 -05:00
Wes Kocher 7e8f316730 Backed out 8 changesets (bug 1336510) for windows debug mn-e10s failures a=backout
Backed out changeset 419ada2f9e81 (bug 1336510)
Backed out changeset 19239f566a93 (bug 1336510)
Backed out changeset c8aeead6fe83 (bug 1336510)
Backed out changeset 422e63b872b5 (bug 1336510)
Backed out changeset 21869174dfd3 (bug 1336510)
Backed out changeset 57476b9f342d (bug 1336510)
Backed out changeset e842cdaaa7e5 (bug 1336510)
Backed out changeset bd943b368ff7 (bug 1336510)

MozReview-Commit-ID: 2z3Wa9QFkX4
2017-02-23 16:07:41 -08:00
Michael Layzell 1d0870e2e1 Bug 1336510 - Part 4: Capture a strong reference to this in dom/media, r=jwwang
MozReview-Commit-ID: 4lVGrGzhVXh
2017-02-23 12:24:12 -05:00
Tom Tromey 5f8f360823 Bug 1060419 - make log_print use Printf.h, r=froydnj
MozReview-Commit-ID: BIZ1GQEZ1vs

--HG--
extra : rebase_source : 2f1f0aa12493c44f352d9a7e8683e7bb72d2d75b
2016-12-15 20:16:31 -07:00
Boris Zbarsky 6e7bd78dc6 Bug 1335368 part 16. Remove the use of IsCallerChrome in GetUserMedia. r=jib 2017-02-01 15:43:38 -05:00
Boris Zbarsky 387da61c81 Bug 1335368 part 15. Remove the use of IsCallerChrome in ApplyConstraints. r=jib 2017-02-01 15:43:38 -05:00
Andrea Marchesini 98f845f364 Bug 1320170 - dom/media should use nsIPrincipal (and PrincipalInfo) instead origin as string, r=rjesup, r=ehsan 2017-01-28 18:29:13 +01:00
Bill McCloskey ec760e9fba Bug 1332494 - Move TaskCategory definition to xpcom/threads/TaskCategory.h (r=froydnj)
MozReview-Commit-ID: ET43PbGRgxl
2017-01-26 14:45:58 -08:00
Bevis Tseng 72d516ef01 Bug 1314833 - Part 2.2: Use AbstractThread::CreateDirectTaskDrainer() to Drain Direct Tasks Dispatched to MediaStreamGraph. f=rjesup,r=padenot,jwwang
MozReview-Commit-ID: 1KgE3uKu4CG

--HG--
extra : rebase_source : 2ad950afe84675fb9bc4c449e53e7c0d52270175
2016-12-07 22:00:12 -10:00
Munro Mengjue Chiang f0be461749 Bug 1270572 - allow un-prompted gUM access if the page has a live track connected to the same device; r=florian,gcp,smaug
MozReview-Commit-ID: EvATqR4NNTH

--HG--
extra : rebase_source : cf3b08d7f47e8239bdb6ed27a2eaacb491200d48
2017-01-19 12:24:59 +08:00
Chris Peterson faf39081ac Bug 1329562 - Part 2: Remove gUM screensharing.allow_on_old_platforms check for XP. r=jesup
MozReview-Commit-ID: GWCjf8mT3Wl

--HG--
extra : rebase_source : c6d267585114c8e82550dc8378596a26054dac8d
2017-01-08 12:12:03 -08:00
Chris Peterson 64471d9880 Bug 1329562 - Part 1: Remove WebRTC checks for Vista. r=jesup
MozReview-Commit-ID: IGv5weXLIwJ

--HG--
extra : rebase_source : 3bc86cba7cedf37395504f5792d0e8803df30676
2017-01-08 00:18:22 -08:00
Andrea Marchesini f7f5990527 Bug 1317927 - Media caching needs to use origin attributes, r=cpearce, r=jesup 2016-12-07 07:07:09 -10:00
Florian Quèze 0211bb62b9 Bug 1037438 - implement persistent deny permissions for screen sharing, r=jesup,past. 2016-11-28 12:29:31 +01:00
Carsten "Tomcat" Book aee9df5fff Backed out changeset ca8ca07756ab (bug 1037438) 2016-11-28 15:56:42 +01:00
Florian Quèze 10d60535cc Bug 1037438 - implement persistent deny permissions for screen sharing, r=jesup,past. 2016-11-28 12:29:31 +01:00
Randell Jesup 2c33546190 Bug 1317670 Part 1 - r=jib 2016-11-20 02:39:08 -05:00
Andrea Marchesini dd1d53bd2b Bug 1319045 - Get rid of nsPrincipal::GetOriginFromURI, r=qdot 2016-11-22 12:38:41 +01:00
Ehsan Akhgari eac76d9772 Bug 1310845 - Remove support for mozapp iframes; r=fabrice,jryans,baku,mcmanus
This patch removes support for mozapp iframes, leaving support for
mozbrowser iframes intact.  Some of the code has been rewritten in order
to phrase things in terms of mozbrowser only, as opposed to mozbrowser
or app.  In some places, code that was only useful with apps has been
completely removed, so that the APIs consumed can also be removed.  In
some places where the notion of appId was bleeding out of this API, now
we use NO_APP_ID.  Other notions of appId which were restricted to this
API have been removed.
2016-11-16 09:13:38 -05:00
Carsten "Tomcat" Book 3eacc680db Backed out changeset 7d1f7dd996f7 (bug 1310845) 2016-11-16 14:50:44 +01:00
Ehsan Akhgari cb369370b3 Bug 1310845 - Remove support for mozapp iframes; r=fabrice,jryans,baku,mcmanus
This patch removes support for mozapp iframes, leaving support for
mozbrowser iframes intact.  Some of the code has been rewritten in order
to phrase things in terms of mozbrowser only, as opposed to mozbrowser
or app.  In some places, code that was only useful with apps has been
completely removed, so that the APIs consumed can also be removed.  In
some places where the notion of appId was bleeding out of this API, now
we use NO_APP_ID.  Other notions of appId which were restricted to this
API have been removed.
2016-11-15 18:31:46 -05:00
Jan-Ivar Bruaroey f89ebba64a Bug 1315858 - Test ability to detect screensharing sources that are firefox. r=florian,jesup
MozReview-Commit-ID: K6Kkdaso7dd

--HG--
extra : rebase_source : e655b26439496af416bd7b1072c6f74cf20401a2
2016-11-07 12:20:41 -05:00
Phil Ringnalda b12005f643 Backed out changeset 621860d37e72 (bug 1315858) for WinXP failures in test_getUserMedia_scarySources.html 2016-11-08 20:50:53 -08:00
Jan-Ivar Bruaroey e67d93e9ca Bug 1315858 - Test ability to detect screensharing sources that are firefox. r=florian,jesup
MozReview-Commit-ID: K6Kkdaso7dd

--HG--
extra : rebase_source : 482d2802036e707997e3b72186e04489e2324dce
2016-11-07 12:20:41 -05:00
Jan-Ivar Bruaroey 3e374cf65b Bug 1315737 - Remove platform checking of screensharing whitelist r=jesup
MozReview-Commit-ID: IosWOvEsIF8

--HG--
extra : rebase_source : 6a54649593ed47057220d901f895fd5933c66a47
2016-11-07 13:39:20 -05:00
Phil Ringnalda 393b414467 Merge m-i to m-c, a=merge
MozReview-Commit-ID: 48WAQwKUCpw
2016-11-02 19:28:38 -07:00
Andreas Pehrson 825d513165 Bug 1301675 - Rename BasicUnstoppableTrackSource to BasicTrackSource. r=jib
They are not unstoppable any longer. We just don't forward Stop() to the real source.

MozReview-Commit-ID: FdFccMsD3eb

--HG--
extra : rebase_source : e29a1abb8f2060cb72399d61d91ca3a00128f08c
2016-09-16 15:19:28 +02:00
Andreas Pehrson 159d4ead9e Bug 1301675 - Remove MediaStreamTrackSource::mIsRemote. r=jib
MediaStreamTrack.remote is no longer part of the spec.

MozReview-Commit-ID: BgHJ1zNIoWN

--HG--
extra : rebase_source : 11022eb420cbdb0c7aa5aa7814cf35330f4170b9
2016-09-12 15:59:58 +02:00
Jan-Ivar Bruaroey 2c03b58a19 Bug 1312030 - Remove MediaParent singleton to work with multi content processes. r=jesup
MozReview-Commit-ID: 8JONCRge6SU

--HG--
extra : rebase_source : ad30110ab35afb783291beee20cd5df2047d1149
2016-11-01 07:44:02 -04:00
Andreas Pehrson 0c1268b303 Bug 1312332 - Use stopVideo as intended. r=jib
MozReview-Commit-ID: JreGgjDwfam

--HG--
extra : rebase_source : 3bcf591250ea92e245446ddb2c34a937afd63939
2016-10-24 08:01:41 +02:00
Andreas Pehrson e53071bee0 Bug 1284102 - Notify chrome of stopped tracks in next stable state. r=jib
If content stops multiple gUM tracks in the same event loop we should only
notify chrome once to avoid unnecessary chrome updates.

MozReview-Commit-ID: 93aAPUvydPt

--HG--
extra : rebase_source : 685a842acce4970df9a495af1d7fac267b3d252b
extra : source : ed8face75a4664fa11eb64c62a289adf5bcca6db
2016-09-21 15:17:23 +02:00
Jan-Ivar Bruaroey fb49e07898 Bug 1284910 - Add scary boolean to mediaDeviceInfo. r=jesup
MozReview-Commit-ID: 2A7QZgUQH8l

--HG--
extra : rebase_source : 15f534bd11d1b8bb4e85de7bc8cac45c99654ce4
2016-09-29 15:37:25 -04:00
Carsten "Tomcat" Book d6850a3a86 merge mozilla-inbound to mozilla-central a=merge 2016-10-17 11:19:02 +02:00
Sebastian Hengst 2bd34f750f Bug 1306137 - remove b2g camera code: Remove MOZ_B2G_CAMERA. r=aosmond
MozReview-Commit-ID: D207i9boeTJ

--HG--
extra : rebase_source : 390031b8a74ba145008328129079dcb0dee5a6c1
2016-09-28 21:10:32 +02:00
Carsten "Tomcat" Book e90a683f18 Backed out changeset 9c7364b4579d (bug 1308615) for suspicion that this caused pgo windows test crashes 2016-10-14 14:59:36 +02:00
Carsten "Tomcat" Book fed18a42c0 Backed out changeset 5af415bbb107 (bug 1308615) 2016-10-14 14:58:51 +02:00
Eric Rahm b8cfe3a083 Bug 1308615 - Part 2: Stop using nsISupportsArray for observer messages. r=jesup
This removes the rest of the usage of nsISupportsArray in MediaManager.

MozReview-Commit-ID: EqXTRNyKiva
2016-10-13 22:02:58 -07:00
Eric Rahm 441292eb71 Bug 1308615 - Part 1: Use nsIArray in nsIMediaManagerService. r=jesup
This converts nsIMediaManagerService to use nsIArray rather than
nsISupportsArray. All usages of the interface are updated.

MozReview-Commit-ID: 1PLczEptf59
2016-10-13 22:02:47 -07:00
Eric Rahm e4b0439502 Bug 1308615 - Part 2: Stop using nsISupportsArray for observer messages. r=jesup
This removes the rest of the usage of nsISupportsArray in MediaManager.

MozReview-Commit-ID: EqXTRNyKiva
2016-10-14 10:06:37 -07:00
Eric Rahm b9acba878d Bug 1308615 - Part 1: Use nsIArray in nsIMediaManagerService. r=jesup
This converts nsIMediaManagerService to use nsIArray rather than
nsISupportsArray. All usages of the interface are updated.

MozReview-Commit-ID: 1PLczEptf59
2016-10-14 10:06:27 -07:00
Jan-Ivar Bruaroey cfc1a09d64 Bug 1308605 - Fail with OverconstrainedError on bad constraint. r=jesup
MozReview-Commit-ID: JJ1Y3G5b1wl

--HG--
extra : rebase_source : 0ac85ff7c2438aef4ea9e6230fb3816148993fb6
2016-10-12 17:31:20 -04:00
Phil Ringnalda e6f43c4543 Backed out 2 changesets (bug 1308615) for failures in browser_devices_get_user_media.js
CLOSED TREE

Backed out changeset 85689c52301c (bug 1308615)
Backed out changeset ec8e67234efb (bug 1308615)
2016-10-07 19:42:01 -07:00
Eric Rahm abd64af72d Bug 1308615 - Part 2: Stop using nsISupportsArray for observer messages. r=jesup
This removes the rest of the usage of nsISupportsArray in MediaManager.

MozReview-Commit-ID: EqXTRNyKiva

--HG--
extra : rebase_source : e41488b4ef7bc6a380a12aae402029d56c92c925
2016-10-07 14:52:52 -07:00
Eric Rahm 28dd079343 Bug 1308615 - Part 1: Use nsIArray in nsIMediaManagerService. r=jesup
This converts nsIMediaManagerService to use nsIArray rather than
nsISupportsArray. All usages of the interface are updated.

MozReview-Commit-ID: 1PLczEptf59

--HG--
extra : rebase_source : a8beed043989f6e69e89d17c0db1864c6d7258ac
2016-10-07 14:52:48 -07:00
Mark Banner c4565f5765 Bug 1306631 - Remove old Loop telemetry hooks from WebRTC code. r=jesup
MozReview-Commit-ID: 1ctKZPDVEha

--HG--
extra : rebase_source : 530df82d85d87dd605289b8af8ce372ba6cd4ed9
2016-09-23 16:55:48 +01:00
Jan-Ivar Bruaroey c85b098ed5 Bug 1307630 - Have videoTrack.getSettings() return settings for video, not audio, from source with both. r=jesup
MozReview-Commit-ID: LkJnBuf1Fl0

--HG--
extra : rebase_source : 9549a154659ee0b39d0e0f6fb3dd0063d31e4e66
2016-10-04 19:31:52 -04:00
Jan-Ivar Bruaroey ad60fcbdf9 Bug 1284909 - Allow raw deviceId constraints in gUM when caller is chrome. r=jesup
MozReview-Commit-ID: IB0BhGKbdam

--HG--
extra : rebase_source : 29006317f365076717f88bdafc64366eb996913c
2016-08-19 16:39:54 -04:00
Ryan VanderMeulen 4460ee8698 Backed out changeset 5f43357fe5b4 (bug 1284909) for bustage on a CLOSED TREE. 2016-08-29 11:25:00 -04:00
Jan-Ivar Bruaroey de3b766278 Bug 1284909 - Allow raw deviceId constraints in gUM when caller is chrome. r=jesup
MozReview-Commit-ID: IB0BhGKbdam

--HG--
extra : rebase_source : 9ed1f4218e66bd3c96d044cacce167cbde79e775
2016-08-19 16:39:54 -04:00
Munro Mengjue Chiang 7290087ca7 Bug 1297911 - followup: if block needs to be braced; r=jib
MozReview-Commit-ID: I44jAWKquTd

--HG--
extra : rebase_source : a59a286a63aa12ff8f10aae340d0ad7b6f028c98
2016-08-25 14:07:42 +08:00
Andreas Pehrson 83dcc7266e Bug 1259788 - Break out AddTrackInternal() from DOMMediaStream::CreateDOMTrack. r=jesup
Sometimes a track is added to a stream synchronously (before the stream is
exposed to script), and sometimes asynchronously (see the mediacapture-main spec
on the "addtrack" event).

In the latter case we might still need to create the MediaStreamTrack object
synchronously for tracking purposes. CaptureStream of Media element playing a
MediaStream wants this.

MozReview-Commit-ID: 7me8xzN7rwj

--HG--
extra : rebase_source : 4f129b127b855e47aad2ae9ab3981ffde057412d
2016-08-12 13:50:41 +02:00
Jan-Ivar Bruaroey 9e4998ef79 Bug 1284683 - add unanonymized nsIMediaDevice.rawId for browser-chrome use. r=jesup
MozReview-Commit-ID: A4RDfdZAF21

--HG--
extra : rebase_source : 0c1ca7b5a413daad31a95dd7eb42277a4e984f2f
2016-08-18 00:01:00 -04:00
Munro Mengjue Chiang 730a993044 Bug 1286429 - Fire fake devicechange event in Camera IPC thread for mochitest; r=jib
MozReview-Commit-ID: 9sDLnMGh3xL

--HG--
extra : rebase_source : 026891d00450b9bfd792708ab3d5d2e730f431f9
2016-08-09 16:37:04 +08:00
Munro Mengjue Chiang 4eb2d3e90d Bug 1286429 - implement mediaDevices.ondevicechange for Mac OSX; r=jib,smaug
MozReview-Commit-ID: D1Jr6I4qPyr

--HG--
extra : rebase_source : 0f4a97da80d25923c9b6f6550b94039aefa88de5
2016-08-12 01:04:49 +08:00
Nicholas Nethercote ca40b738e4 Bug 1294620 - Use infallible XPIDL attribute getters more. r=erahm.
This makes a lot of code more compact, and also avoids some redundant nsresult
checks.

The patch also removes a handful of redundant checks on infallible setters.

--HG--
extra : rebase_source : f82426e7584d0d5cddf7c2524356f0f318fbea7d
2016-08-12 15:19:29 +10:00
Igor 175543fda8 Bug 1293384 - Part 2: Rename Snprintf.h header to Sprintf.h. r=froydnj 2016-08-14 23:43:21 -07:00
Igor a57972337d Bug 1293384 - Part 1: Rename snprintf_literal to SprintfLiteral. r=froydnj 2016-08-14 23:44:00 -07:00
Nicholas Nethercote e7f10a07fd Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm.
This patch makes most Run() declarations in subclasses of nsIRunnable have the
same form: |NS_IMETHOD Run() override|.

As a result of these changes, I had to add |override| to a couple of other
functions to satisfy clang's -Winconsistent-missing-override warning.

--HG--
extra : rebase_source : 815d0018b0b13329bb5698c410f500dddcc3ee12
2016-08-08 12:18:10 +10:00
Mark Banner 8fb8a69d5c Bug 1287827 - Part 5. Remove Loop's special permissions for about:loopconversation from MediaManager. r=jib 2016-07-30 08:48:34 +01:00
Mark Banner 37538ca14d Backed out changeset f5f1c014ca19 (bug 1287827) for breaking tests 2016-07-29 18:17:13 +01:00
Mark Banner 3dee065445 Bug 1287827 - Part 5. Remove Loop's special permissions for about:loopconversation from MediaManager. r=jib 2016-07-29 12:00:30 +01:00
Jan-Ivar Bruaroey abbd438d8f Bug 1286096 - Wire up audio getSettings(). r=padenot,smaug
MozReview-Commit-ID: KH6xcAnd3DX

--HG--
extra : rebase_source : a473d25cec56ee5bf2cd7b5114d7038e45d6a9d8
2016-07-16 15:33:54 -04:00