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

662 Коммитов

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