Commit Graph

109 Commits

Author SHA1 Message Date
Bevis Tseng
f2bdbd8fd1 Bug 1314833 - Part 2.1: Factor out AbstractThread::MainThread() used in Media Playback. r=billm,jwwang
MozReview-Commit-ID: 9yJi3iDtVZG

--HG--
extra : rebase_source : 39c720ccc576ed9247b5e8abb70d99d7873b3ad6
2016-11-29 13:03:36 +08:00
JW Wang
992114f5fd Bug 1332160 - use nsCString internally whenever possible. r=gerald
MozReview-Commit-ID: 1DUaJWfbL88

--HG--
extra : rebase_source : f4a02736b0385e4be6258a185822f7855d0b0189
extra : intermediate-source : 1faaf4254a2e1ce2c096a8650b66d07c84c7fdbe
extra : source : c23fc2cea382627af8ff20ae3edea926eaa6d51a
2017-01-18 16:51:31 +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
Gerald Squelart
f3a92fa0a6 Bug 1330284 - Use MediaContentType in MP4Decoder - r=jya
MozReview-Commit-ID: 9Npl40Iicjc

--HG--
extra : rebase_source : 27df1df1cdf8eb8b608e155c0146c8b09d655de4
2017-01-01 12:27:45 +11: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
Chris Peterson
4b56a6fac1 Bug 1324183 - Part 1: Remove some Windows Vista and 7 version checks in dom/media/. r=gerald
--HG--
extra : amend_source : 64fbc1c09fd0b5d1b7c560716f8b23003662fe95
extra : histedit_source : b94fa9bb663c607affe43740e3a546861d6a74fb
2016-12-17 16:59:52 -08:00
Jean-Yves Avenard
3b3c30e066 Bug 1315567: P3. Expose flac codec as being available in mp4. r=gerald
MozReview-Commit-ID: 7C6W1KGQ1jE

--HG--
extra : rebase_source : 338dd05c33543f84740fb68da28845154dc27f74
2016-11-07 10:57:28 +11:00
Jean-Yves Avenard
5b64448a75 Bug 1315567: P2. Expose opus codec as being available in mp4. r=gerald
MozReview-Commit-ID: GU8me70Igsq

--HG--
extra : rebase_source : 30ca879dba9e1a9e68da1081f683247b1f09179a
2016-11-07 11:08:32 +11:00
Jean-Yves Avenard
cd31dea4bd Bug 1315567: P1. Remove invalid test. r=gerald
audio/opus is a codec type, not a MP4 container one. aType can never be audio/opus

MozReview-Commit-ID: E8tONlF4COA

--HG--
extra : rebase_source : d26a4dce2adcf1f82e56a2b5c2dd5ee1500fcd84
2016-11-07 12:56:55 +11:00
Chris Pearce
50e79d67a0 Bug 1314858 - Add MP4Decoder::IsAAC. r=gerald
We have this for H.264, so we may as well have it for AAC too.

MozReview-Commit-ID: 2k64ANJGUNN

--HG--
extra : rebase_source : 6fe2543788afd26682d31c0ec45b9ac80e501ab1
2016-11-02 09:43:45 +13:00
JW Wang
9fcd26988d Bug 1311872. Part 1 - remove dormant code from MediaDecoder and its friends. We will let MDSM solely decide when to enter/exit dormant. r=cpearce,jya
MozReview-Commit-ID: 4rRSGcruy7Z

--HG--
extra : rebase_source : 6bff3bde442dbc96ce23a4a1aabae9ec79f1b9f0
extra : intermediate-source : 456de41037090ff072925d937b001de31a479556
extra : source : 525be5a0f46950ced9efba9a7cfeda26ce73cfb8
2016-10-20 15:20:25 +08:00
Gerald Squelart
413e411d7c Bug 1176218 - p12. Use new PDM's Supports(Trackinfo) in MP4Decoder - r=jya
MP4Decoder can translate the new MediaContentType into the relevant TrackInfo
to interrogate PDMs about codec support, with extra information if present.

MozReview-Commit-ID: K0jcYm8pJrp

--HG--
extra : rebase_source : e809824285a85035b81ad7f91406bce6393384f6
2016-10-07 15:51:22 +11:00
Gerald Squelart
700d804c16 Bug 1176218 - p9. Pass MediaContentType to MP4Decoder::CanHandleMediaType - r=jya
Just passing the new MediaContentType struct, with no processing changes (yet).

MozReview-Commit-ID: KZ4xkCihPb1

--HG--
extra : rebase_source : e40eb72cc63e0a814306c25ea9b609178517729e
2016-10-01 18:10:18 +10:00
Matt Woodrow
a36eef926a Bug 1300682 - Part 5: Use KnowsCompositor to initialize decoders and create one for VideoDecoderParent to use. r=nical,jya 2016-10-07 21:13:33 +13:00
James Cheng
48efb9caad Bug 1300654 Part1-Remove MOZ_EME from code base. r=cpearce,smaug
MozReview-Commit-ID: JboGO0w4tcE

--HG--
extra : rebase_source : abfe53f30081f74fc39c900cab48d08c7574bfec
2016-09-08 18:06:20 +08:00
Carsten "Tomcat" Book
d2c3fe7fd3 merge autoland to mozilla-central a=merge 2016-09-14 12:07:02 +02:00
Ben Kelly
f0d440f9d1 Bug 1300118 P1 Make TaskQueue deliver runnables to nsIEventTarget. r=bholley 2016-09-13 20:12:15 -07:00
Jean-Yves Avenard
70ed5282de Bug 1299072: P18. Use MediaResult with InitPromise. r=gerald
MozReview-Commit-ID: JiLgiyxvfNC

--HG--
extra : rebase_source : 4cc453a5fe7b1e4f4b865c31a24a5feed64df7e4
2016-09-13 13:06:18 +10:00
Wes Kocher
42f4e48aee Backed out 6 changesets (bug 1300118) for frequent Windows VM Xpcshell failures a=backout CLOSED TREE
Backed out changeset 24f714ad248c (bug 1300118)
Backed out changeset 6fe61ed092e8 (bug 1300118)
Backed out changeset dd18e29b64bf (bug 1300118)
Backed out changeset 50882fb40551 (bug 1300118)
Backed out changeset 60e82c1780e5 (bug 1300118)
Backed out changeset e40df52925d5 (bug 1300118)

--HG--
extra : amend_source : 7475f45d827654abe309696d73fd86e75a497c32
2016-09-12 16:34:41 -07:00
Ben Kelly
621f6bacd6 Bug 1300118 P1 Make TaskQueue deliver runnables to nsIEventTarget. r=bholley 2016-09-12 12:32:20 -07:00
Ben Kelly
a8a4ae3c4f Backout rev 5c7368370ff9 to 980659720b86 (bug 1300118 and bug 1300658) for incorrect bug number in commit message. r=me 2016-09-12 12:29:17 -07:00
Ben Kelly
157b0fe1ed Bug 1300118 P1 Make TaskQueue deliver runnables to nsIEventTarget. r=bholley 2016-09-12 11:21:01 -07:00
Bryce Van Dyk
dc49694098 Bug 1290284 - Centralise string comparisons for H264 and VPX detection. r=cpearce
Remove string comparisons to determine from mime types if content is VPX or
H264. Replace with calls to VPXDecoder::IsVPX or MP4Decoder::IsH264 to
centralise such logic.

This patch introduces MP4Decoder:IsH264, and moves the similar functionality out
of H264Convertor for the sake of consistently having these functions in
decoders.

MozReview-Commit-ID: 5nfYusYHrUR

--HG--
extra : rebase_source : c013c4ebe28d5afedbb91ddfffadb40d23fd0ee3
2016-07-29 14:12:54 +12:00
Jim Chen
ce45a595ab Bug 1287946 - Update existing code to use mozilla::java; r=me 2016-07-21 13:49:04 -04:00
Carsten "Tomcat" Book
e8bc59a87a Backed out changeset 684888aeee81 (bug 1287946) 2016-07-21 08:07:12 +02:00
Jim Chen
78f67d1f6f Bug 1287946 - Update existing code to use mozilla::java; r=me 2016-07-21 00:42:26 -04:00
Ralph Giles
72ecfe6999 Bug 1267887 - Support Opus in mp4 with the rust demuxer. r=kinetik
Update C++ caller code for for mp4parse 0.4.0. Now feeds data through
a read callback in mp4parse_io.

Hook up the GetTrackInfo method to the rust demuxer results.

Prefer rust demuxer only if there's an Opus track.

Fill in audio and video track metadata. Pass audio codec_specific_config
to the decoder.

With this change sample.mp4 plays.

MozReview-Commit-ID: F8xwWPZZBfZ
2016-06-29 09:12:45 -07:00
Phil Ringnalda
3f1ee7a2b6 Backed out 7 changesets (bug 1267887) for gtest failures and crashes and Marionette crashes on Windows 8
CLOSED TREE

Backed out changeset e7e34b315a0a (bug 1267887)
Backed out changeset 9128f4f94032 (bug 1267887)
Backed out changeset c697af8c555a (bug 1267887)
Backed out changeset 8f1c1957ce80 (bug 1267997)
Backed out changeset 3b1177fd30cb (bug 1267887)
Backed out changeset 72ea61f4f820 (bug 1267887)
Backed out changeset e19c4c4eac51 (bug 1267887)
2016-06-28 21:40:09 -07:00
Ralph Giles
711f285ffd Bug 1267887 - Support Opus in mp4 with the rust demuxer. r=kinetik
Update C++ caller code for for mp4parse 0.4.0. Now feeds data through
a read callback in mp4parse_io.

Hook up the GetTrackInfo method to the rust demuxer results.

Prefer rust demuxer only if there's an Opus track.

Fill in audio and video track metadata. Pass audio codec_specific_config
to the decoder.

With this change sample.mp4 plays.

MozReview-Commit-ID: F8xwWPZZBfZ
2016-06-28 20:33:32 -07:00
Dan Glastonbury
1b2a65cfc3 Bug 1281632 - P1: Extract creation parameters and pass via struct. r=gerald
Extract all the parameters passed to CreateAudioDecoder/CreateVideoDecoder and
place them into a structure that is passed down to the creation of the actual
decoder, where the relevant parameters can be extracted.

This makes it easier to add more arguments to the Create*Decoder calls in future.

MozReview-Commit-ID: 9LZlcfRVz6A

--HG--
extra : rebase_source : ce3f0c7d0784b96267728697ff5d535ccb8ee7a6
2016-06-28 17:56:55 +12:00
Edwin Flores
bd172274b3 Bug 845095 - Enable media dormancy everywhere for MP4 and Media Source playback - r=jya
--HG--
extra : rebase_source : 40a9429fb4e1490d6afaf25fbb7466fc4beaaaf2
2016-05-31 21:08:00 +02: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
cc8c8725df Bug 1271491: P6. Remove the need to call PDMFactory::Init(). r=cpearce
PDMFactory will automatically load and initialize the required frameworks upon first use.
Also fix constness of some methods.

MozReview-Commit-ID: HFbvTMRFAey

--HG--
extra : rebase_source : ce3e7ff6cefc35b32674c9a81c3488fe21b48626
2016-05-12 18:54:35 +10:00
Jean-Yves Avenard
4dcc0f9b5b Bug 1243538: P1. Make MediaInfo::mImage an nsIntSize again and introduce a mImageRect member. r=mattwoodrow
MozReview-Commit-ID: 3iVCA1b7bHc
2016-04-20 17:43:35 +10:00
Gerald Squelart
ecfb205472 Bug 1248507 - p1. Pass DecoderDoctorDiagnostics to PDMs&more - r=jya
Pass declared-but-yet-undefined DecoderDoctorDiagnostics pointer to various
routines that contribute to deciding if a media format can be played, and
those that create decoders.

Points where a DecoderDoctorDiagnostics can be injected are currently marked
with "/* DecoderDoctorDiagnostics* */ nullptr", and some will be used in
following patches.

MozReview-Commit-ID: 7u37bvY4CpW
2016-04-19 17:36:19 +10:00
Matt Woodrow
231647cca3 Bug 1248496 - Show which DXVA API is being used in about:support. r=jya 2016-02-18 15:41:11 +13:00
Jean-Yves Avenard
edda0a3356 Bug 1254858: P8. Change default preferences value if prefs don't exist. r=kentuckyfriedtakahe
When running gtest, none of the prefs actually exist, so we end up having most PDMs disabled.

MozReview-Commit-ID: GNjhXtjKpGC

--HG--
extra : rebase_source : 3e5a931dd49c798cff9792e3a1c4ff2e5afc4a83
2016-03-10 15:04:23 +11:00
Jean-Yves Avenard
52d9bcf3d6 Bug 1244523: P1. Allow video/quicktime mimetype. r=cpearce
It's just like video/mp4
2016-02-02 16:27:46 +11:00
Jean-Yves Avenard
81ef536abd Bug 1212323: P2. Have IsVideoAccelerated return a Promise. r=cpearce 2016-01-30 12:52:35 +11:00
Jean-Yves Avenard
ba68bee3c5 Bug 1212323: P1. Use a 640x360 SPS to test for HW decoding support. r=cpearce
Some machines will always use software decoding for a 64x64 videos.
2016-01-30 12:52:35 +11:00
Wes Kocher
4c1c8ea235 Backed out 3 changesets (bug 1212323) for WinXP debug crashes CLOSED TREE
Backed out changeset 7215ed1cfcef (bug 1212323)
Backed out changeset bd7599dcee0d (bug 1212323)
Backed out changeset 228267494daa (bug 1212323)

--HG--
extra : commitid : C8ZtL47yMj1
2016-01-29 10:30:16 -08:00
Jean-Yves Avenard
25609311a1 Bug 1212323: P2. Have IsVideoAccelerated return a Promise. r=cpearce 2016-01-29 15:45:42 +11:00
Jean-Yves Avenard
ce37c50788 Bug 1212323: P1. Use a 640x360 SPS to test for HW decoding support. r=cpearce
Some machines will always use software decoding for a 64x64 videos.
2016-01-29 15:45:41 +11:00
Jean-Yves Avenard
58d924fab9 Bug 1236703: P2. Add methods to retrieve debugging data on plain readers. r=jwwang 2016-01-20 09:50:26 +11:00
Nathan Froyd
01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Jean-Yves Avenard
6db8b43cba Bug 1213176: P1. Remove most MediaFormatReader dependencies on its MediaDecoder parent. r=jwwang
The LayersBackend can be defined at construction time, however if a parent MediaDecoder exists, the value will be overwritten by the MediaDecoderOwner value.

--HG--
extra : rebase_source : fefad83560d5bfa2aee9f665fe138397eb390019
2015-10-15 02:04:00 +02:00
JW Wang
e470e1616d Bug 1214989. Part 1 - add MediaDecoderOwner to the constructors of MediaDecoder and sub-classes. r=gerald. 2015-10-15 11:36:21 +08:00
Chris Pearce
83fed249a0 Bug 1214932 - Remove fragmented-mp4 from media prefs. r=jya 2015-10-15 14:51:28 +13:00