Commit Graph

14451 Commits

Author SHA1 Message Date
Bryce Van Dyk
279e7ee239 Bug 1519617 - Update MoofParser to handle tracks using track_id 0. r=jya
Using track_id 0 is forbidden by the mp4 spec, however, some sites still serve
media using this track_id. We've been using the 0 track ID to trigger special
handling in the MoofParser where we will parse multiple tracks, and this led us
to be tolerant of tracks using this reserved id (though we likely had some bugs
due to this).

Since sites are using this track_id, and as other browsers (and Firefox until I
broke this) tolerate such media, we should too. In order to do so correctly, we
should no longer us track_id=0 as a special case in the MoofParser, and instead
have an explicit flag, which is what this patch does.

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

--HG--
extra : moz-landing-system : lando
2019-01-16 11:45:42 +00:00
Sylvestre Ledru
47a5dd1fb8 Bug 1519636 - Reformat everything to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-01-16 08:50:07 +00:00
Johann Hofmann
7d58da52ae Bug 1519415 - Don't use https://example.com in test_getUserMedia_permission to avoid timeouts on Android. r=jib
For some reason that I could not figure out, usage of any https host in these getUserMedia mochitests
on Android causes a network proxy error and will, in this particular case, lead to the iframe not
loading the test page. This causes our test to timeout.

I don't think testing https here is particularly important, and so I'd rather save some
effort for myself and just remove it.

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

--HG--
extra : moz-landing-system : lando
2019-01-15 20:17:47 +00:00
Nico Grunbaum
3cb1b02e77 Bug 1347070 - add qpSum to RTC outbound RTP stats r=jib,smaug
This adds qpSum to RTC outbound RTP stats

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

--HG--
extra : moz-landing-system : lando
2019-01-15 21:26:05 +00:00
Cosmin Sabou
5091172c56 Merge mozilla-central to autoland. 2019-01-15 12:41:53 +02:00
Cosmin Sabou
2522f5281a Backed out changeset dad40f23f4c1 (bug 1519617) for breaking Soundcloud. a=backout 2019-01-15 12:38:06 +02:00
Brindusan Cristian
dfde5a833c Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-01-15 06:40:07 +02:00
Brindusan Cristian
d34193a4f4 Merge inbound to mozilla-central. a=merge 2019-01-15 06:38:06 +02:00
alwu
8632d7588c Bug 1506290 - part1 : implement 'document.autoplayPolicy'. r=baku,cpearce
`document.autoplayPolicy` returns a enum string that can change overtime based on user session activity:

- “allowed” if autoplay is currently allowed.
- “allowed-muted” if muted video autoplay is currently allowed.
- “disallowed” is autoplay is not current allowed.

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

--HG--
extra : moz-landing-system : lando
2019-01-15 00:13:34 +00:00
Bryce Van Dyk
fedef4db1b Bug 1516660 - Add pattern encryption params to GMP IPDL and plumb to the CDM. r=cpearce
Note, we only pass the relevant IV across the IPC boundry. I.e. if the crypto
scheme is cenc we do not pass a constant IV (this is only used by cbcs), and
only pass per sample IVs. For cbcs we do the converse. This means in the CDM
child we're only receiving one IV, which should be appropriate for whatever
scheme (this is similar to how Chromium handle IVs being passed to the CDM).

The CDM child side now writes pattern information to samples it's preparing for
CDM.

With these changes we should be passing all the information required to handle
cbcs to the CDM.

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

--HG--
extra : moz-landing-system : lando
2019-01-14 20:24:57 +00:00
Andreas Pehrson
67a532de95 Bug 1514016 - Make MediaRecorder::Pause and MediaRecorder::Resume idempotent. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D15910

--HG--
extra : moz-landing-system : lando
2019-01-14 18:32:56 +00:00
Andreas Pehrson
f562a09e08 Bug 1514016 - Make MediaRecorder::Stop idempotent. r=jib
Depends on D14571

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

--HG--
extra : moz-landing-system : lando
2019-01-14 18:32:55 +00:00
Bryce Van Dyk
4c57de267d Bug 1514016 - Use DispatchTrustedEvent helper in MediaRecorder::DispatchSimpleEvent. r=pehrsons
During review of bug 1458538, :bz noted that our event dispatching code could be
simplified by using DOMEventTargetHelper::DispatchTrustedEvent. As this was not
done during that bug, driveby fix here while we're making other changes.

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

--HG--
extra : moz-landing-system : lando
2019-01-14 18:32:54 +00:00
Bryce Van Dyk
cebb739adb Bug 1514016 - Add logging of this to MediaRecorder::pause and resume. r=pehrsons
Driveby change to bring our logging here in line with out other logging.

Depends on D14488

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

--HG--
extra : moz-landing-system : lando
2019-01-14 18:32:54 +00:00
Bryce Van Dyk
53de28258e Bug 1514016 - Fire pause and resume events asynchronously. r=pehrsons
Depends on D14487

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

--HG--
extra : moz-landing-system : lando
2019-01-14 18:32:53 +00:00
Bryce Van Dyk
f542c26fa8 Bug 1514016 - Replace DispatchStartEventRunnable with DispatchEventRunnable. r=pehrsons
Depends on D14486

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

--HG--
extra : moz-landing-system : lando
2019-01-14 18:32:53 +00:00
Bryce Van Dyk
497b61bdf5 Bug 1514016 - Add DispatchEventRunnable to media recorder to aid with dispatching different named events. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D14486

--HG--
extra : moz-landing-system : lando
2019-01-14 18:32:52 +00:00
Bryce Van Dyk
53ec57bafc Bug 1516669 - Update fake-cdm to use CDM10 interface. r=cpearce
Differential Revision: https://phabricator.services.mozilla.com/D15520

--HG--
extra : moz-landing-system : lando
2019-01-14 16:41:55 +00:00
Bryce Van Dyk
5c977fdb7d Bug 1519617 - Update MoofParser to handle tracks using track_id 0. r=jya
Using track_id 0 is forbidden by the mp4 spec, however, some sites still serve
media using this track_id. We've been using the 0 track ID to trigger special
handling in the MoofParser where we will parse multiple tracks, and this led us
to be tolerant of tracks using this reserved id (though we likely had some bugs
due to this).

Since sites are using this track_id, and as other browsers (and Firefox until I
broke this) tolerate such media, we should too. In order to do so correctly, we
should no longer us track_id=0 as a special case in the MoofParser, and instead
have an explicit flag, which is what this patch does.

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

--HG--
extra : moz-landing-system : lando
2019-01-14 16:33:03 +00:00
David Major
f68118a2d1 Bug 1520021 - clang-cl should not use AudioNodeEngine's NEON workarounds. r=drno 2019-01-14 18:34:57 -05:00
Paul Adenot
1116d6d4b0 Bug 1499426 - Align the lifetime of AudioInputProcessing with the lifetime of MediaEngineWebRTCAudio. r=achronop
Differential Revision: https://phabricator.services.mozilla.com/D16201

--HG--
extra : moz-landing-system : lando
2019-01-14 15:09:34 +00:00
Csoregi Natalia
c43240cef5 Merge inbound to mozilla-central. a=merge 2019-01-12 23:36:33 +02:00
Ryan VanderMeulen
b8c528a0f1 Bug 1468451 - Add crashtest. r=me 2019-01-12 09:59:00 -05:00
Michael Froman
c475e5754c Bug 1514874 - start RDD process on-demand r=jya,jld
Differential Revision: https://phabricator.services.mozilla.com/D15775

--HG--
extra : moz-landing-system : lando
2019-01-12 04:51:20 +00:00
Makoto Kato
6de3261d9f Bug 1518994 - Enable NEON in AudioNodeEngine on aarch64. r=drno
Although we don't define BUILD_ARM_NEON on aarch64 (bug 1303952), aarch64
supports NEON, so we should turn on NEON for AudioNodeEngine.

OpenMAX DL doesn't support aarch64 since we modify some codes.  So FFTBlock.h
still use ARM32 only.

Also, MSVC cannot use arm_neon.h header, doesn't allow
`float32x4_t zero = {0, 0, 0, 0};` and throws compiler warning.
So we need some workarounds to use this on MSVC.

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

--HG--
extra : moz-landing-system : lando
2019-01-11 14:39:51 +00:00
Noemi Erli
7cd3732360 Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-01-11 23:59:12 +02:00
Noemi Erli
ff92f74db5 Merge autoland to mozilla-central. a=merge 2019-01-11 23:53:31 +02:00
Noemi Erli
3c06305cb1 Backed out changeset 849f81f21979 (bug 1515549) per achronop's request a=backout 2019-01-11 22:04:58 +02:00
arthur.iakab
404cf74da4 Backed out changeset 0f68913927a5 (bug 1499426) for mochitest failure on MediaEngineWebRTCAudio CLOSED TREE 2019-01-11 21:04:03 +02:00
alwu
a48d405c9e Bug 1513733 - part4 : do not call suspendInternal() when constructing AudioContext r=karlt
As setting `mSuspendCalled` is enough to prevent the stream from starting, we have no need to apply unnessary audio context operation to MSG. In addition, it can avoid incorrect AudioContext's state because of out of order resume/suspend operation (https://bugzilla.mozilla.org/show_bug.cgi?id=1285290).

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

--HG--
extra : moz-landing-system : lando
2019-01-11 18:54:43 +00:00
Alastor Wu
0f15935379 Bug 1513733 - part3 : add test. r=baku,karlt
Add test and mochitest-only function in document.

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

--HG--
extra : moz-landing-system : lando
2019-01-11 18:45:31 +00:00
alwu
ab5249684b Bug 1513733 - part2 : try to start AudioContext when media element which is as a source for web audio starts r=cpearce,karlt
If media element is used as a source for AudioContext, we would try to start AudioContext which was not allowed
to start when media element starts playing.

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

--HG--
extra : moz-landing-system : lando
2019-01-11 20:43:01 +00:00
alwu
38e9580406 Bug 1513733 - part1 : rename 'NotifyScheduledSourceNodeStarted()' r=karlt
In order to call this method on other situations, rename it to 'StartBlockedAudioContextIfAllowed()'.

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

--HG--
extra : moz-landing-system : lando
2019-01-11 20:42:02 +00:00
Paul Adenot
166bf2eb1a Bug 1499426 - Align the lifetime of AudioInputProcessing with the lifetime of MediaEngineWebRTCAudio. r=achronop
Differential Revision: https://phabricator.services.mozilla.com/D16201

--HG--
extra : moz-landing-system : lando
2019-01-11 17:22:24 +00:00
John Lin
72322eaae4 Bug 1508434 - p4: release audio output buffers after processing on task queue. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D15985

--HG--
extra : moz-landing-system : lando
2019-01-11 17:08:11 +00:00
John Lin
31377925fe Bug 1508434 - p3: assert members are only accessed on task queue. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D15740

--HG--
extra : moz-landing-system : lando
2019-01-11 17:08:03 +00:00
John Lin
d6ebba5265 Bug 1508434 - p2: move codec output processing to task queue. r=jya
Processing MediaCodec output in Android binder threads while flushing
in task queue could cause race condition and leftover frames. Dispatch
the processing to task queue ensures all frames prior to flushing will
be cleared (by mDecodedData.Clear()) or ignored (by mInputInfos.Clear()).

Also consolidate all flushing operations in one task to avoid frame
insertion between emptying mDecodedData and mInputInfos.

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

--HG--
extra : moz-landing-system : lando
2019-01-11 17:08:00 +00:00
John Lin
2a6faa6bf8 Bug 1508434 - p1: Support explicitly resetting seek threshold. r=jya
Usually the threshold is reset internally in MediaDataDecoder subclasses
that support the hint in their Flush() implementations so the value
will start fresh after seeking completed. But sometimes when there are
consecutive seek requests, MediaFormatReader::DecoderData::Flush() could
return early because DecoderData::mFlushed stays true when there is no
sample demuxed yet, and the threshold will not be cleared. Also, in
MediaFormatReader::SetVideoDecodeThreshold() we decide not to set the
hint when the seek target is close to EOS by checking the existence of
the next keyframe, and that could fail when there are gaps between MSE
buffered ranges. To make sure the hint is never out of date, we should
clear it rather than leaving it untouched.

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

--HG--
extra : moz-landing-system : lando
2019-01-11 17:07:49 +00:00
Bryce Van Dyk
6109ca9301 Bug 1487416 - Handle cbcs data from mp4parse-rust. r=jya
Handle mp4parse-rust providing cbcs data in the track metadata. Explicitly check
the crypto scheme we get in the metadata and error if we encounter something
outside of cenc and cbcs -- catch unexpected data early.

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

--HG--
extra : moz-landing-system : lando
2019-01-11 15:13:41 +00:00
Bryce Van Dyk
4ace4150ca Bug 1487416 - Index.cpp's SampleIterator populates cbcs data. r=jya
Rework our mp4 sample iterator to handle cbcs crypto data.

To support this we populate the following new data for samples:
- Crypto pattern information, this is split into a count of encrypted blocks
  and a count of clear blocks.
- A constant IV.

This information is available at a track level and a sample group level. The
sample group level supersedes track level information if both a present.

Prior to this patch, some crypto information was written to samples in
the SampleIterator in Index.cpp, and some in the MP4Demuxer (based on if the
SampleIterator had not populated the data). This patch moves all these
operations into the SampleIterator -- the idea being that the sample iterator
should be the component responsible for setting up sample meta data.

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

--HG--
extra : moz-landing-system : lando
2019-01-11 15:13:37 +00:00
Bryce Van Dyk
2ac043ecf5 Bug 1487416 - Support different encryption schemes in mp4 parser's GetAuxInfo. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D15876

--HG--
extra : moz-landing-system : lando
2019-01-11 15:12:14 +00:00
Bryce Van Dyk
b661b40548 Bug 1487416 - Parse pattern encryption information from the seig box. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D15875

--HG--
extra : moz-landing-system : lando
2019-01-11 15:11:51 +00:00
Bryce Van Dyk
fa9d86fda5 Bug 1487416 - Replace mValid and mMode with mCryptoScheme for track and sample crypto structs. r=jya
Explicitly store the crypto scheme being used on our crypto structs to let us
differentiate between cenc and cbcs data. In doing so remove mMode and replace
mValid with IsEncrypted() for the following reasons:
- Different modes within the existing schemes are not currently utilized by the
  spec: the scheme implies mode. Having a mode and a scheme could lead to confusion
  between the two. We can return mMode if ever needed by the spec --
  possibly if the isProtected flag which we were tracking with mMode, is
  ever changed to be more than a bool in the spec.
- mValid was typically used to check if these structs contained valid crypto
  data or not. With only one scheme this was often shorthand for 'IsEncrypted',
  but with multiple schemes what is considered valid data for one may not be for
  another. Do away with this and just explicitly have an 'IsEncrypted'.

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

--HG--
extra : moz-landing-system : lando
2019-01-11 15:29:45 +00:00
Bryce Van Dyk
1db6ef799b Bug 1487416 - Read pattern information in Sinf parser. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D15873

--HG--
extra : moz-landing-system : lando
2019-01-11 15:11:05 +00:00
Johann Hofmann
dd8f905612 Bug 1371741 - Test getUserMedia in sandboxed srcdoc, blob, data and regular iframes. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D16221

--HG--
extra : moz-landing-system : lando
2019-01-11 10:50:08 +00:00
Johann Hofmann
ca334646e4 Bug 1371741 - Disallow getUserMedia on null principals. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D16220

--HG--
extra : moz-landing-system : lando
2019-01-11 10:49:37 +00:00
Arnaud Bienner
0de7c09e8d Bug 1501709 - AudioWorkletGlobalScope::RegisterProcessor: check descriptors and convert them to an internal representation. r=karlt,baku,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D11741

--HG--
extra : moz-landing-system : lando
2019-01-10 18:45:38 +00:00
Cosmin Sabou
af0ac088e5 Backed out changeset 8d953c25fdef (bug 1514874) for windows asan mda failures on RemoteDecoderModule.cpp. 2019-01-11 02:03:38 +02:00
Cosmin Sabou
15939f75f2 Backed out 6 changesets (bug 1487416) for causing Android build bustages on RemoteDataDecoder.cpp. CLOSED TREE
Backed out changeset 05bcc598e9fb (bug 1487416)
Backed out changeset b99936efbbc9 (bug 1487416)
Backed out changeset ee55b284223e (bug 1487416)
Backed out changeset d25449127f8f (bug 1487416)
Backed out changeset f7c201b7f9bc (bug 1487416)
Backed out changeset 233aedc8b42e (bug 1487416)
2019-01-10 23:37:20 +02:00
Bryce Van Dyk
01a302ea14 Bug 1487416 - Handle cbcs data from mp4parse-rust. r=jya
Handle mp4parse-rust providing cbcs data in the track metadata. Explicitly check
the crypto scheme we get in the metadata and error if we encounter something
outside of cenc and cbcs -- catch unexpected data early.

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

--HG--
extra : moz-landing-system : lando
2019-01-10 18:39:27 +00:00