Commit Graph

98 Commits

Author SHA1 Message Date
Sylvestre Ledru
804b8b8883 Bug 1204606 - Reformat of dom/media r=jya
# skip-blame

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

--HG--
extra : moz-landing-system : lando
2018-11-19 13:25:37 +00:00
Thomas Daede
2868cd8be4 Bug 1417050: Add support for AV1 in MP4. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D3365

--HG--
extra : moz-landing-system : lando
2018-08-20 23:56:39 +00: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
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
Dan Minor
51cc8fdbb8 Bug 1474684 - Remove unnecessary already_addRefed from return; r=jya
Reviewers: jya

Tags: #secure-revision

Bug #: 1474684

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

--HG--
extra : rebase_source : bfa84755521a4a560a1487971d88cb2e493282d5
2018-07-20 08:39:50 -04: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
d55ae44eff Bug 1474684 - Use larger stack for media decoder threads; r=jya,froydnj
Summary:
We've hit stack overflows while decoding, in particular for av1. This increases
the thread size for the platform decoder threads, while leaving the others at
their default values.

Reviewers: jya

Tags: #secure-revision

Bug #: 1474684

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

--HG--
extra : rebase_source : d03a91e93910fac5458f18f43398d76b736bbee6
2018-07-18 12:47:45 -04:00
Jean-Yves Avenard
c5bbea93f3 Bug 1409664 - P21. Retrieve H264 constraint flags with ExtractH264CodecDetails. r=bryce
Summary:
We'll need it to properly build a SPS/PPS extradata later. Also, change the types used. The original data is stored on two bytes ASCII, it will always fit in a uint8_t. Additionally, this is how those values are stored in a SPS.

Depends on D1678

Reviewers: bryce

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1718
2018-07-03 11:45:24 -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
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
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
Alex Chronopoulos
851a3ee589 Bug 1431810 - Disable Opus phase inversion on stereo to mono downmix. r=rillian
MozReview-Commit-ID: 5eaSPQzUu9o

--HG--
extra : rebase_source : 126d9faa2824d29fc73cf040b033ca585dfdbcee
2018-03-15 18:28:14 +02:00
Jean-Yves Avenard
130acc845f Bug 1447124 - Use int64_t for SaferMultDiv. r=gerald
This prevent potential division by zero should the cast on the argument cause an overflow.
We still limit the mul and div arguments to INT64_MAX.

MozReview-Commit-ID: gHkv6m4zq0

--HG--
extra : rebase_source : 1c27f9a2ecc4c8bf6a763dedf2859e64bf79ea85
2018-03-27 11:27:08 +02:00
Gurzau Raul
1368521911 Backed out 3 changesets (bug 1431810) for failing test_bug1431810_opus_downmix_to_mono.html on Windows
Backed out changeset a01c1941a829 (bug 1431810)
Backed out changeset 43eb1c01c67f (bug 1431810)
Backed out changeset 3fe9d85d684a (bug 1431810)
2018-03-26 12:09:42 +03:00
Alex Chronopoulos
85119eac26 Bug 1431810 - Disable Opus phase inversion on stereo to mono downmix. r=rillian
MozReview-Commit-ID: 5eaSPQzUu9o

--HG--
extra : rebase_source : 126d9faa2824d29fc73cf040b033ca585dfdbcee
2018-03-15 18:28:14 +02:00
Dorel Luca
f41b03eca9 Backed out changeset 38577c007450 (bug 1424371) for Marionett test failure on testing/marionette/harness/marionette_harness/tests/unit/test_window_maximize.py. CLOSED TREE 2018-02-19 22:15:23 +02:00
Milan Sreckovic
7571df7e7c Bug 1424371: Use BaseRect access methods instead of member variables in dom/ r=qdot
MozReview-Commit-ID: HXWhggOMIEK

--HG--
extra : rebase_source : 9c9eacf80d2b7f78faa82a1549170b98d12cdaa8
2018-02-19 12:56:10 -05:00
Jean-Yves Avenard
19542f34d4 Bug 1404997 - P25. Add MSG and WebRTC MediaThreadType. r=gerald
Additionally, remove no longer relevant MediaThreadType documentation as all MediaDataDecoder API are now asynchronous and we no longer have cancellable taskqueues.

MozReview-Commit-ID: 1F0YUhNniAn

--HG--
extra : rebase_source : 7b93ef24f91ccc21537e78bbb8a2d82bafacd29e
2017-12-15 18:39:33 +01:00
Nicholas Nethercote
b15805ab71 Bug 1414759 - Replace some unnecessary media prefs with code constants. r=cpearce
Specifically:
- media.decoder.limit
- media.num-decode-threads
- media.resampling.rate
- media.wmf.decoder.thread-count
- media.cache.resource-index

--HG--
extra : rebase_source : a46aa7078b98b4731ec96b66398c51aa6cb42d27
2017-11-13 17:16:06 +11:00
James Cheng
b40f82f1ce Bug 1407919 - Part2 - Use the helper function to tell if it is a vp8/9 codec string. r=gerald
MozReview-Commit-ID: G0AKSExgm3R

--HG--
extra : rebase_source : 252395963f0f0f9d8d853e83e5cfa4b1f7fc3948
2017-10-13 14:18:29 +08:00
James Cheng
86e88e8319 Bug 1407919 - Part1 - Add an extraction function to parse the RFC-6381 VP9 codec string. r=gerald,jya
MozReview-Commit-ID: Ii0L4IPtzJJ

--HG--
extra : rebase_source : 9d1780e76908095a234a4eed13e792d75a714596
2017-10-13 13:55:05 +08:00
Kris Maglione
60d080b412 Bug 1404198: Part 2i - Switch to NS_NewTimer* in dom. r=njn
MozReview-Commit-ID: 8Oei6TuXNbu

--HG--
extra : rebase_source : 31c583c699790cbcf302064146d313ee8126ef0c
2017-10-15 23:15:40 -07:00
Andrea Marchesini
b0b73ddd29 Bug 1388125 - CloneableWithRangeMediaResource for streams implementing nsICloneableInputStreamWithRange, r=jya 2017-09-18 13:34:43 +02:00
Chris Pearce
ec0ac75c45 Bug 1394648 - Switch from nsInt{Point,Rect,Size} to gfx::Int{Point,Rect,Size} in dom/media. r=jwwang
The nsRect.h and nsSize.h headers typedef nsIntRect to gfx::IntRect etc, so the
rect/size objects we use will be the same, just under a different name.
However the old headers #include a bunch of things we don't use, so we if we
use the gfx objects directly we end up with a smaller include graph.

MozReview-Commit-ID: 7S4OSqBJK9m

--HG--
extra : rebase_source : 7cc48507356ce754e8395af957fa68a28711e00a
2017-08-29 14:00:33 +12:00
Bevis Tseng
95b18d794e Bug 1382172 - Name nsITimerCallback instances in native implementation. r=billm
--HG--
extra : rebase_source : 84de1abfcc30a6964144c2e6718a508c71027b65
2017-07-27 02:18:20 +08:00
Bevis Tseng
a7505864a8 Bug 1378930 - Part 2: Remove the aName parameter from SchedulerGroup/DocGroup/DispatcherTrait. r=billm
--HG--
extra : rebase_source : 11319e568a51d16754a6a9990f76c35c86c2bda7
2017-07-26 16:13:35 +08:00
James Cheng
dce1114dea Bug 1373314 - Allow mp4a mimetype with leading 0 in aud-oti for compatibility. r=cpearce
MozReview-Commit-ID: 6SwbWuxzpEJ

--HG--
extra : rebase_source : 2e6ed6ffef3ce9da16a691e40f78fe42ef8c8800
2017-07-20 15:35:41 +08:00
Bill McCloskey
f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Nicholas Nethercote
f1364a75ea Bug 1374580 (part 3) - Remove ns{,C}Substring typedefs. r=froydnj.
All the instances are converted as follows.

- nsSubstring  --> nsAString
- nsCSubstring --> nsACString

--HG--
extra : rebase_source : cfd2238c52e3cb4d13e3bd5ddb80ba6584ab6d91
2017-06-20 19:19:52 +10:00
Jean-Yves Avenard
10d2da1b08 Bug 1374596: P7. Fix includes as per coding style. r=padenot
MozReview-Commit-ID: 5WfOWcOoxg0

--HG--
extra : rebase_source : 988c09623e83a0d9188d9ff5d705314e2c43e756
2017-06-20 17:56:55 +02:00
Bill McCloskey
d6affd5261 Bug 1365098 - Convert NS_GetCurrentThread uses in dom/media (r=cpearce)
MozReview-Commit-ID: DUPt6xj49zz
2017-06-12 20:20:08 -07:00
JW Wang
aab9f27e0f Bug 1359309. P1 - give mozilla::TaskQueue a name which will be useful in debugging Dispatch() failures. r=jya
MozReview-Commit-ID: 5FAVNo32fl7

--HG--
extra : rebase_source : 761fca752429d95e97be699976283baa35c64abb
extra : intermediate-source : 83282a7a5adbe7046212da85f9d16e39faa4bd5c
extra : source : 924af3ea0aa86888fd2745020be7900e6eb614f0
2017-04-25 14:57:55 +08:00
JW Wang
f2ea37e57b Bug 1357986 - Use helper functions of TimeUnit to make code more readable. r=kaku
1. using media::TimeUnit to save some typing.
2. replace TimeUnit() with TimeUnit::Zero().
3. replace TimeUnit::FromXXX(0) with TimeUnit::Zero().
4. replace TimeUnit::FromMicroseconds(std::numeric_limits<int64_t>::max()) with TimeUnit::FromInfinity().
5. replace some uses of int64_t with TimeUnit.
6. replace t > TimeUnit() with t.IsPositive().

MozReview-Commit-ID: 6hC94PXx86i

--HG--
extra : rebase_source : 1ea3b409e6ec12915f3e1a00359d6ff4152c8917
extra : intermediate-source : e31a12ad0e7a4840119036f261ed17eaaff85734
extra : source : ae07ee48000c4a52da0e4fd502b4d690ec51ce1f
2017-04-17 16:35:04 +08:00
JW Wang
cfa1d7f8bc Bug 1345027 - Label runnables in dom/media/VideoUtils.cpp. r=cpearce
MozReview-Commit-ID: LHC69iLqN3f

--HG--
extra : rebase_source : 79c2f04c00e50316b653cb94aebcf452b7428d86
extra : source : 294788e2c9000ae3a3e2c5c2d6363e8192959434
2017-03-07 14:53:52 +08:00
Gerald Squelart
5745998021 Bug 1331770 - Rename 'MediaContentType' to 'MediaContainerType' - r=jya
MozReview-Commit-ID: F0BWai8vPyo

--HG--
rename : dom/media/MediaContentType.cpp => dom/media/MediaContainerType.cpp
rename : dom/media/MediaContentType.h => dom/media/MediaContainerType.h
extra : rebase_source : 640ada96750b4496055087e80ae3f600c9df31c9
2017-01-18 11:59:03 +11:00
Chris Pearce
95c18b7326 Bug 1329543 - Remove kEMEKeySystemPrimetime. r=gerald
MozReview-Commit-ID: FNvnpZVPMMt

--HG--
extra : rebase_source : c65d007a9894830bd3b85638dcc8c37b5f36fed5
2017-01-14 11:26:37 +08:00
Gerald Squelart
5587e692df Bug 1329568 - Remove MediaContentType crutches - r=jya
Now that we have move all data-handling functions to MediaMIMEType and friends,
we can remove direct accesses to data from MediaContentType, to better separate
the context that MediaContentType represents, from the data it includes.

Dependent code needs to be mechanically updated to now use the proper APIs.

Note that in most places, we just extract MIME strings. Further work will take
place in later bugs, to completely replace these strings with MediaContentType
or more appropriate types...

MozReview-Commit-ID: LoX8dhX7OlB

--HG--
extra : rebase_source : cf221ac3c104f99b36cfa055afcf67d3bca26d0e
2017-01-01 09:24:24 +11:00
Wes Kocher
48f75e3c03 Backed out 13 changesets (bug 1329568) for wpt-11 failures in mediasource-addsourcebuffer.html a=backout CLOSED TREE
Backed out changeset 8f37ee96bd78 (bug 1329568)
Backed out changeset 706da9f85272 (bug 1329568)
Backed out changeset c316c8d24d32 (bug 1329568)
Backed out changeset 90a091e65db3 (bug 1329568)
Backed out changeset da855d6a78bb (bug 1329568)
Backed out changeset 3a49367220e3 (bug 1329568)
Backed out changeset 453851b40e3e (bug 1329568)
Backed out changeset 662529436cc4 (bug 1329568)
Backed out changeset 7c62078beb88 (bug 1329568)
Backed out changeset 99758b5f7918 (bug 1329568)
Backed out changeset 2ce9dcf0c274 (bug 1329568)
Backed out changeset 644f206d06d6 (bug 1329568)
Backed out changeset e1ed12f057c8 (bug 1329568)

MozReview-Commit-ID: FhJlySehxHi
2017-01-12 15:10:52 -08:00
Gerald Squelart
3a78522186 Bug 1329568 - Remove MediaContentType crutches - r=jya
Now that we have move all data-handling functions to MediaMIMEType and friends,
we can remove direct accesses to data from MediaContentType, to better separate
the context that MediaContentType represents, from the data it includes.

Dependent code needs to be mechanically updated to now use the proper APIs.

Note that in most places, we just extract MIME strings. Further work will take
place in later bugs, to completely replace these strings with MediaContentType
or more appropriate types...

MozReview-Commit-ID: LoX8dhX7OlB

--HG--
extra : rebase_source : 63eba419e5cb8a69500008145769c8e4ef99f33f
2017-01-01 09:24:24 +11:00
Nathan Froyd
2ebbd09068 Bug 1320752 - remove mozilla/Function.h; r=gerald
We have std::function available now, which is likely to be somewhat more
efficient.
2016-11-28 11:03:53 -05:00
Gerald Squelart
c1e9d969fe Bug 1176218 - p10. VideoUtils' CreateTrackInfo*() - r=jya
Create a TrackInfo (VideoInfo or AudioInfo) from a codec MIME type, and
optionally with extra parameters from a MediaContentType.

MozReview-Commit-ID: JfDMQjVgCNT

--HG--
extra : rebase_source : 10eb8f14ce28a74883752c536b2312658bc0cb4d
2016-10-07 17:39:32 +11:00
Nathan Froyd
0269018b2e Bug 1304722 - don't define nsCString constants in VideoUtils.h; r=mattwoodrow
Doing this causes a separate copy of each string to be included in each
compilation unit that includes VideoUtils.h, and since global
nsLiteralCString objects require a static constructor, injects static
constructors into all those compilation units as well.  Moving the
object definitions to a source file and leaving the declarations in the
header makes everything work as expected.
2016-10-04 16:38:52 -04:00
Chris Pearce
1ec646af14 Bug 1278198 - Implement "Get Supported Configuration" algorithm in MediaKeySystemAccess. r=gerald
MozReview-Commit-ID: KiJMOm5HgHe

--HG--
extra : rebase_source : 0c60b76ad38cb9c5513e6618c8d8f4bc6f43b168
2016-07-01 13:36:57 +12:00
Bryce Van Dyk
3e3f638e3e Bug 1257716 - Handle clearkey encrypted WebMs. r=cpearce
Handle encrypted WebM streams for the clearkey case. Add checking for the
widevine case, though these should currently fail, as not all of the plumping
is in place for widevine.

MozReview-Commit-ID: 5d9fvc5IkZF

--HG--
extra : rebase_source : 9baad2afd7778c350c404c72dcd81426092aa908
2016-06-08 14:07:09 +12:00
JW Wang
1f7b60118b Bug 1275807 - Remove remaining use of FlushableTaskQueue. r=cpearce.
MozReview-Commit-ID: L12wxh7GPIr

--HG--
extra : rebase_source : 745ae8240326246050513c96300eba1e32d84130
2016-05-24 16:48:26 +08:00
Jean-Yves Avenard
88d66c4a43 Bug 1271490: Use MediaPrefs to read preferences. r=cpearce
MozReview-Commit-ID: Ak5mUfGA4kc

--HG--
extra : rebase_source : 8ac6e232081bbf512354f006bd5ae78c09240924
2016-05-10 11:27:05 +10:00
Jean-Yves Avenard
dd289e3ee0 Bug 1271166: Reduce media thread pool size. r=cpearce
A thread pool of 8 threads is already more than enough; especially considering that the media decoder use their own threading model.

MozReview-Commit-ID: BOFjNnYTaRz

--HG--
extra : rebase_source : 905405fa7f1ea2dc98f45d7348bfba256a814408
2016-05-09 12:34:22 +10:00
Jean-Yves Avenard
a9c347c652 Bug 1264199: P0.1. Export SaferMultDiv method. r=gerald
MozReview-Commit-ID: CzewhPB1Nod

--HG--
extra : rebase_source : e6c18d94ab7bcf1106e7027378ca2d8a494b6058
2016-04-26 11:16:23 +10:00
Jean-Yves Avenard
266289f844 Bug 1262746: P3. Remove DownmixAudioToStereo method. r=rillian
Functionality is now provided through AudioConverter class.

MozReview-Commit-ID: 5MchZT1XRoO

--HG--
extra : rebase_source : 270581b49043f102a89e5eea97195379a937da22
2016-04-08 17:42:00 +10:00