Commit Graph

13947 Commits

Author SHA1 Message Date
Paul Adenot
49c116de8b Bug 1487057 - Part 11 - Work around the fact that EndTrack uses mCommands. r=pehrsons
This is temporaray until Andreas fixes all this.

--HG--
extra : rebase_source : b149b4b2bfa70355ce5e624f0c55368885b2f885
2018-10-12 15:57:49 +02:00
Paul Adenot
52601aba7c Bug 1487057 - Part 10 - Remove MediaEngineWebRTCAudio::mEnabled. r=pehrsons
It was redundant with mState.

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

--HG--
extra : rebase_source : 7af2c72a833bf9a75d45d89a47f749db6376372e
2018-10-03 14:58:28 +02:00
Paul Adenot
b90b8e2060 Bug 1487057 - Part 9 - Make SourceMediaStream::SetEnded go through the message queue so it's in the right order w.r.t. Stop. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D7601

--HG--
extra : rebase_source : 75b9cbcaae6b403b4e7de8a2c979c4e43deebc20
2018-10-01 17:12:14 +02:00
Paul Adenot
b2a7495547 Bug 1487057 - Part 8 - Split MediaEngineWebRTCMicrophoneSource in two classes, one for control one for processing. r=pehrsons
Big but not complex:
- Remove the mutex
- Move all MSG thread to a new class (AudioInputProcessing)
- Remove the WebRTCAudioDataListener class, AudioInputProcessing is the listener
- Use message passing for all modifications to the AudioInputProcessing.

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

--HG--
extra : rebase_source : 84368e8240cc47788ef2b56eb31d2a33e80e0d23
2018-09-07 16:53:23 +02:00
Paul Adenot
7a59e87c14 Bug 1487057 - Part 7 - Flatten mAllocation and fix some locking. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D5441

--HG--
extra : rebase_source : 353ee24444a3cfc561f7ffc541a3fd8043b87fb9
2018-09-05 16:00:33 +02:00
Paul Adenot
0321a0af2e Bug 1487057 - Part 6 - Reorganize attributes and document thread access better. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D5440

--HG--
extra : rebase_source : f6812dbce7bb1ace647293d31e3ea500c0d8b4e1
2018-09-03 14:52:54 +02:00
Paul Adenot
e9769f1597 Bug 1487057 - Part 5 - Remove MediaEngineWebRTCMicrophoneSource::mStarted. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D5439

--HG--
extra : rebase_source : 31a0b36e2bc6431a6c7aa387baddfd9d3e35f8f8
2018-09-03 11:10:32 +02:00
Paul Adenot
3f4724fcbb Bug 1487057 - Part 4 - Remove AsyncLatencyLogger and associated code. r=pehrsons
It's not maintained and probably does not work anymore.

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

--HG--
extra : rebase_source : ccd622e40844dda5d16266e49991462d4ea94224
2018-08-30 17:11:57 +02:00
Paul Adenot
6a77327e7f Bug 1487057 - Part 3 - Turn the mAllocations array into an mAllocation UniquePtr, that can be nullptr. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D5437

--HG--
extra : rebase_source : 4afa5a090d80b9aba6c0df7ef727fc8743b46f7b
2018-08-29 19:00:28 +02:00
Paul Adenot
cfcb3f6cae Bug 1487057 - Part 2 - Remove RegisterForAudioMixing/NeedsMixing, they are unused. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D5436

--HG--
extra : rebase_source : 107c7ff741569744c556ef0583c5c7231b502620
2018-08-29 15:29:08 +02:00
Paul Adenot
2d349d59bd Bug 1487057 - Part 1 - Move audio related classes in MediaEngineWebRTC.h to their own header files, clean up includes slightly. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D5435

--HG--
extra : rebase_source : d0b5668aaf127a9456e9e12e1cc4f464a02559c9
2018-08-29 14:38:43 +02:00
alwu
7c0b331bf7 Bug 1496496 - part4 : avoid to notify audible state changed frequently. r=padenot
We don't want to notify state changed frequently if the input stream is consist of
interleaving audible and inaudible blocks.

This situation is really common, especially when user is using OscillatorNode to produce
sound. Sending unnessary runnable frequently would cause performance debasing.

If the stream contains 10 interleaving samples and 5 of them are audible, others are
inaudible, user would tend to feel the stream is audible. Therefore, we have the loose
checking when stream is changing from inaudible to audible, but have strict checking when
streaming is changing from audible to inaudible. If the inaudible blocks continue over a
speicific time thersold, then we will think the steam as inaudible.

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

--HG--
extra : moz-landing-system : lando
2018-10-08 18:52:01 +00:00
alwu
55fe876b28 Bug 1496496 - part3 : add log. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D7821

--HG--
extra : moz-landing-system : lando
2018-10-05 19:04:17 +00:00
alwu
57b2fc6a83 Bug 1496496 - part2 : rename variables and functions. r=padenot
The naming `isAudible` is more clear than `isInputMuted`, so also change related functionis and variables.

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

--HG--
extra : moz-landing-system : lando
2018-10-05 19:04:16 +00:00
alwu
6ac9eb0021 Bug 1496496 - part1 : add IsAudible() to detect audible data. r=padenot
Add method to help us know whether audio block is audible or not, so that we won't
show the sound indicator for silent web audio.

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

--HG--
extra : moz-landing-system : lando
2018-10-11 18:17:41 +00:00
Jean-Yves Avenard
c084a873d7 Bug 1497294 - P5. Clip source to destination size when copying the D3D11 texture. r=mattwoodrow
The Windows' hardware decoder always return an image whose dimensions are multiple of 16 pixels. As such, the image coming out of the decoder is typically bigger than the wanted image.

The D3D11 documentation states that " If you try and copy outside the destination resource or specify a source box that is larger than the source resource, the behavior of CopySubresourceRegion is undefined."

We've always copied from a bigger texture into a smaller one without specifying clipping. It seems to have always worked but falls into the undefined behaviour category.

So to be extra safe, we clip the source so that it matches the dimension of the destination texture.

Depends on D8129

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

--HG--
extra : moz-landing-system : lando
2018-10-11 01:43:29 +00:00
Jan-Ivar Bruaroey
6b5cb93598 Bug 1497351 - Remove dictionary null defaults from MediaTrackConstraintSet; handle absence in NormalizedConstraintSet. r=bzbarsky,pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D8054

--HG--
extra : moz-landing-system : lando
2018-10-11 02:03:17 +00:00
Jan-Ivar Bruaroey
20f3798c41 Bug 1497390 - Remove support for legacy mozAutoGainControl and mozNoiseSuppression constraints. r=bzbarsky,achronop
Differential Revision: https://phabricator.services.mozilla.com/D8053

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

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

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

--HG--
extra : moz-landing-system : lando
2018-10-10 08:28:41 +00:00
Jean-Yves Avenard
0fcc0bd516 Bug 1496529 - P10. Add to libvpx decoder low latency mode. r=bryce
Depends on D7909

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

--HG--
extra : moz-landing-system : lando
2018-10-09 22:59:47 +00:00
Jean-Yves Avenard
a6e92bb58d Bug 1496529 - P9. Enable low latency decoding on Windows. r=bryce
Depends on D7908

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

--HG--
extra : moz-landing-system : lando
2018-10-09 16:59:32 +00:00
Jean-Yves Avenard
2349b2eb93 Bug 1496529 - P7. Pass full range of CreateDecoderParam::Option to RemoteVideoDecoder r=bryce
Depends on D7882

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

--HG--
extra : moz-landing-system : lando
2018-10-09 16:59:24 +00:00
Jean-Yves Avenard
38ff84370c Bug 1496529 - P6. Always run EMEDecryptor on the decoder's taskqueue. r=bryce
P2 changed the way the H264Converter would be calling the decoder. The assumption in the EMEDecryptor was pretty incorrect to start with.

Depends on D7865

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

--HG--
extra : moz-landing-system : lando
2018-10-09 22:58:05 +00:00
Jean-Yves Avenard
e9c79b802d Bug 1496529 - P3. Make the Apple H264 decoder provide 0 latency option. r=bryce
When used with the LowLatency option, we guarantee that the stream will contain no B-frame, as such we can reduce the re-ordering queue to zero. The apple VT decoder already returns frames in decode order making this change trivial.

Depends on D7861

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

--HG--
extra : moz-landing-system : lando
2018-10-09 16:59:05 +00:00
Jean-Yves Avenard
523200b148 Bug 1496529 - P2. Make H264Converter use provided decoder's TaskQueue. r=bryce
The H264Converter can be used on a thread that isn't a nsThread or a TaskQueue, so having the H264Converter dispatching tasks isn't going to work

So instead we run all the code on the decoder's taskqueue using promise chaining.
All internal methods are made to assert that they are running on the task queue accordingly

Depends on D7860

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

--HG--
extra : moz-landing-system : lando
2018-10-09 23:05:40 +00:00
shindli
115b6f10ca Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-10-09 19:29:29 +03:00
Andrea Marchesini
e60ca6394e Bug 1497034 - FeaturePolicy: autoplay, r=cpearce 2018-10-09 14:22:19 +02:00
Bumsik Kim
90d3be0a4c Bug 1496383 - Fix state error cases of MediaRecorder to match the W3C spec r=jya
Fix a bug that the current MediaRecorder's state error cases does not match the W3C spec.
pause() and resume() should throw an INVAILD_STATE_ERR only when it is inactive state, making them
independant.
Simply changing if statements is enough because the underlying encoder object (TrackEncoder) will
ignore Suspend/Resume calls when it is already suspended/recording so there won't be side-effects by
multiple pause()/resume() calls.

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

--HG--
extra : moz-landing-system : lando
2018-10-08 09:06:07 +00:00
Bryce Van Dyk
f88683aacf Bug 1496501 - Do not mark CDM input as unencrypted even if it has no encrypted bytes. r=cpearce
Bug 1494178 added code to mark samples with 0 encrypted ranges as unencrypted
before they were fed to the CDM. This was to catch issues where we could mark
such unencrypted samples as encrypted. However, the CDM expects certain samples
that are clear to still be marked as encrypted.

Specifically, WebM samples should be marked as encrypted if they are from an
encrypted track and have the signal byte's encryption bit set (a marker for if
the packet is encrypted), even if they have no encrypted ranges.

The WebM demuxer is already doing this. Further inspection and testing of the
mp4 demuxer shows it is behaving in line with Chromium's current mp4 parser,
which we can expect prepares its data sensibly for Widevine.

As the code removed here was added as a safety fallback, but is causing issues,
and as the demuxers already appear to be doing the right thing, the fallback
code can be removed.

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

--HG--
extra : moz-landing-system : lando
2018-10-08 22:34:32 +00:00
Tiberius Oros
0f1b35f329 Merge inbound to mozilla-central. a=merge 2018-10-08 19:19:00 +03:00
Jean-Yves Avenard
3a0d9bef61 Bug 1495025 - P6. Remove now unused paramater. r=bryce
Depends on D7316

Differential Revision: https://phabricator.services.mozilla.com/D7491
2018-10-08 15:52:01 +02:00
Jean-Yves Avenard
34eeec152b Bug 1495025 - P5. Add Windows P010 and P016 support for software decoder r=cpearce
As we do not have an IMF nor D3D11 NV12 image, we always require a full copy of the data that will deinterleave the chroma channels.

Depends on D7316

Differential Revision: https://phabricator.services.mozilla.com/D7318
2018-10-08 15:52:01 +02:00
Jean-Yves Avenard
e0e52e125f Bug 1495025 - P3. Store original IMFMediaType's subtype in D3D11SharedHandleImage. r=cpearce
This allows more easily the creation of the MFT required to convert to a RGBA32 image when doing a readback.

Depends on D7295

Differential Revision: https://phabricator.services.mozilla.com/D7296
2018-10-08 15:52:00 +02:00
Jean-Yves Avenard
dd9e74b3bb Bug 1495025 - P2. Use lambda for callback. r=cpearce
I find it easier to read than a function pointer making you search elsewhere to see what it's about

Depends on D7294

Differential Revision: https://phabricator.services.mozilla.com/D7295
2018-10-08 15:52:00 +02:00
Jean-Yves Avenard
c8d172b91e Bug 1495025 - P1. Search for alternative pixel format when stream change. r=cpearce
When decoding a vp9 profile 2 (10 bits), the MF_E_TRANSFORM_STREAM_CHANGE message is returned. We need to look for alternative format type other than NV12: 10/16 bits.

When using those formats, we can no longer assume that the D3D11ShareHandleImage can use NV12. So we will convert to RGBA32 on the fly via a MFT.

Differential Revision: https://phabricator.services.mozilla.com/D7294
2018-10-08 15:51:59 +02:00
Andreea Pavel
ed5deef5cb Backed out 2 changesets (bug 1493779) for failing android mochitest media on a CLOSED TREE
Backed out changeset 4dbc5f131040 (bug 1493779)
Backed out changeset 2430e0fe8d6d (bug 1493779)
2018-10-08 14:25:15 +03:00
Karl Tomlinson
30381e7f12 Bug 1497112 detect and optimize when AudioParam stream inputs are null r=padenot
Depends on D7979

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

--HG--
extra : moz-landing-system : lando
2018-10-08 09:09:27 +00:00
Karl Tomlinson
e2748aa808 Bug 1497112 reference AudioTimelineEvent stream as AudioNodeStream r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D7979

--HG--
extra : moz-landing-system : lando
2018-10-08 09:09:29 +00:00
Paul Adenot
f495f7a26f Bug 1493779 - Gracefuly handle OOM when setting a buffer on ConvolverNode. r=karlt
When OOMing when allocating the temporary buffer, we return an error from the
ctor via an output parameter, and make the ConvolverNode output silence.
Additionaly, a warning is issued each time we fail to set a buffer to the buffer
property of a ConvolverNode.

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

--HG--
extra : moz-landing-system : lando
2018-10-08 09:03:59 +00:00
Paul Adenot
45afa237b8 Bug 1493779 - Add a test for ConvolverNode with very large buffer. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D6935

--HG--
extra : moz-landing-system : lando
2018-10-08 09:04:06 +00:00
Paul Adenot
4cd025e1b6 Bug 1493779 - Gracefuly handle OOM when setting a buffer on ConvolverNode. r=karlt
When OOMing when allocating the temporary buffer, we return an error from the
ctor via an output parameter, and make the ConvolverNode output silence.
Additionaly, a warning is issued each time we fail to set a buffer to the buffer
property of a ConvolverNode.

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

--HG--
extra : moz-landing-system : lando
2018-10-09 13:19:20 +00:00
Paul Adenot
ea908df1b5 Bug 1493779 - Add a test for ConvolverNode with very large buffer. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D6935

--HG--
extra : moz-landing-system : lando
2018-10-09 13:19:27 +00:00
Nathan Froyd
7d045e13ef Bug 1495871 - use C++11 statics in CamerasChild; r=jesup
C++11 provides guaranteed thread-safe static initialization, so we can
use that instead of ipc's baroque Singleton class.
2018-10-05 13:43:47 -04:00
Bogdan Tara
913a7c73ea Backed out 2 changesets (bug 1493779) for test_convolverNodeOOM.html failures CLOSED TREE
Backed out changeset e78d9996b1a4 (bug 1493779)
Backed out changeset 53950ea4b105 (bug 1493779)
2018-10-04 20:24:19 +03:00
Paul Adenot
9482cd13ff Bug 1493779 - Gracefuly handle OOM when setting a buffer on ConvolverNode. r=karlt
When OOMing when allocating the temporary buffer, we return an error from the
ctor via an output parameter, and make the ConvolverNode output silence.
Additionaly, a warning is issued each time we fail to set a buffer to the buffer
property of a ConvolverNode.

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

--HG--
extra : moz-landing-system : lando
2018-10-04 15:31:42 +00:00
Paul Adenot
68b954fcb1 Bug 1493779 - Add a test for ConvolverNode with very large buffer. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D6935

--HG--
extra : moz-landing-system : lando
2018-10-04 15:31:47 +00:00
Brindusan Cristian
070df1d4c1 Backed out 6 changesets (bug 1495025) for mochitest-webgl2 failures in test_2_conformance2__textures__misc__npot-video-sizing.html. CLOSED TREE
Backed out changeset 263d4f722174 (bug 1495025)
Backed out changeset 528dbc463c22 (bug 1495025)
Backed out changeset 25895d283d47 (bug 1495025)
Backed out changeset c3b43ee1092e (bug 1495025)
Backed out changeset c548d816019d (bug 1495025)
Backed out changeset 208624601a18 (bug 1495025)
2018-10-04 15:16:07 +03:00
Jean-Yves Avenard
27e67380d0 Bug 1322234 - P5. Pass the disallow HW decoder flag to remote video decoder. r=mattwoodrow
We'll need to handle EnumSet in ipdl at some stage.

Depends on D7648

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

--HG--
extra : moz-landing-system : lando
2018-10-04 09:45:26 +00:00