Commit Graph

14402 Commits

Author SHA1 Message Date
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
Bryce Van Dyk
150ebe3741 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-10 18:39:02 +00:00
Bryce Van Dyk
c774b56446 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-10 18:38:36 +00:00
Bryce Van Dyk
fc1f753612 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-10 18:38:14 +00:00
Bryce Van Dyk
1a3a965df3 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 of implementation. Having a mode and a scheme could lead to confusion
  between the two. We can return mMode if ever needed by 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-10 18:37:48 +00:00
Bryce Van Dyk
a30bb45d3c 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-10 18:37:20 +00:00
Michael Froman
1a75356195 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-10 18:35:06 +00:00
Alex Chronopoulos
96cd8b2f6a Bug 1515549 - Avoid resetting volume in every AudioSink restart in case volume has changed outside firefox. r=jya
Avoid resetting volume in every AudioSink restart to stop unexpected volume change during play/pause and seek. Volume changes could occur if the volume has been modified outside firefox (for example pavucontrol in Linux).

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

--HG--
extra : moz-landing-system : lando
2019-01-10 11:24:29 +00:00
Andreas Pehrson
7577f27956 Bug 1518834 - Don't disable pulling when stopping microphone source. r=drno
Differential Revision: https://phabricator.services.mozilla.com/D16148

--HG--
extra : moz-landing-system : lando
2019-01-10 06:13:25 +00:00
Nico Grunbaum
b1e55aa134 Bug 1518735 - reformat PeerConnection stats test r=mjf
reformating the PeerConnection stats test to make it easier to maintain

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

--HG--
extra : moz-landing-system : lando
2019-01-09 22:04:57 +00:00
shindli
eae80bd903 Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-01-09 23:45:39 +02:00
Brindusan Cristian
e4a445730d Backed out 4 changesets (bug 1508434) for mda failures on test_waveShaperPassThrough.html. CLOSED TREE
Backed out changeset 1851290ec29b (bug 1508434)
Backed out changeset 12424313d637 (bug 1508434)
Backed out changeset 8fbed3243217 (bug 1508434)
Backed out changeset 25b67aa0ef55 (bug 1508434)
2019-01-09 21:00:35 +02:00
Alex Chronopoulos
eaa068b403 Bug 1518443 - Assert AudioStream is not closed when volume is set. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D15933

--HG--
extra : moz-landing-system : lando
2019-01-09 17:16:45 +00:00
John Lin
9101933771 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-09 17:40:45 +00:00
John Lin
b61754a7c8 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-09 17:40:53 +00:00
John Lin
4003a972dc 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-08 20:57:47 +00:00
John Lin
3ef17ab0cb 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-08 20:57:34 +00:00
Karl Tomlinson
930c7dff0f Bug 1518352 remove unnecessary WeakPtr support from PannerNode r=padenot
This is no longer used since https://hg.mozilla.org/mozilla-central/rev/11b4729e92ec#l3.101

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

--HG--
extra : moz-landing-system : lando
2019-01-08 10:07:15 +00:00
Nathan Froyd
a299b06741 Bug 1062533 - part 6 - change ReverbConvolver to use mozilla locking constructs; r=padenot
We are cargo-culting ipc/chromium/ code for this, and ReverbConvolver is
essentially the only outside consumer of Chromium IPC locks at this
point.
2019-01-09 11:09:24 -04:00
alwu
15cbe4a2c3 Bug 1512277 - Add Telemetry to know AudioContext blocking status if we enable blocking autoplay for web audio. r=karlt,Dexter
Differential Revision: https://phabricator.services.mozilla.com/D14118

--HG--
extra : moz-landing-system : lando
2019-01-08 21:52:31 +00:00
Andreas Pehrson
6f2800844c Bug 1517711 - Guard other uses of SetPullingEnabled too. r=padenot
Depends on D15892

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

--HG--
extra : moz-landing-system : lando
2019-01-08 10:06:08 +00:00
Andreas Pehrson
72327b88f5 Bug 1517711 - Check for a destroyed MediaStream on the right thread. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D15892

--HG--
extra : moz-landing-system : lando
2019-01-08 10:06:11 +00:00
Karl Tomlinson
f470a0dcbc Bug 1512737 assign HRTF to panningModel attribute instead of adding type property r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D14494

--HG--
extra : moz-landing-system : lando
2019-01-07 08:51:31 +00:00
alwu
6b72f94b2f Bug 1513039 - part14 : add new error message for web audio. r=baku,flod
Differential Revision: https://phabricator.services.mozilla.com/D14637

--HG--
extra : moz-landing-system : lando
2019-01-07 18:44:03 +00:00
alwu
a4a90d4976 Bug 1513039 - part13 : set 'mWasAllowedToStart' flag. r=karlt
'mWasAllowedToStart' would be set to false if AudioContext is not allowed to start, and would be set to true if AudioContext has been allowed to start.

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

--HG--
extra : moz-landing-system : lando
2019-01-07 18:43:31 +00:00
alwu
b19b9b34f5 Bug 1513039 - part11 : remove pref 'media.autoplay.ask-permission'. r=cpearce
Depends on D14335

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

--HG--
extra : moz-landing-system : lando
2019-01-07 18:41:58 +00:00
alwu
edbf43dd41 Bug 1513039 - part10 : remove nsIAutoplay.PROMPT r=daleharvey,cpearce
Depends on D14334

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

--HG--
extra : moz-landing-system : lando
2019-01-07 18:41:03 +00:00
alwu
047b607301 Bug 1513039 - part6 : remove AutoplayPermissionManager and AutoplayPermissionRequest. r=cpearce,smaug
Depends on D14330

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

--HG--
extra : moz-landing-system : lando
2019-01-07 18:35:30 +00:00
alwu
2e3f453263 Bug 1513039 - part5 : log warning when autoplay is blocked. r=cpearce,karlt
Wrap 'nsContentUtils::ReportToConsole()' to reduce necessary input parameters and call it when we need to log error or warning message. Show the warning when autoplay is blocked.

For web audio, this restores the console messages removed in part4 and also reports the same message when the AudioContext is blocked in the constructor.

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

--HG--
extra : moz-landing-system : lando
2019-01-07 19:57:48 +00:00
alwu
28a21fe0ad Bug 1513039 - part4 : remove permission request logic in AudioContext. r=karlt
AudioContext won't need to ask permission request anymore, and we will report error message in patch5.

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

--HG--
extra : moz-landing-system : lando
2019-01-07 18:33:36 +00:00
alwu
242554622e Bug 1513039 - part1 : remove caching temporary autoplay permission. r=smaug,florian
We're going to remove all autoplay temporary permission related codes, so we don't need to cache it anymore.

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

--HG--
extra : moz-landing-system : lando
2019-01-07 18:29:10 +00:00
Csoregi Natalia
498c659ff8 Merge inbound to mozilla-central. a=merge 2019-01-07 23:46:59 +02:00
Brindusan Cristian
331818d5aa Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-01-07 18:46:25 +02:00
Brindusan Cristian
4d62b74678 Merge inbound to mozilla-central. a=merge 2019-01-07 18:43:04 +02:00
Andreas Pehrson
97ca0d12ba Bug 1517710 - Avoid calling SetPullingEnabled on a destroyed MediaStream. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D15798

--HG--
extra : moz-landing-system : lando
2019-01-07 08:24:08 +00:00
Cosmin Sabou
2cbb9f9248 Bug 1453375 - Disable dom/media/test/test_mediarecorder_principals.html on win10 webrender. r=jmaher 2019-01-07 02:45:28 +02:00
Jeremy Lainé
1e7f350880 Bug 1517731 - "Enable mochitests for maxRetransmits and maxPacketLifeTime". r=dminor 2019-01-04 06:36:00 +02:00
Andreea Pavel
95c3660e27 Bug 1485407 - test disabled on android debug r=jmaher 2019-01-03 15:46:00 +02:00
Bryce Van Dyk
d217fb09a2 Bug 1515471 - Add gtest for mp4 sample description entry lookup. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D15442

--HG--
extra : moz-landing-system : lando
2019-01-04 17:57:18 +00:00
Bryce Van Dyk
d93e35223b Bug 1515471 - Tidy mp4parser test cases. r=jya
Driveby tidying:
- Tidy and clarify comment impacted by global clang-formatting.
- Update comments on two test cases disabled by bug 1224019. These tests no
  longer have log spam issues, and have some value as sanity tests, but remain
  disabled due to being resource hogs. Comments indicate this.

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

--HG--
extra : moz-landing-system : lando
2019-01-03 14:14:24 +00:00
Bryce Van Dyk
49eadf9b1e Bug 1515471 - Persist the track fragment header box on the Moof class. r=jya
Persisting this box lets us use it later while indexing into metadata.
Importantly, it lets us look up the appropriate sample description entry, which
lets us determine if a fragment is associated with crypto information in the
init segment.

Being able to do this is required for cbcs encryption. This will be done in a
follow up bug: Bug 1487416 (and possibly others).

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

--HG--
extra : moz-landing-system : lando
2019-01-03 14:14:00 +00:00
Bryce Van Dyk
07b9273ae0 Bug 1515471 - Have the moof parser store if sample description entries contain crypto info. r=jya
This is required to disambiguate if samples should be considered encrypted or
not when parsing certain cbcs encrypted files. Unlike with cenc encryption, cbcs
encrypted media may have fragments that lack characteristics from which we can
infer encryption. Because of this we need to store and trust this information
from the sample description box.

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

--HG--
extra : moz-landing-system : lando
2019-01-04 17:57:04 +00:00
Bryce Van Dyk
5daa213b32 Bug 1515471 - Remove unused code from MoofParser.h r=jya
The following code appears to be dead and is removed:
- The AuxInfo class.
- Moof::ParseSaiz.
- Moof::ParseSaio.
- MoofParser::ParseSinf.

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

--HG--
extra : moz-landing-system : lando
2019-01-03 14:13:09 +00:00
Andreas Pehrson
fef7f858ef Bug 1513973 - Remove mutable keyword from MediaEngineWebRTCMicrophoneSource runnables. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D15220

--HG--
extra : moz-landing-system : lando
2019-01-04 06:40:05 +00:00
Andreas Pehrson
8acabc8a13 Bug 1513973 - Log NotifyPull per track instead of per stream. r=jib
This better reflects the actual pulling that we do.

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

--HG--
extra : moz-landing-system : lando
2019-01-04 06:39:58 +00:00
Andreas Pehrson
997855e877 Bug 1513973 - Enable pulling at the same time as starting audio sources. r=jib
Otherwise we risk building up a buffer in the microphone source from when
Start() is run until pulling is enabled. This manifests itself as input latency
to the user.

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

--HG--
extra : moz-landing-system : lando
2019-01-04 06:39:43 +00:00
Andreas Pehrson
d8bf65f800 Bug 1513973 - Make MediaEngineSource::SetTrack return void. r=jib
All subclasses are now returning NS_OK, so there's no point in keeping nsresult
as the return type.

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

--HG--
extra : moz-landing-system : lando
2019-01-04 06:39:40 +00:00
Andreas Pehrson
de06fc1905 Bug 1513973 - Remove check for false. r=jib
The microphone source is no longer shared so this check is moot.

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

--HG--
extra : moz-landing-system : lando
2019-01-04 06:39:33 +00:00
Ciure Andrei
7a748ae68f Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-01-04 01:03:06 +02:00
Boris Zbarsky
058f83508f Bug 1517434 part 2. Convert existing callers of GetIsSystemPrincipal() to IsSystemPrincipal(). r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D15673

--HG--
extra : moz-landing-system : lando
2019-01-03 20:55:38 +00:00