Commit Graph

61 Commits

Author SHA1 Message Date
Gerald Squelart
a583c59045 Bug 1176218 - p11. PDM's Supports(TrackInfo) - r=jya
Add a new method alongside SupportsMimeType, which takes a TrackInfo that may
contain more information that just the MIME type.

Eventually the old SupportsMimeType should be removed, but we keep it for now,
as it is used quite extensively and it would be out of scope of this bug to
totally replace it now.

MozReview-Commit-ID: LJQBvSUB6J2

--HG--
extra : rebase_source : 6f43bf61dc6e51de3714c9a556428c7ba4fd484d
2016-10-07 15:30:30 +11:00
James Cheng
0fe5b0b71b Bug 1297003 - Part1-Store the error information in MediaResult while creating a/v decoders r=gerald
MozReview-Commit-ID: I6R4bX778n7

--HG--
extra : rebase_source : 66f0dc1dd4cfc91daec9790b51ce413ac669b931
2016-10-06 11:19:56 +08:00
Chris Pearce
1c82c47cb2 Bug 1279171 - Add Windows Version checks in wmf::MFStartup() and PDMFactory::CreatePDMs(). r=mattwoodrow
I was able to reproduce the crash in CMFPropertyStore::CreatePropertyStore
once when running under Win95 Compatibility mode. Normally Firefox crashes
trying to start up under Compatibility mode, so it's hard for me to verify
that this patch fixes the crash. We'll just have to push it and see.

In compatibility mode, GetVersionEx() returns the Windows version being
emulated, so if we add version checks around where we start up WMF, we
should catch the users running in compatibility mode.

We can also refrain from starting the RemoteDecoderModule if we're not
going to be able to use WMF in the GPU process; if we're on Windows less
than Vista, or if we're emulating Windows less then Vista.

MozReview-Commit-ID: Iu4B1NcgHio

--HG--
extra : rebase_source : 80e9f446a60c7f4edcb1219ec2702e68376e3aa0
2016-10-04 16:05:53 +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
James Cheng
3ab124eaba Bug 1305670 - Fix typo from SetA/VFormatNotSupport to SetA/V NotSupported r=gerald
MozReview-Commit-ID: 7kw8JPPlGcT

--HG--
extra : rebase_source : 26bb49d85e8b17d190cefcb6620e678be334f6ca
2016-09-27 17:37:13 +08:00
Matt Woodrow
d57dae2c04 Bug 1288618 - Part 15: Add media code interface RemoteVideoDecoder. r=cpearce,dvander 2016-09-21 21:25:41 +12:00
Carsten "Tomcat" Book
f918af64da Backed out 16 changesets (bug 1288618) for bustage on a CLOSED TREE
Backed out changeset 06187d250f7a (bug 1288618)
Backed out changeset 2a47f8ea1d89 (bug 1288618)
Backed out changeset e179c8e8265d (bug 1288618)
Backed out changeset 25396a1af922 (bug 1288618)
Backed out changeset e98f835c6ee5 (bug 1288618)
Backed out changeset 24df0e89b273 (bug 1288618)
Backed out changeset f8bbdabdb6da (bug 1288618)
Backed out changeset 8b0adeab93df (bug 1288618)
Backed out changeset 95f23366de82 (bug 1288618)
Backed out changeset 63a9c689e1d5 (bug 1288618)
Backed out changeset 8f67443dccb8 (bug 1288618)
Backed out changeset 4e7fe69d5f45 (bug 1288618)
Backed out changeset 53b113acee42 (bug 1288618)
Backed out changeset 2583ae4e2e3b (bug 1288618)
Backed out changeset 75a61d0e71b7 (bug 1288618)
Backed out changeset da740b4fd484 (bug 1288618)
2016-09-21 08:44:11 +02:00
Matt Woodrow
3fda415233 Bug 1288618 - Part 15: Add media code interface RemoteVideoDecoder. r=cpearce,dvander
--HG--
extra : rebase_source : 54a983d25885722ec24a8c68fda54b08b2820a7c
2016-09-21 15:36:41 +12:00
Carsten "Tomcat" Book
c351fce53d Backed out changeset 00cc54c30222 (bug 1288618) 2016-09-15 16:33:57 +02:00
Matt Woodrow
8d050a3f83 Bug 1288618 - Part 15: Add media code interface RemoteVideoDecoder. r=cpearce,dvander 2016-09-15 23:18:00 +12:00
Jean-Yves Avenard
ed9868472d Bug 1301059: Do not use H264Converter when video decode is suspended. r=jya
MozReview-Commit-ID: FWvn3Xkalsl

--HG--
extra : rebase_source : 065979264f1dbf99659757e7edec5aaaf5d98e24
2016-09-07 23:59:59 +10:00
James Cheng
2f0406881b Bug 1300693 - adjust the indent. r=jya
MozReview-Commit-ID: 1CMzYy3jQPC

--HG--
extra : rebase_source : 53da0e6ca26eea3d05fae8029402f91711e3fe48
2016-09-07 15:31:22 +08:00
James Cheng
50efc725a2 Bug 1300693 - BBCiPlayer (TV) HTML5 broken in Nightly 51.0a1. r=jya
MozReview-Commit-ID: KY0EpZGZ85A

--HG--
extra : rebase_source : 511b76f9130522dee82154a24a8842061726c0e5
2016-09-06 14:16:07 +08:00
James Cheng
0c1650fb5a Bug 1291742 - Report MP4 videos with YUV444 format as unsupported. r=gerald
MozReview-Commit-ID: DxFfSIeYANR

--HG--
extra : rebase_source : b7a6097e7085bac23e02e7065165a024561a0316
2016-08-19 18:14:28 +08:00
Kaku Kuo
849fdb252e Bug 1274626 part 4 - provide APIs to create blank decoders; r=jya
MozReview-Commit-ID: LiXOAzvVb1K

--HG--
extra : transplant_source : %E5%2B%85%B0%D4%92%5C%3A%28%D2%12%7Dm%E1K%A7%7F%5B%C8%8A
2016-07-28 23:11:57 +08:00
Carsten "Tomcat" Book
c5f40500b4 Backed out changeset 222b4883bf79 (bug 1274626) 2016-08-02 17:47:27 +02:00
Carsten "Tomcat" Book
bd81ddd0b0 merge mozilla-inbound to mozilla-central a=merge 2016-08-02 17:09:31 +02: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
Gerald Squelart
371109fa03 Bug 1289378 - Fix inter-locking in PDMFactory+GMPDecoderModule - r=jya
Say PDMFactory::EnsureInit() runs on the main thread (effectively locking it)
and then tries to lock sMonitor; if another thread was also running
EnsureInit() and locked sMonitor, it will dead-lock when trying to sync-
dispatch the GMPDecoderModule creation to the main thread.

This can be fixed by ensuring that the actual PDMFactory instance creation is
always done on the main thread (and that we don't hold sMonitor before
dispatching to the main thread.)

Note that we can now simplify GMPDecoderModule::Init and assert we are already
on the main thread.

MozReview-Commit-ID: 8xHpoymw6po

--HG--
extra : rebase_source : aabc1f4768aebdd16873bbc1afdd1679d90aed6f
2016-07-27 12:43:33 +10:00
Kaku Kuo
59a499df96 Bug 1274626 - Part 4 - provide APIs to create blank decoders; r=jya
MozReview-Commit-ID: LiXOAzvVb1K

--HG--
extra : transplant_source : %F8%29%C0%9C/%A7%17-%E1%04r%A2%FD%00%93e%21Z%29%A4
2016-07-28 23:11:57 +08: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
Gerald Squelart
2c4f274202 Bug 1271483 - p1. Optionally treat media.wmf.disabled as WMF failure for Decoder Doctor - r=cpearce
This can be used to test Decoder Doctor on Windows, but disabling WMF through
prefs, to trigger an Decoder Doctor infobar.

MozReview-Commit-ID: 1aRk111VFO7
2016-05-24 01:33:37 +10:00
JW Wang
8b980a3cbc Bug 1274216 - remove use of FlushableTaskQueue from PlatformDecoderModule. r=jya.
MozReview-Commit-ID: E3DG84yKRmw

--HG--
extra : rebase_source : 2636b7d1ef5cc544f70b3912d4d6bd30f25424df
2016-05-19 17:50:31 +08:00
Ralph Giles
86ac5f9689 Bug 1273310 - Simplify DecoderDoctor failure flags. r=gerald
This is a bit easier to read. Currently there's no difference
since Startup is only called once, but it's probably better
future-proofing too, since the diagnostics should care more
about the current state than whether there's every been a
failure. Likewise reset the flags if the decoder is turned
off by a preference change.

MozReview-Commit-ID: 4zD7rkD6A3J

--HG--
extra : rebase_source : 800112ddf5d7548274e8d9f0e50a88b28ae10637
2016-05-16 15:53:17 -07: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
d31cb0499b Bug 1206637: P2. Replace all cached preferences with MediaPrefs ones. r=cpearce
Additionally, clean up stray and unused Preferences.h header.

MozReview-Commit-ID: IcPrD2inkDE

--HG--
extra : rebase_source : c3c6e37767627db3601090c2855a3dfa98cb4368
2016-05-10 11:02:28 +10:00
Chris Pearce
46a1552995 Bug 1271242 - Remove GMPDecryptorCallback::SetCapabilities(). r=jwwang
Now that GMPParent detects whether gmp-clearkey can decode using AAC/H.264
using WMF before reporting gmp-clearkey's GMPParent can decode AAC/H.264, we
don't need the GMPDecryptorCallback::SetCapabilities() callback from the GMP to
signal to the PDMFactory that the GMP can decode. We can now trust what the
GMPService tells us.

So we can remove the "waiting for CDM caps" step in the state machine's startup
sequence. And all the plumbing. :)

If we need more caps, like for an decode-and-render path, we can declare those
as API strings in the info file.


MozReview-Commit-ID: E0QhU4cYhjo

--HG--
extra : rebase_source : 7d15ab6a45bac88c15c053f416d941b5fe0807b0
2016-05-10 10:28:38 +12:00
Gerald Squelart
b1be604d62 Bug 848994 - p4. Record GMP diagnostics - r=cpearce
Record diagnostics information about whether the GMP CDM failed to load
(though currently impossible!), and which GMP is used in the current media
format check.

MozReview-Commit-ID: 4B8kDTAiV6b
2016-04-22 13:42:11 +10:00
Gerald Squelart
6494d247f8 Bug 848994 - p2. Detect when WMF is not found - r=cpearce
MozReview-Commit-ID: IHvgJNjuyQA
2016-04-22 13:42:11 +10:00
Gerald Squelart
5d11be9eef Bug 1248507 - p10. Detect and report when FFMpeg/Linux fails to load - r=jya
If the FFmpeg decoder module cannot be started, the failure is recorded in the
DecoderDoctorDiagnostics structure.
In this case, on Linux if there are no suitable decoders for any requested
format, a "platform decoder not found" notification is sent to Chrome (a
separate bug will implement the actual front-end notification), and logged to
the web console.

Note: All front-end notifications (that could display a notification bar) are
currently disabled by default. Set the following pref to true to enable them:
"media.decoderdoctor.enable-notification-bar".

MozReview-Commit-ID: CdaX7QUdWtd
2016-04-19 17:36:20 +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
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
6cc095b16d Bug 1240995: [ffmpeg] P1. Refactor FFmpeg PDM. r=kentuckyfriedtakahe
This greatly simplify how the external libavcodec and libavutil are linked.
2016-01-23 01:35:52 +11:00
Jean-Yves Avenard
98b3022d0a Bug 1240630: [ffvpx] P2. Hook up FFVPX PDM to PDMFactory. r=kentuckyfriedtakahe
Add new preference media.ffvpx.enabled to control FFVPX PDM being enabled.
2016-01-19 17:31:25 +11:00
Wes Kocher
398d96e8e5 Backed out 4 changesets (bug 1240630) for asan failures in mochitest(2) and mochitest(oth) CLOSED TREE
Backed out changeset dc949ca1e1ec (bug 1240630)
Backed out changeset 06abea99a292 (bug 1240630)
Backed out changeset 9d90d4b0b928 (bug 1240630)
Backed out changeset 6162c46b32ff (bug 1240630)

--HG--
rename : dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp => dom/media/platforms/ffmpeg/FFmpegH264Decoder.cpp
rename : dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h => dom/media/platforms/ffmpeg/FFmpegH264Decoder.h
extra : commitid : 2Uwik7JWDjE
2016-01-20 13:47:41 -08:00
Wes Kocher
de8ca7dcd1 Backed out changeset 8b78eccf2c29 (bug 1240995) for asan failures in mochitest(2) and mochitest(oth) CLOSED TREE
--HG--
extra : commitid : CUijS7r7W2B
2016-01-20 13:47:13 -08:00
Jean-Yves Avenard
afe8bac715 Bug 1240995: [ffmpeg] Refactor FFmpeg PDM. r=kentuckyfriedtakahe
This greatly simplify how the external libavcodec and libavutil are linked.
2016-01-20 20:22:43 +11:00
Jean-Yves Avenard
83a8dcaada Bug 1240630: [ffvpx] P2. Hook up FFVPX PDM to PDMFactory. r=kentuckyfriedtakahe
Add new preference media.ffvpx.enabled to control FFVPX PDM being enabled.
2016-01-19 17:31:25 +11:00
Carsten "Tomcat" Book
5103ca7337 Backed out changeset ea16467602a8 (bug 1240630)
--HG--
extra : rebase_source : ae4c680edc82a2c0ad74c6fbe84b4d7cf6aa3732
2016-01-20 16:10:51 +01:00
Carsten "Tomcat" Book
45991d1b24 Backed out changeset 4ab338518d02 (bug 1240995)
--HG--
extra : rebase_source : d2f8dc3044190a827fb0b747f71a3cbf741767e9
2016-01-20 16:10:46 +01:00
Jean-Yves Avenard
dac8ee7941 Bug 1240995: [ffmpeg] Refactor FFmpeg PDM. r=kentuckyfriedtakahe
This greatly simplify how the external libavcodec and libavutil are linked.
2016-01-20 23:55:37 +11:00
Jean-Yves Avenard
2e03328e3d Bug 1240630: [ffvpx] P2. Hook up FFVPX PDM to PDMFactory. r=kentuckyfriedtakahe
Add new preference media.ffvpx.enabled to control FFVPX PDM being enabled.
2016-01-20 23:55:35 +11:00
Eugen Sawin
81ff3f75e8 Bug 1221991 - [1.3] Make SupportsMimeType a const function. r=jya 2015-11-17 20:50:28 +01:00
Chris Pearce
143cbf9e7c Bug 1210231 - Enable unencrypted <video> playback using Adobe's GMP for decoding. r=jya 2015-10-29 21:54:38 +13:00
Jean-Yves Avenard
7dcba4750b Bug 1218577: Use only Blank PDM if enabled. r=kamidphish 2015-10-29 10:35:52 +11:00
Jean-Yves Avenard
f630daef7a Bug 1101885: P3. Allow decoder creation fallback. r=cpearce
While we may be able to instantiate a decoder, we may not be able to initialise
it once all information is available.
2015-10-29 00:46:30 +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
Chris Pearce
b339118972 Bug 1214932 - Add media.wmf.enabled pref. r=jya 2015-10-15 14:51:34 +13:00
Chris Pearce
bd6f4df204 Bug 1214932 - Add exclusion guards for platform specific media pref caches. r=jya 2015-10-15 14:51:31 +13:00
Chris Pearce
83fed249a0 Bug 1214932 - Remove fragmented-mp4 from media prefs. r=jya 2015-10-15 14:51:28 +13:00