Commit Graph

12946 Commits

Author SHA1 Message Date
Andrea Marchesini
806d5dbc75 Bug 1434884 - WebVTT parser must be able to deal with partial lines, r=rillian 2018-02-08 11:45:06 +01:00
Karl Tomlinson
df12c01556 bug 1436267 fallback from audio callback to system clock driver on error only once r=padenot
Usually, mShouldFallbackIfError has been reset to false in DataCallback()
before Stop() is called.  However, if fallback to a system clock driver due to
cubeb error had already occurred, then mShouldFallbackIfError would not have
been reset, and Stop() is still called.  With mShouldFallbackIfError still
true, a cubeb error in stop would have created another fallback thread.

I expect that resetting mShouldFallbackIfError in Stop() would also be an
effective alternative solution, but resetting on StateCallback() happens
earlier, which would be an advantage if any additional errors could possibly
be reported to StateCallback().

MozReview-Commit-ID: E9j7PQmS3O4

--HG--
extra : rebase_source : 200993c9e99475101c429005cfadb7260df29067
2018-02-07 20:16:01 +13:00
Byron Campen [:bwc]
63e00f7ce5 Bug 1435013: Sync transceivers before creating offers/answers. r=jib
MozReview-Commit-ID: EORXVc8Hnky

--HG--
extra : rebase_source : 1ea186ac38f44b83f247b51224dd83be0b09df42
2018-02-01 12:07:02 -06:00
Andreas Pehrson
fe7bade6b4 Bug 1434946 - Indentation fix. r=jib
MozReview-Commit-ID: JCQxatbThyI

--HG--
extra : rebase_source : 6d5c7319a69da1b5e93b352be79400ad8fd526f8
2018-02-01 18:35:55 +01:00
Andreas Pehrson
0c896f9aef Bug 1434946 - Set framerate in settings when capabilities are updated. r=jib
This adds back the `framerate` update that was removed in bug 1299515.

It also fixes a threading issue (not really an issue, but it broke the
documented policy) where Start() wrote to mCapability without holding mMutex.

MozReview-Commit-ID: Jda5moNhlkM

--HG--
extra : rebase_source : a8f27f064b9f818eb29aa72a18605786c474631b
2018-02-01 17:00:59 +01:00
Andreas Pehrson
f52aa5b27e Bug 1434946 - Report resolution change in settings already on first frame. r=jib
MozReview-Commit-ID: IzhdiHgVKOc

--HG--
extra : rebase_source : 085308eb966554ed71fb6b758cd59132b43d6ceb
2018-02-01 16:58:35 +01:00
Andreas Pehrson
422d32be88 Bug 1434861 - Simplify rescaling code in MediaEngineRemoteVideoSource::DeliverFrame. r=jib
Most importantly, this reduces the number of copies to 1 in the common case.
In a case where we are rescaling because there are competing gUM requests
this does two copies, where one is the crop-and-scale operation itself.

In the worst case we do two allocations, but with a buffer pool and a recycling
ImageContainer we allocate very rarely in practice.

MozReview-Commit-ID: B0Et4wZol9n

--HG--
extra : rebase_source : e0950a53278336773570c9e989a21392195f8898
2018-02-01 16:06:19 +01:00
Andrew McCreight
5dec0e0beb Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG

--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
2018-02-06 09:36:57 -08: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
8413544b59 Bug 1434600 - Add a method to clean up by window ID, on a MediaEngine. r=pehrsons
MozReview-Commit-ID: 12w4StZE2eg

--HG--
extra : rebase_source : 3c3ddf24da24e42e53d9e5352cb83945c97ead99
2018-01-31 19:02:00 +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
54d329cb35 Bug 1435673 - Strengthen some MediaEngineWebRTCMicrophoneSource asserts. r=padenot
MozReview-Commit-ID: HtjndNLWZI8

--HG--
extra : rebase_source : e9076defa2bc667d5c96cee3bbccc6d297fc8aab
2018-02-05 10:58:21 +01:00
Andreas Pehrson
06be9533d1 Bug 1435673 - Do some cleanup that was meant to happen earlier. r=padenot
MozReview-Commit-ID: 1v07YH1hKiG

--HG--
extra : rebase_source : c7aab7a7480d8a72b0e312cfe24a7aa212f0cf5d
2018-02-05 10:54:10 +01:00
Andreas Pehrson
c1032b3da7 Bug 1435673 - Inline Alloc/FreeChannel and fix access per threading model. r=padenot
MozReview-Commit-ID: 1hpt8tAFuKW

--HG--
extra : rebase_source : 7ce40c2811b1869f98a7737373f02db7b488b829
2018-02-05 10:50:47 +01:00
Andreas Pehrson
650dcb5d2d Bug 1435673 - Fix calling Deallocate() without SetTrack(). r=padenot
Before bug 1299515 we assigned stream and track id in Allocate(), meaning that
any Deallocate() had a guarantee of them being set.

This changed to require an extra step of SetTrack() to assign stream and
track id. Deallocate() needs to handle this, which it does with this patch.

MozReview-Commit-ID: Js0cXXOR2Bb

--HG--
extra : rebase_source : f90dc1345ae0c034d2237d771630055729180df4
2018-02-05 10:48:23 +01:00
Sylvestre Ledru
f25e5479bc Bug 1435262 - Remove the const type qualifiers to silent a gcc 8 warning r=gerald
MozReview-Commit-ID: 28NSnyYMPQ0

--HG--
extra : rebase_source : 8674d1dbfabaf8ecc20a58d755e103d13abfc725
2018-02-02 15:49:00 +01:00
Michael Froman
475c6b33c7 Bug 1414171 - pt 3 - Add componentId to expected fields in test_peerConnection_stats.html. r=drno
MozReview-Commit-ID: Hez0vOu5vTs

--HG--
extra : rebase_source : c722927207ad5c8e3c26a56cea70e1d20233e98d
2018-02-01 15:06:01 -06:00
Michael Froman
38bdfba7a2 Bug 1414171 - pt 2 - Sort ICE stats by componentId on about:webrtc. r=drno
- add new component_id field to NrIceCandidatePair
- add the candidate pair component_id to RTCIceCandidatePairStats in
  RecordIceStats_s
- add new column in ice stats table for component id
- sort ice stats by component id first


MozReview-Commit-ID: J89ZIYEUyRk

--HG--
extra : rebase_source : 681a5afa1303b4e377fcc14d099ce0b3d852f22c
2018-01-30 22:23:54 -06:00
Andreas Pehrson
44946573a2 Bug 1434988 - Make audio loopback mochitest return early without loopback device set up. r=achronop
MozReview-Commit-ID: AA05i50qI2A

--HG--
extra : rebase_source : 9b5911586741eacd8c8b32b1e291b9d8bd64b709
2018-02-01 19:28:57 +01:00
Gurzau Raul
1315ffda06 Merge inbound to mozilla-central. a=merge 2018-02-02 00:22:39 +02:00
Gurzau Raul
047564ed7a Merge inbound to mozilla-central. a=merge 2018-02-01 23:53:53 +02:00
Florian Quèze
2b1c8dccb6 Bug 1339461 - script-generated patch to convert foo.indexOf(...) == -1 to foo.includes(), r=Mossop. 2018-02-01 20:45:22 +01:00
Boris Zbarsky
478687c2e8 Bug 1434686 part 4. Use IgnoreErrors() in dom/. r=mystor
MozReview-Commit-ID: GwVDrTLPTOb
2018-02-01 14:21:14 -05:00
David Keeler
087f092867 bug 1421084 - part 4/4 - remove nsNSSShutDown.h and (hopefully) all references to it r=mt,ttaubert
MozReview-Commit-ID: 2mhvHsC5Nil

--HG--
extra : rebase_source : 651c2bcf8655f75756ea2bac788eb8c0781dc90a
2018-01-24 14:44:01 -08:00
David Keeler
ad5cec4768 bug 1421084 - part 3/4 - remove nsNSSShutDownObject::shutdown and virtualDestroyNSSReference r=mt,ttaubert
MozReview-Commit-ID: ErL7ZjAGVVC

--HG--
extra : rebase_source : 2869aafaef729f0ad190f957919e8b9c40700477
2018-01-24 14:29:08 -08:00
David Keeler
a0e34baf27 bug 1421084 - part 2/4 - remove nsNSSShutDownObject::isAlreadyShutDown() r=mt,ttaubert
MozReview-Commit-ID: DlS16pHE0Ik

--HG--
extra : rebase_source : d7596a3571478adefae4ffa5d446ff5234ba9ed7
2018-01-23 12:22:56 -08:00
David Keeler
e8cc0ba1ce bug 1421084 - part 1/4 - remove now-unnecessary nsNSSShutDownPreventionLock r=mt,ttaubert
As of bug 1417680, the NSS shutdown tracking infrastructure is unnecessary (and
does nothing anyway). This series of changesets removes the remaining pieces in
a way that is hopefully easy to confirm is correct.

MozReview-Commit-ID: 8Y5wpsyNlGc

--HG--
extra : rebase_source : ef6b481510d949e404a4ef5615097d66e566c947
2018-01-23 10:37:47 -08:00
Munro Mengjue Chiang
4197e56037 Bug 1423582 - use UniquePtr to wrap frame. r=pehrsons
MozReview-Commit-ID: 2T7RC1tBbOA

--HG--
extra : rebase_source : e964a73844edb7f10fb94442cc855f7922bb886d
2018-02-01 11:42:28 +01:00
Chris Pearce
b37bd17a56 Bug 1433344 - Convert encrypted AAC to ADTS before decryption. r=jya
MozReview-Commit-ID: IGmBfJtYsCi

--HG--
extra : rebase_source : d066644e848f8fb379607d0168960132881d7df8
2018-01-30 14:39:09 +13:00
Cosmin Sabou
b35f58da34 Backed out changeset 1fea6030657b (bug 1433344) for mda failures on EMEDecoderModule.cpp on a CLOSED TREE 2018-02-01 03:05:53 +02:00
Chris Pearce
328670db16 Bug 1433344 - Convert encrypted AAC to ADTS before decryption. r=jya
MozReview-Commit-ID: IGmBfJtYsCi

--HG--
extra : rebase_source : a0752ed6c85faf4333ae84a3e5b20695b5bf26a6
2018-01-30 14:39:09 +13:00
Andreas Pehrson
0d112b8fad Bug 1434628 - Unbust --disable-webrtc builds. r=padenot, a=me
MozReview-Commit-ID: Ef8LOr1YymV
2018-01-31 16:59:53 +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
943436bfbe Bug 1426718 - Assert that we append at most once per stream per iteration. r=padenot
MozReview-Commit-ID: 3bNTZRhv839

--HG--
extra : rebase_source : b7da2412b89bf79c72344509847ff54853adcbbe
2017-11-22 14:30:00 +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
09669c4432 Bug 1299515 - Don't assert that tracks must be ended in forced shutdown. r=padenot
I hit this during local tests. It's a fine invariant but it doesn't hold in
forced shutdown.

MozReview-Commit-ID: HtoiGwf7IMI

--HG--
extra : rebase_source : 707de2fe08ccad99a06dab00969e2f140e63abad
2018-01-03 15:13:36 +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
66a566c5e7 Bug 1299515 - Set track stop_on_disable prefs to act immediately in test. r=jib
MozReview-Commit-ID: ALEbQpVm68t

--HG--
extra : rebase_source : 5a9566ada8e710e4cf51de66e131c0015e787351
2017-11-28 11:17:17 +01:00
Andreas Pehrson
cfef991f4a Bug 1299515 - Modernize tests that disable tracks to prime for coming patches. r=jib
MozReview-Commit-ID: 9rzaZimjpm9

--HG--
extra : rebase_source : ea1a1684d8cec7671b8f627ce79c41ae5016639c
2017-11-28 11:15:44 +01:00
Andreas Pehrson
b8ef7b60f9 Bug 1299515 - Put pushPrefs in head.js. r=jib
MozReview-Commit-ID: F770g5cjH0k

--HG--
extra : rebase_source : 94464257153c814a32f2838b79124dbaf1fab3df
2017-11-23 17:28:40 +01:00
Andreas Pehrson
d09d284893 Bug 1299515 - Drive by touchups in MediaTrackConstraints. r=jib
MozReview-Commit-ID: EBztQ99CKQ4

--HG--
extra : rebase_source : 3ca504ada622a7db9a6e97dc23ff88558a66795d
2017-11-21 15:53:02 +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
60544370ea Bug 1299515 - Implement MediaTimer::Cancel to allow for rejecting timer promises. r=jya
MozReview-Commit-ID: ESLlbIS8XHa

--HG--
extra : rebase_source : 2382f6ba2582363c6663ec5b925684ab18b73abe
2017-12-20 10:02:31 +01:00
Andreas Pehrson
568e0a7bf4 Bug 1299515 - Implement MediaTimer::WaitFor for convenience. r=jya
MozReview-Commit-ID: VpHxUKn3hO

--HG--
extra : rebase_source : 2346c317f9819c01056baaa2c8fb50fe8a2bfad0
2017-12-20 10:01:47 +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
176f6fa9fc Bug 1299515 - Only notify of enabled state if it actually changed. r=jib
MozReview-Commit-ID: 4pGYXb9onJO

--HG--
extra : rebase_source : 8ce242a5566a0eeeb8aba0cbf223ec1c4402ced3
2017-11-15 18:41:28 +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