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

673 Коммитов

Автор SHA1 Сообщение Дата
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