Commit Graph

1257 Commits

Author SHA1 Message Date
Jean-Yves Avenard
95343883e7 Bug 1486080 - Always allocate memory to pass extradata. r=padenot
Despite wording of the documentation to the contrary, we can't provide a static pointer to an immutable object.
Apparently, it's always been that way.

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

--HG--
extra : moz-landing-system : lando
2018-08-27 13:22:26 +00:00
Jean-Yves Avenard
d643f0e549 Bug 1484242 - P2. Add AllocationWrapper::CreateDecoder convenience method. r=bryce
This method will allocate a decoder according to the GlobalAllocPolicy. On Android API 18 and lower, there can only be a single decoder created at a time. The promise returned by CreateDecoder will only be resolved once the allocation policy permits a new decoder to be created.

Differential Revision: https://phabricator.services.mozilla.com/D3678
2018-08-21 15:20:54 +02:00
Jean-Yves Avenard
d3b19c39b3 Bug 1484242 - P1. Add AllocationPolicy objects. r=bryce
We extract the GlobalAllocationPolicy and the MediaDataDecoder wrapper from MediaFormatReader.

They will be used to create a new wrapping class that will serialize allocation and initalization of decoders if the platform requires it.

Differential Revision: https://phabricator.services.mozilla.com/D3676
2018-08-21 15:20:54 +02:00
Jean-Yves Avenard
384be24476 Bug 1482847 - Fix android decoder creation. r=jolin
A mDisplay vs mImage mixup. We also set both values in CreateTrackInfoWithMIMETypeAndContainerTypeExtraParameters to prevent similar issues in the future.

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

--HG--
extra : moz-landing-system : lando
2018-08-20 15:47:21 +00:00
Jean-Yves Avenard
2cdf517489 Bug 1484648 - Implement CodecProxy::IsHardwareAccelerated. r=jolin
Differential Revision: https://phabricator.services.mozilla.com/D3789

--HG--
extra : moz-landing-system : lando
2018-08-20 15:42:33 +00:00
John Lin
c10cb88742 Bug 1480533 - drop frames with presentation time earlier than what's already output. r=jya
MediaCodec products out of order buffers for some Twitch (60fps)
streams. Detecting and discarding these frames asap to make the
buffers available to codec sooner, reducing the chances of
starvation.

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

--HG--
extra : moz-landing-system : lando
2018-08-09 16:29:51 +00:00
Karl Tomlinson
146c0a09dd bug 1476231 add accessor for ffvpx real DFT functions r=jya
MozReview-Commit-ID: AF2jl6ZnD4z

--HG--
extra : rebase_source : c7f6c60e3f1b282db5aef2f7b84f23b46734513f
2018-07-14 12:32:20 +12:00
Karl Tomlinson
c0bf3f57b9 bug 1476231 link ffmpeg real DFT functions r=jya
MozReview-Commit-ID: 1K5tta51rBB

--HG--
extra : rebase_source : 11355d14e69ca8f79c504274e4cdc78748af1a1d
2018-07-14 11:57:45 +12:00
Jean-Yves Avenard
d7eb320e7a Bug 1476975 - P3. Fix canPlayType/isTypeSupported for AV1 content. r=dminor
AV1 support is behind a pref, as such, the result of canPlayType should depends on the value of that pref.

Additionally to this change we remove AOMDecoder::IsSupportedCodec as it implied confusion on what a codec mimetype is. There are two type of codec mimetype: the one describing the container content ("av1") and the one describing the codec itself "video/av1")
AOMDecoder shouldn't know anything about containers (e.g. mp4 or webm)

--HG--
extra : rebase_source : 72ebe662f76fb6c9d8be1f753890601aac440061
2018-07-20 10:24:56 +02:00
Noemi Erli
76fe049448 Backed out 3 changesets (bug 1476975) for mochitest failures on test_can_play_type_webm.html
Backed out changeset 91585d095420 (bug 1476975)
Backed out changeset 798f4894ffd5 (bug 1476975)
Backed out changeset b5377ceef34f (bug 1476975)
2018-07-20 21:27:01 +03:00
Jean-Yves Avenard
4d4b32ccf8 Bug 1476975 - P3. Fix canPlayType/isTypeSupported for AV1 content. r=dminor
AV1 support is behind a pref, as such, the result of canPlayType should depends on the value of that pref.

Additionally to this change we remove AOMDecoder::IsSupportedCodec as it implied confusion on what a codec mimetype is. There are two type of codec mimetype: the one describing the container content ("av1") and the one describing the codec itself "video/av1")
AOMDecoder shouldn't know anything about containers (e.g. mp4 or webm)
2018-07-20 19:04:46 +02:00
Dan Minor
b83fc6c040 Bug 1445683 - Updates to AOMDecoder; r=jya
This reflects the API changes to the aom_codec_decode function and the removal
of I440. It also sets allow_lowbitdepth to give proper support for 8 bit video,
and removes the git version from the mime type.

MozReview-Commit-ID: GuTvnPkR1Er

--HG--
extra : rebase_source : 4540f74df335d59714a61d5f7e2ad7a54f8fa00d
2018-04-23 16:03:27 -04:00
Dan Minor
a2a0f53596 Bug 1445683 - Update aom to v1.0.0; r=jya
Update aom to rev d14c5bb4f336ef1842046089849dee4a301fbbf0.

MozReview-Commit-ID: YoPHbFHRq2

--HG--
rename : third_party/aom/build/cmake/aom_config.c.cmake => third_party/aom/build/cmake/aom_config.c.template
rename : third_party/aom/md5_utils.h => third_party/aom/common/md5_utils.h
rename : third_party/aom/warnings.h => third_party/aom/common/warnings.h
rename : third_party/aom/webmenc.h => third_party/aom/common/webmenc.h
rename : third_party/aom/y4minput.h => third_party/aom/common/y4minput.h
rename : third_party/aom/aomstats.h => third_party/aom/stats/aomstats.h
rename : third_party/aom/rate_hist.h => third_party/aom/stats/rate_hist.h
extra : rebase_source : 6e3d836d1d36879f862ed74227522e422f4fb5c1
2018-06-21 13:47:50 -04:00
Jean-Yves Avenard
1f1e9dbfe9 Bug 1409664 - P22. Create SPS/PPS extradata to better determine decoder capabilities. r=bryce
Summary:
The Apple VT decoder requires SPS+PPS at construction time. If not provided, in earlier macOS it used to give an error. In the current 10.13 it appears to work, however the decoder always report to be software only.

To properly determine the decoder capabilities, we construct a SPS NAL from the codec mimetype provided.

Details on the structure of the mimetype can be found in https://tools.ietf.org/html/rfc6381#section-3.3 and is a 1:1 match with the data found in the SPS.

Depends on D1718

Reviewers: bryce

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1719
2018-07-03 11:45:24 -07:00
Jean-Yves Avenard
cafd081573 Bug 1409664 - P20. Add BitWriter class. r=bryce
Summary:

Depends on D1633

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1678
2018-07-03 11:45:23 -07:00
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
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
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
sotaro
22c2a053bf Bug 1470386 - Recycle TextureClient at IMFYCbCrImage r=mattwoodrow 2018-06-28 12:56:36 +09: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
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
Nathan Froyd
a3edf6e096 Bug 1448014 - avoid needless flattening in AndroidDecoderModule; r=jesup 2018-06-18 15:27:06 -04:00
Andi-Bogdan Postelnicu
60732a90a5 Bug 1453795 - DOM/Media - Initialize member fields in classes/ structures. r=jyavenard
--HG--
extra : rebase_source : 0c785260497fadf98cf3cff8b9fcae8ea699c2c1
2018-06-15 10:25:02 +03:00
Dorel Luca
746fbfe0a7 Merge mozilla-inbound to mozilla-central. a=merge 2018-06-04 21:11:34 +03:00
Miko Mynttinen
4c85ef17cc Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 1e7eea4f2d4ec16ec0c559a8afb26976ddbf4d07
2018-06-01 17:59:07 +02:00
arthur.iakab
7e765f798b Backed out 2 changesets (bug 1465060) for build bustages on security/sandbox/linux/reporter/SandboxReporter.cpp
Backed out changeset 7c8905b6b226 (bug 1465060)
Backed out changeset 10446073eca8 (bug 1465060)
2018-06-03 19:25:41 +03:00
Miko Mynttinen
8d9dc85cd4 Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 619d0e0ff63a2453c80f0c4d9beb906d43fa9b01
2018-06-01 17:59:07 +02:00
Emilio Cobos Álvarez
1e9c395548 Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj
Same approach as the other bug, mostly replacing automatically by removing
'using mozilla::Forward;' and then:

  s/mozilla::Forward/std::forward/
  s/Forward</std::forward</

The only file that required manual fixup was TestTreeTraversal.cpp, which had
a class called TestNodeForward with template parameters :)

MozReview-Commit-ID: A88qFG5AccP
2018-06-02 09:33:26 +02:00
Emilio Cobos Álvarez
fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
sotaro
5ae7f885d0 Bug 1466059 - Use DeviceManagerDx::GetImageDevice() in WMFVideoMFTManager::InitInternal() r=nical 2018-06-04 09:42:16 +09:00
Jean-Yves Avenard
5c9362146d Bug 1457499 - P3. Query decoded frame size instead of calculating it. r=bryce
Under most cases, the frame decoded height is just the displayed height rounded to the next 16 row aligned value.
However, this doesn't appear to always be the case. So we query the WMF framework for the decoded frame size.
We continue to use the displayed sizes as found in the SPS to ensure proper display of non 1:1 aspect ratio.

Adding diagnostic assertion to find potential regressions, we will address those as they come.

MozReview-Commit-ID: L8VowEw6L9F

--HG--
extra : rebase_source : 49acd9fd36469ee0a4e1ed0fe5cd6f2211ba8117
2018-05-16 11:09:20 +02:00
Jean-Yves Avenard
9ad27a22c2 Bug 1457499 - P2. Fix compilation warning. r=bryce
TaskQueue::Dispatch returns a nsresult which must be checked.

MozReview-Commit-ID: 7Tl7O96rQNt

--HG--
extra : rebase_source : e898b776f765a5641a794a7242715728940075f6
2018-05-16 11:03:05 +02:00
Jean-Yves Avenard
4bbe4e2668 Bug 1457499 - P1. Remove unused variable. r=bryce
Prevent a compilation warning

MozReview-Commit-ID: HT1UzsFUNXj

--HG--
extra : rebase_source : c552745bad82ef3f6faf7fc29ad10682211fe6d2
2018-05-16 11:01:58 +02:00
Jean-Luc Bonnafoux
bd34ea8894 Bug 1244870 - initialization of err variable r=jya
MozReview-Commit-ID: 6Zh7tqNdHeu

--HG--
extra : rebase_source : e89b46bbf17d9190c1f18b38c7ed22390fe05457
2018-04-24 20:42:02 +02:00
Jean-Yves Avenard
abe6e049cd Bug 1435212 - Add support for FFmpeg 4.0. r=bryce
MozReview-Commit-ID: JlDFSUyGQu

--HG--
extra : rebase_source : 310135ac5453b01164910bd3bf50b6107dcbc710
2018-04-19 10:19:15 +02:00
Takuro Ashie
897da97e65 Bug 1306529 - OmxDataDecoder: Fix a stall issue on shutting down r=jya
Because the shutdown closure awaits finishing itself by
TaskQueue::AwaitShutdownAndIdle(), the function blocks infinitely.

The code is wrongly introduced at the following commit:

  * https://bugzilla.mozilla.org/show_bug.cgi?id=1319987
    * https://hg.mozilla.org/mozilla-central/rev/b2171e3e8b69

This patch calls it on mTaskQueue intead of mOmxTaskQueue to
avoid the issue.

MozReview-Commit-ID: 4qmX2QlniEG

--HG--
extra : rebase_source : 17ef7f95f7205307980dd0924821b005ada06c56
extra : source : eb0a2bb44f95f195343fed284efcdd524a7bb868
2018-03-27 16:37:21 +09:00
Takuro Ashie
956ef94c09 Bug 1306529 - Add initial implementation of PureOmxPlatformLayer r=jya
It's a concrete class of OmxPlatformLayer for accessing OpenMAX IL
libraries directly. It will be usable on various embedded linux systems.
Note that it's not enabled by default yet. Add the following config to
your mozconfig.

  ac_add_options --enable-openmax

TODO: Implement zero-copy mode

MozReview-Commit-ID: EMEXAKzzR64

--HG--
extra : rebase_source : ee6acf7d046e8ce6e18a53988a4ea308b8d4d44f
2018-04-18 11:38:12 +09:00
Nicholas Nethercote
51f2b494ea Bug 1448222 - Remove MediaPrefs. r=jya
This patch converts all the prefs in MediaPrefs to the new StaticPrefs system.

Note that the "media.wmf.skip-blacklist" pref was present in both MediaPrefs
and gfxPrefs. The copy in MediaPrefs was never used; this explains why this
patch does not add an entry for it to StaticPrefList.h.

Note also that the patch removes themedia.rust.mp4parser pref, because it's
unused.

MozReview-Commit-ID: IfHP37NbIjY

--HG--
extra : rebase_source : df84ea813b7c366d7be663c696891325610149c8
2018-03-20 09:48:56 +11:00
Sebastian Hengst
0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Gurzau Raul
7334578c1a Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-04-13 02:14:09 +03:00
Nathan Froyd
a31fa9e19c Bug 1453437 - return UniquePtr from MediaRawData::CreateWriter; r=gerald
Returning UniquePtr is nicer than returning raw pointers, and has the
nice side effect of forcing us to clean up the uses of nsAutoPtr that
were hanging about.
2018-04-12 15:28:21 -04:00
Tristan Bourvon
a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Jean-Yves Avenard
f5cce074ab Bug 1451681 - Handle case where crypto plain size definition didn't exist. r=cpearce
Also ensure that the MP4 demuxer can't create such sample.

MozReview-Commit-ID: JANgHNiiz2H

--HG--
extra : rebase_source : d6a68579e76f1eda651e38bec5a9ed17c9de3fa4
2018-04-09 11:39:13 +02:00
Coroiu Cristina
fa24350f83 Backed out 2 changesets (bug 1306529) for build bustage on a CLOSED TREE
Backed out changeset 87206102c699 (bug 1306529)
Backed out changeset 7e70a7f597c4 (bug 1306529)
2018-04-09 15:59:58 +03:00
Takuro Ashie
297ca3383c Bug 1306529 - OmxDataDecoder: Fix a stall issue on shutting down r=jya
Because the shutdown closure awaits finishing itself by
TaskQueue::AwaitShutdownAndIdle(), the function blocks infinitely.

The code is wrongly introduced at the following commit:

  * https://bugzilla.mozilla.org/show_bug.cgi?id=1319987
    * https://hg.mozilla.org/mozilla-central/rev/b2171e3e8b69

This patch calls it on mTaskQueue intead of mOmxTaskQueue to
avoid the issue.

MozReview-Commit-ID: 4qmX2QlniEG

--HG--
extra : rebase_source : f0784c0c5b2e39d2078a5aff72be03b52e413139
extra : intermediate-source : 635153e1dcdc442f8d72727b6fe504842b4ffa31
extra : source : bf011140459cc227c9435e3960770bafb3cecb8e
2018-03-27 16:37:21 +09:00
Takuro Ashie
6e0c9d24c2 Bug 1306529 - Add initial implementation of PureOmxPlatformLayer r=jya
It's a concrete class of OmxPlatformLayer for accessing OpenMAX IL
libraries directly. It will be usable on various embedded linux systems.
Note that it's not enabled by default yet. Add the following config to
your mozconfig.

  ac_add_options --enable-openmax

TODO: Implement zero-copy mode

MozReview-Commit-ID: EMEXAKzzR64

--HG--
extra : rebase_source : d7c5b9baf66d87db38723b278c57fd581a3cbf98
extra : intermediate-source : b8c671a02a4fce085433b16db998c9b04ace87db
extra : source : 131b65580e3dd5c9dcb0ba6a05c16ab90c2dcc68
2018-03-28 18:21:04 +09:00
Alex Chronopoulos
16d2b965f6 Bug 1451781 - Check if output device is mono and remove stereo check in order to disable opus channel inversion. r=jya
MozReview-Commit-ID: 3x27rBs5Ika

--HG--
extra : rebase_source : 0b7232a0705edceda8793444c140aa947cc99d51
2018-04-09 13:07:58 +03:00
Nils Ohlmeier [:drno]
c9b218795e Bug 1451926: add a user pref for AV1 codec. r=cpearce
MozReview-Commit-ID: 9R6Ac4O81Ji

--HG--
extra : rebase_source : bd2f46b5596c0ebafc4f60bb8bf1812a8bf776f5
2018-04-05 20:35:57 -07:00