Commit Graph

13528 Commits

Author SHA1 Message Date
Jean-Yves Avenard
cd7563c7fd Bug 1409664 - P19. Don't wrap H264 decoder in H264 converter. r=bryce
Summary:
By default, when creating a H264 decoder it is wrapped into a H264Converter which will only create the actual decoder once a valid SPS/PPS has been seen.
As creating valid SPS/PPS NALs isn't trivial, when all we care about are capabilities of such decoder, we do not wrap the decoder so that it will be immediately created.
We can then test its capabilities.

We only enable this on windows, as on mac we need to generate a SPS/PPS, otherwise the mac decoder always report that HW decoding is not enabled.

Depends on D1632

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1633
2018-07-03 11:45:23 -07:00
Jean-Yves Avenard
f07b7bee8b Bug 1409664 - P18. Properly pass KnowsCompositor object to decoder. r=bryce, r=bz
Summary:
To properly determine if a decoder is hardware accelerated, we must pass information about the compositor to the decoder.

Depends on D1631

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1632
2018-07-03 11:45:22 -07:00
Jean-Yves Avenard
34e1735ed0 Bug 1409664 - P17. Remove unused variables. r=bryce
Summary:
Silence warnings.

Depends on D1630

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1631
2018-07-03 11:45:22 -07:00
Jean-Yves Avenard
f278c2be62 Bug 1409664 - P16. Fix typo in variable name. r=bryce
Summary:

Depends on D1629

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1630
2018-07-03 11:45:21 -07:00
Jean-Yves Avenard
b763f84cf1 Bug 1409664 - P15. Fix canPlayType so that it checks codecs if provided. r=bryce
Summary:
For flac, mp3 and adts, if a codec was provided but wasn't supported in the container, it would have reported Maybe instead of No

Depends on D1628

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1629
2018-07-03 11:45:21 -07:00
Jean-Yves Avenard
88f93633b1 Bug 1409664 - P14. Provide more details for audio and video configuration. r=bryce, r=baku
Summary:
We now provides more detailed information for audio (check sampling rate and channels if provided).

And check for the power efficient attribute. We directly correlate this information with the decoder being hardware accelerated or not. All audio codecs are deemed to be power efficient.

Depends on D1626

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1627
2018-07-03 11:45:21 -07:00
Jean-Yves Avenard
df79cae335 Bug 1409664 - P13. Report the Apple's H264 decoder is hardware accelerated when not yet initialized. r=bryce
Summary:
We can't create a H264 VT decoder until we have all SPS/PPS NALs, which makes it tricky to generate when we only want to check if H264 is supported.
On mac, we can reasonable assume that hardware acceleration is always supported (though on a mac pro 2013 that isn't the case or hackintosh with nvidia cards).

Depends on D1625

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1626
2018-07-03 11:45:20 -07:00
Jean-Yves Avenard
0c1b59ee76 Bug 1409664 - P12. Don't attempt to play non-supported AAC sampling rate. r=padenot
Summary:
We know those sampling rate aren't supported and cause initialization errors later.

Depends on D1624

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1625
2018-07-03 11:45:20 -07:00
Jean-Yves Avenard
d346b32eb9 Bug 1409664 - P11. Add GetTracksInfo method to all MediaDecoder instances. r=bryce
Summary:
Allows to build an array ot TrackInfo built from the mimetype provided. This will allow to create dummy decoder to check that if they are supported and how well the decoder will perform.

Depends on D1623

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1624
2018-07-03 11:45:20 -07:00
Jean-Yves Avenard
ad801ddb59 Bug 1409664 - P10. Extend MediaExtendedMIMEType to know about audio configuration. r=bryce
Summary:
Addtionally, change the framerate to be of type double and allow to create a MediaExtendedMIMEType based on the new dom VideoConfiguration and AudioConfiguration object.

Depends on D1622

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1623
2018-07-03 11:45:19 -07:00
Jean-Yves Avenard
d586f6f943 Bug 1409664 - P9. Remove AutoTaskQueue and its use r=bryce
Summary:
TaskQueue no longer requires an explicit call to BeginShutdown() as such we no longer have a need for AutoTaskQueue.

Depends on D1621

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1622
2018-07-03 11:45:19 -07:00
Jean-Yves Avenard
f44bc2efdb Bug 1409664 - P6. Remove flac in ogg preference. r=bryce
Summary:
Let's always enable it.

Depends on D1618

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1619
2018-07-03 11:45:17 -07:00
Jean-Yves Avenard
e2c6515b25 Bug 1409664 - P5. Fix comment. r=bryce
Summary:

Depends on D1617

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1618
2018-07-03 11:45:17 -07:00
Jean-Yves Avenard
24fc82476b Bug 1409664 - P4. Provide basic MediaCapabilities support. r=bryce
Summary:
The information returned is identical to
1- canPlayType() for file
2- MediaSource.isTypeSupported for media-source
3- MediaRecorder.isTypeRecorder() for recordings.

Depends on D1616

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1617
2018-07-03 11:45:16 -07:00
Jean-Yves Avenard
b3aec00d77 Bug 1409664 - P3. Allow audio/webm container type in MediaRecorder. r=bryce
Summary:

Depends on D1614

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1616
2018-07-03 11:45:16 -07:00
Jean-Yves Avenard
83a8e7725c Bug 1409664 - P1. Add MediaCapabilities skeleton IDL. r=bz
Summary:
As per https://wicg.github.io/media-capabilities/#idl-index

Placed behind user pref media.mediacapabilities.enabled that is disabled by default

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1613
2018-07-03 11:45:15 -07:00
Chris Pearce
21f07622bf Bug 1463919 - Adjust mochitests to pass after changes. r=jya
Prior to the changes in this bug, a document would request autoplay permission
for its own origin, and not use the top level document's origin for the
permission check. Since now we use the top level document's origin for
requesting autoplay permission, some mochitests need to change, namely:

* test_autoplay_policy_permission.html can use
file_autoplay_policy_activation_frame.html directly.

The test was failing because its helper page was loaded same origin and the
helper page was testing if cross origin iframes could play; since we use the
top level document's permission request, this no longer effectively tests
whether the cross origin child can autoplay, as the cross origin child just
uses the top level window's origin for requests.

So we can instead load the helper window cross orgin instead, and remove one
helper layer.

Also an issue here is the way I was waiting for a new window to load was racy,
so now we wait for loading windows to send us a "ready" message.

* test_autoplay_policy_activation.html; this test's helper needs to wait for
loading windows to send it a "ready" message, as its helper is shared with the
above test.

MozReview-Commit-ID: LvRa4G7tqFw

--HG--
extra : rebase_source : 8ecd0e58200d79f0065a6d7b146d1d110d35953d
2018-06-27 16:15:58 +12:00
Chris Pearce
ea95e39bc9 Bug 1463919 - Move ask autoplay permission check into AutoplayPolicy. r=jya
MozReview-Commit-ID: KJcVI6gtGXw

--HG--
extra : rebase_source : a2ccd2da32d77708fdeb6ea6361975a7759cb18d
extra : source : 9b1c40f3e61ab351707f2d320ce8f87951e4868e
2018-06-26 14:16:13 +12:00
Chris Pearce
bbbdebe6e1 Bug 1463919 - Add AutoplayRequest to encapsulate asking for autoplay permission. r=smaug
Add an implementation of nsIContentPermissionRequest to encapsulate requesting
permission from the user to autoplay audible media.

All documents in the tab request permission using the top level document's
origin, so the AutoplayRequest instance for a tab is stored on the top level
content window of the tab.

AutoplayRequest ensures that there's only a single prompt shown at once.

MozReview-Commit-ID: 2u3aLnEa21z

--HG--
extra : rebase_source : a3db3a1ef87a09442b47ae1b1034b4a0143289fb
extra : source : ae572bf618155a92b136fc5f12c1f8c9ab31f89c
2018-06-22 11:57:24 +12:00
Alex Chronopoulos
8b700896f3 Bug 1460346 - Verify that AudioMixer'callback is removed before the destruction of GraphDriver. r=padenot
MozReview-Commit-ID: Jd0PVw7xHDV

--HG--
extra : rebase_source : 2e50404b08778ceadd76691312861d134d7c1a42
2018-06-29 10:05:56 +02:00
Alex Chronopoulos
9088abf6c9 Bug 1460346 - Remove unnecessary locking on an atomic value. r=pehrsons
MozReview-Commit-ID: 5SPjgHkPwTT

--HG--
extra : rebase_source : eccca9f4359b859c1bf78bf24a33d9620cd63589
2018-05-25 11:59:08 +03:00
Alex Chronopoulos
43f81a73ac Bug 1460346 - Assert in SetCurrentDriver method of MSG that is called from audio thread or when the thread is not running. r=pehrsons
MozReview-Commit-ID: 7JKcFxxDFCt

--HG--
extra : rebase_source : fe8d0b043117f3b5ecfe3ae36addae340c795875
2018-05-25 11:58:58 +03:00
Alex Chronopoulos
cd6f5298c4 Bug 1460346 - Fix a case that ThreadedDriver is started when it is already working. r=padenot
MozReview-Commit-ID: 6R6WH3ITw03

--HG--
extra : rebase_source : 0762f709b7b82714f7c3a47ad59984e5bde49238
2018-05-25 11:58:58 +03:00
Alex Chronopoulos
7ab72fe907 Bug 1460346 - Assert that GraphDriver methods are called from graph thread. r=padenot,pehrsons
MozReview-Commit-ID: Kkl7ENMXlJq

--HG--
extra : rebase_source : ccc79b8cfcb1d6d86ced5bc2a5a2931eccd7ff72
2018-05-25 11:58:45 +03:00
Alex Chronopoulos
023dddff06 Bug 1460346 - Assert that driver switch request comes only from audio thread. r=pehrsons
MozReview-Commit-ID: B8ZTPE5qqpY

--HG--
extra : rebase_source : 9001972d910e5089c2c2fb72a912c3d18292094f
2018-05-22 19:51:48 +03:00
Alex Chronopoulos
d3b6626bf0 Bug 1460346 - Create a method to check whether GraphDriver's thread is running. r=pehrsons
MozReview-Commit-ID: 8hOXvxDWOIG

--HG--
extra : rebase_source : 838637720c24e08769ea59204bb55da6678e71b4
2018-05-22 19:51:42 +03:00
Alex Chronopoulos
2b26626333 Bug 1460346 - Move checks for NextDriver member in the setter method. r=pehrsons
MozReview-Commit-ID: 906AyL0tEwG

--HG--
extra : rebase_source : 4359724926d9d06919fc911336125f308dfb1d07
2018-05-22 19:31:56 +03:00
Arnaud Bienner
e89bd4b6e5 Bug 1470856 - Add AudioWorklet definition. r=baku,karlt
MozReview-Commit-ID: 39eqjisGNTE

--HG--
extra : rebase_source : 97c18e1125c490f3e9aa3b9d5c864f99da6fd265
2018-06-27 11:31:02 +02:00
Arnaud Bienner
bd000427cf Bug 1466182 - Add AudioWorkletProcessor definitions. r=baku,karlt
MozReview-Commit-ID: 1KKrUqRY2qf

--HG--
extra : rebase_source : c287e1c4952f0f9a28dd39879d35bf37d6ce50d2
2018-06-24 20:02:47 +02:00
Bryce Van Dyk
7928956283 Bug 1450952 - If TrackBuffersManager is sent the same init segment, reuse same StreamID. r=jya
Some MSE streams will resend the same init segment. In these cases we can treat
the following data as belonging to the already existing stream. We do this by
reusing the same stream id. This stops us tearing down and restarting decoders
in these cases.  This has the benefit of stopping us introducing gaps to audio
and/or video.

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

--HG--
extra : moz-landing-system : lando
2018-06-29 07:33:23 +00:00
Margareta Eliza Balazs
6ff6f954a0 Backed out changeset cfbcac62d08e (bug 1466182) for causing bustage builds/worker/workspace/build/src/dom/media/webaudio/AudioWorkletProcessor.cpp on a CLOSED TREE 2018-06-29 14:45:37 +03:00
Arnaud Bienner
a2c3715849 Bug 1466182 - Add AudioWorkletProcessor definitions. r=baku,karlt
MozReview-Commit-ID: 7BLS2iDpFf4

--HG--
extra : rebase_source : 8382347002ad28218ee82b596f3fddc6769e4e9e
2018-06-24 20:02:47 +02:00
sotaro
22c2a053bf Bug 1470386 - Recycle TextureClient at IMFYCbCrImage r=mattwoodrow 2018-06-28 12:56:36 +09:00
Jeff Gilbert
5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Emilio Cobos Álvarez
c7d35aa526 Bug 1470930: Use enums for passing arguments for event dispatch. r=smaug
MozReview-Commit-ID: DsNuF7GAflJ
2018-06-26 18:22:06 +02:00
Margareta Eliza Balazs
c866c30fcf Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-06-26 12:24:32 +03:00
Chris Peterson
2afd829d0f Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.

MozReview-Commit-ID: 5UQVHElSpCr

--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
2018-06-17 22:43:11 -07:00
Chris Pearce
63dbf9d6f7 Bug 1470346 - Gesture activate all documents in tab, even across origins, upon user interaction. r=smaug
Sometimes when video is playing, a preroll ad plays, and that may be in a cross
origin iframe. If autoplay media is disabled, we require a user gesture in a
document before playback in that document is permitted, and we require each
origin to be gesture activated separately. So in the cross origin preroll video
add case, then the user will have to click once to unblock playback for the
cross origin ad, and then once the preroll ad finishes, the user will have to
click again to activate playback of the same origin content video.

This is a bad user experience.

So we should instead make gesture activation propagate up the doc tree
irrespective of crossing origins.  This way, when the user clicks to activate,
all documents in that tab are also also effectively gesture activated, and so
can autoplay.

MozReview-Commit-ID: 1HZQ5zkubR

--HG--
extra : rebase_source : d6b75732548cb1d73b9f82dce60a5e6e97d1da14
2018-06-22 11:52:20 +12:00
Jean-Yves Avenard
507a82e41c Bug 1470944 - Don't attempt to create a new demuxer upon changeType call r=bryce
Re-creating a new demuxer is fine, provided that the SourceBufferResource exists. However, a resource is only created upon receiving an init segment.

The segment following a call to changeType() must be an init segment, will let the demuxer creation occurs there.

Differential Revision: https://phabricator.services.mozilla.com/D1812
2018-06-25 19:13:13 +00:00
Jean-Yves Avenard
9ae6b235d5 Bug 1470814 - Update SourceBuffer.changeType behaviour. r=bryce
Follow current WICG https://github.com/WICG/media-source/tree/codec-switching as of revision f2ed457

The difference with the current spec can be seen with:
https://services.w3.org/htmldiff?doc1=https%3A%2F%2Fraw.githubusercontent.com%2FWICG%2Fmedia-source%2F9bb87ae9566f0db3d646b648e7370bdac97349ae%2Findex.html&doc2=https%3A%2F%2Fraw.githubusercontent.com%2FWICG%2Fmedia-source%2Fcodec-switching%2Findex.html

Differential Revision: https://phabricator.services.mozilla.com/D1810
2018-06-25 19:07:16 +00:00
Jean-Yves Avenard
d677c92441 Bug 1470754 - Remove AMD VP9 MFT support r=bryce
Not even AMD supports it anymore.

Differential Revision: https://phabricator.services.mozilla.com/D1793
2018-06-25 17:49:48 +00:00
Bryce Van Dyk
a347705d9a Bug 1450845 - Add crashtest for seekToNextFrame when a seek is already in progress. r=jya
MozReview-Commit-ID: 892uIqNuLSg

--HG--
extra : rebase_source : bbe50807fb575fb0776646cbd233f3310741b848
2018-06-07 09:44:48 -04:00
Bryce Van Dyk
926f765909 Bug 1450845 - MediaDecoderStateMachine now ignores SeekToNextFrame if already seeking. r=jya
SeekToNextFrame is handled differently than other seeks by the
MediaDecoderStateMachine, and should not take place while other seeks already
are. Bug 1410225 implemented some changes in HTMLMediaElement to prevent this,
but it's still possible to move to a seeking state in the MDSM and accept
SeekToNextFrame (as in this bug).

This changeset changes the MDSM to reject SeekToNextFrame if a seek is already
happening. Since the MDSM now does this the changes from bug 1410225 can be
removed.

This has the functional change of the promise from SeekToNextFrame being
rejected if the seek in not performed due to another seek. Previously the
promise would succeed when the other seek completed. This seems sensible as the
next frame seek does not actually take place.

MozReview-Commit-ID: HD9WRFq3LZV

--HG--
extra : rebase_source : fb276010119038db4319b3b81bcbf51ef2cab1d9
2018-06-06 15:17:30 -04:00
Arnaud Bienner
5fdd4661b7 Bug 1458446 - Add AudioWorkletNode interface definitions. r=baku,karlt
MozReview-Commit-ID: BLumJG4BDke

--HG--
extra : rebase_source : 1a507149cefb76cedbcc336d9b9ae6e0eebed59c
2018-06-01 19:10:02 +02:00
Jean-Yves Avenard
a9650899f6 Bug 1468241 - P2. Ensure RemoteVideoDecoder::mSeekTarget is only accessed on task queue. r=padenot
Amend comments to clarify how some members are accessed.

MozReview-Commit-ID: FeEIRap3zvn

Depends on D1726

Differential Revision: https://phabricator.services.mozilla.com/D1727
2018-06-21 13:34:41 +00:00
Jean-Yves Avenard
67eb7f4c9f Bug 1469257 - [H264] Only check for SPS changes on keyframe r=bryce
Some invalid streams contain SPS changes and those appear to only occur on non-keyframe, this cause all frames to be dropped until the next keyframe is found. This result in apparent freezes.

While it is theoretically possible to have SPS changes inband on non-keyframe those should be very rare (I've never seen one). The content would have been invalid anyway in an non-fragmented mp4.

So we now only check for a SPS change on keyframe. This would cause no affect on either windows, android or ffmpeg as those decoders handle format change fine. The mac decoder could however show garbled frames temporarily.

Differential Revision: https://phabricator.services.mozilla.com/D1733
2018-06-20 19:24:34 +00:00
Nico Grunbaum
2dc9bc2b7c Bug 1456101 - ensure X11 DesktopCapture module is created on main thread r=dminor
MozReview-Commit-ID: 8lP03135ttK

--HG--
extra : rebase_source : 0ba001a933637e2ef76810d2e85a71b12dd49017
2018-06-04 22:03:14 -07:00
Joel Maher
8324126795 Bug 1405428 - annotate crashtests and reftests which fail in test-verify mode. r=gbrown 2018-06-19 11:38:25 -04:00
shindli
350fbcac6e Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-06-19 00:46:12 +03:00
Nathan Froyd
a3edf6e096 Bug 1448014 - avoid needless flattening in AndroidDecoderModule; r=jesup 2018-06-18 15:27:06 -04:00