Commit Graph

169 Commits

Author SHA1 Message Date
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
Chris Pearce
136af0a4d8 Bug 1265038 - Turn on Adobe EME by build config rather than per-platform basis. r=jwwang
We end up showing the "Adobe EME is preffed off" UI on MacOSX because we're
check for Adobe EME support based on platform, not based on whether it's
configured on in the mozconfig. We should really only check for Adobe EME
if 'ac_add_options --enable-eme=adobe' is present in the build config,
as otherwise preffing it on isn't going to work.


MozReview-Commit-ID: CpSAh6gUU1S

--HG--
extra : rebase_source : 815b5ddf8f2889787acd22ab7a434db9b0f23213
2016-04-18 14:22:58 +12:00
Chris Pearce
d9baf3c3ba Bug 1264832 - Delay resolution of navigator.requestMediaKeySystemAccess promise until Widevine CDM is downloaded. r=gerald
MozReview-Commit-ID: I6OMiKUj9ot

--HG--
extra : rebase_source : ea150c1b3f480bef4579e280c5f7840b8a174a8c
2016-04-15 14:20:33 +12:00
Chris Pearce
a7ef15b6b8 Bug 1245789 - Reject MediaKeys requests for Widevine if we don't have a platform AAC decoder. r=gerald
The Widevine CDM does not have an AAC decoder. It can however decrypt audio
streams. It's our policy to not decode AAC streams decrypted by the Widevine
CDM with the Adobe GMP's unencrypted decoding functionality. So reject
MediaKeySystemAccess requests for Widevine if we don't have a system AAC
decoder that we can use.

MozReview-Commit-ID: Ltq52wT1qno
2016-04-12 16:12:22 +12:00
Chris Pearce
2c831f28f4 Bug 1245789 - Push detection of WMF decoding for clearkey into GMPParent to simplify request media key system access logic. r=gerald
The logic in MediaKeySystemAccess is convoluted because it needs to keep
checking whether we're servicing a clearkey request and whether WMF is
available for gmp-clearkey to decode with. If we instead push those checks down
into GMPParent at the time where we parse the GMP info file, we can just not add
the decode capability to the GMPParent, and can remove the special cases in
MediaKeySystemAccess. This simplifies adding the (similar) special cases for
Widevine in the next patch.

MozReview-Commit-ID: IKD5LU86zIv
2016-04-12 16:12:22 +12:00
Chris Pearce
1fbf846737 Bug 1245789 - Use ifdef MOZ_WIDEVINE_EME to prevent compilation when not enabled. r=gerald
This means we won't try to build it when ac_add_options --enable-eme=widevine is
not present, and critically, we won't try to build it on Android, since the Chromium
Widevine plugin isn't available there.

MozReview-Commit-ID: 1jQvAbJP8HG
2016-04-12 16:12:21 +12:00
Chris Pearce
581bf9fd48 Bug 1245789 - Added support for --enable-eme=widevine and expose MOZ_$(keySystem)_EME in dom/media/{eme,gmp}. r=glandium
We need to not build Widevine by default, and when enabled we will need to be able to
ifdef on MOZ_WIDEVINE_EME (see next patch) so that we can not build the code on platforms
where it can't possibly work (Android specifcally, as Widevine isn't available as a
Chromium plugin there).



MozReview-Commit-ID: Avgz5NRcl9v
2016-02-26 14:01:41 +13:00
Chris Pearce
85c4260134 Bug 1245789 - Add Widevine KeySystem to EME. r=gerald
This means we recognize the keysystem string in our APIs.

MozReview-Commit-ID: E3KU3JTihcr
2016-04-12 16:12:20 +12:00
Kilik Kuo
89ac1fb7b9 Bug 1256186 - Part 3: Remove the temporary solution which ignores MediaKeySystemStatus::Cdm_not_supported. r=jwwang
MozReview-Commit-ID: Jny48PqVFYR
2016-04-06 00:09:32 +08:00
Kilik Kuo
517dc21177 Bug 1256186 - Part 1: Show 'Enable EME' notification box only when MediaKeys requested for supported keysystem. r=jwwang
MozReview-Commit-ID: CxJbgzNKGJQ
2016-04-01 18:34:13 +08:00
James Cheng
23a3da9399 Bug 1260377 - Fix CDMProxy::SetServerCertificate crash since null pointer. r=cpearce 2016-03-30 11:26:44 +13:00
Chris Pearce
648f43b562 Bug 1252168 - Don't send CDM unsupported notifications from Gecko to chrome. r=kentuckyfriedtakahe
MozReview-Commit-ID: FDfpeEt3HfT

--HG--
extra : rebase_source : 5bddbeae15a8afb750f4baae416d9ff8257893c4
2016-03-03 11:02:17 +13:00
Boris Zbarsky
3366af6c39 Bug 1243001 part 5. Get rid of most of the dom::Promise methods when SPIDERMONKEY_PROMISE is defined, and reimplement the rest in terms of SpiderMonkey Promise. r=peterv
This is the bulk of the new dom::Promise implementation.  It's using the APIs
that bug 911216 part 1 adds.
2016-02-09 17:40:31 -05:00
Chris Pearce
ab9dc9ea26 Bug 1243878 - Null check CDMProxy::mKeys in CDMProxy::OnExpirationChange() before use. r=jwwang
All the methods in CDMProxy except CDMProxy::OnExpirationChange() that use
mKeys null check mKeys before using it because it can go away during shutdown
before the IPC message to call the methods have had a chance to run.

We should do the null check in CDMProxy::OnExpirationChange() too.
2016-01-29 10:23:45 +13:00
Kyle Huey
91efc5a86c Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Jean-Yves Avenard
b3cd27d6e4 Bug 1240411: P3. Clean up EME header declarations. r=cpearce 2016-01-19 19:47:30 +11:00
Chris Pearce
967b559ecc Bug 1233274 - Don't shutdown detached MediaKeys. r=gerald 2016-01-06 13:28:43 +13:00
Chris Pearce
f212540c95 Bug 1232527 - Remove GMPVideoDecoderTrialCreator and friends. r=jwwang
Remove GMPVideoDecoderTrialCreator, and the tests and IPC/IDL supporting it.

--HG--
extra : commitid : HlbJPl2gPAl
extra : rebase_source : fe1773014e5d09da264f85d464e408aca46a60c4
2015-12-15 15:17:22 +13:00
Chris Pearce
966cf53003 Bug 1232527 - Call into WMF PDM to determine if WMF can decode instead of using GMPVideoDecoderTrialCreator. r=jwwang
Resurrect WMFDecoderModule::HasAAC() and HasH264(), and use those in
MediaKeySystemAccess.cpp to figure out whether we gmp-clearkey can decode,
rather than assuming Vista and later is always able to decode, as that's not
a valid assumption; Vista may not have the required Platfor Update installed,
or we may be on Windows N or KN without the Media Feature Pack.

--HG--
extra : commitid : 2QrVAGQ5OJa
extra : rebase_source : 8ad6e5c5f87cf2b2489f049543c021723927901a
2015-12-15 14:50:59 +13:00
Chris Pearce
7529a96ada Bug 1232514 - Make GMPDecryptsAndDecodesH264() actually check for H.264 rather than AAC. r=jwwang
--HG--
extra : commitid : 1Gg4YjcvZXp
extra : rebase_source : 47153d7c9d865947f86845891d83a774ee41884b
2015-12-15 14:07:01 +13:00
Chris Pearce
0840e7ba6a Bug 1230272 - Remove version suffix from keySystem string reported by MediaKey*.keySystem attribute. r=gerald 2015-12-04 17:35:40 +13:00
Chris Pearce
9654972991 Bug 1230026 - Support 'webm' initDataType format for MP4 ClearKey initData. r=gerald 2015-12-04 07:24:11 +13:00
Mike Hommey
58b657359f Bug 1225682 - Don't use nsAuto{,C}String as class member variables in dom/media/. r=cpearce 2015-12-02 11:04:37 +09:00
Chris Pearce
efc8956d13 Bug 1228461 - Implement keyids initData type for ClearKey. r=gerald 2015-11-27 17:13:40 +13:00
Chris Pearce
6818d3ec67 Bug 1228215 - Add a 'gmpName' parameter to GMPService::GetNodeId(), so each GMP can see a different nodeId for the same origin. r=jwwang 2015-11-27 10:53:31 +13:00
Chris Pearce
f14cc10a3d Bug 1227790 - Update GMP API to include new MediaKeyStatus types. r=jwwang 2015-11-26 13:51:05 +13:00
Chris Pearce
220ccc0478 Bug 1223980 - Add iterable<ArrayBuffer,MediaKeyStatus> to MediaKeyStatusMap. r=bz 2015-11-24 13:13:21 +13:00
Chris Pearce
2e8e9b44e1 Bug 1223980 - Move CopyArrayBufferViewOrArrayBufferData to EMEUtis and add GetArrayBufferViewOrArrayBufferData. r=bz 2015-11-24 13:13:11 +13:00
Edwin Flores
2a1f5c4acb Bug 1226003 - Stop using MaybeRejectBrokenly in DetailedPromise - r=bz 2015-11-20 13:21:48 +00:00
sajitk
582e1a55fa Bug 1219480 - Replace PRLogModuleInfo with LazyLogModule in the media directory. r=rillian 2015-11-15 14:49:01 +01:00
Wes Kocher
f3a9eb2a26 Backed out changeset 1e5f3d1151d6 (bug 1219480) for cpp unittest bustage CLOSED TREE
--HG--
extra : commitid : BMVKq6cPeho
2015-11-11 09:36:56 -08:00
sajitk
3cbe348cdd Bug 1219480 - Replace PRLogModuleInfo with LazyLogModule in the media directory. r=rillian
--HG--
extra : rebase_source : c73098485fa005d914304fb6e7f8eba3c15e66dc
2015-11-11 06:52:00 +01:00
Chris Pearce
386cb9ef1b Bug 1222888 - Implement MediaKeySession callable value. r=gerald 2015-11-10 07:59:28 +13:00
Chris Pearce
985fe571ff Bug 1222875 - Connect MediaKeySession.expiration to GMP. r=gerald 2015-11-10 07:59:15 +13:00
Kyle Huey
c7d3c4e21a Bug 1216401: Eviscerate nsIDOMWindow, move still needed methods to nsPIDOMWindow. r=bz 2015-10-26 14:37:32 -07:00
Chris Pearce
9e2442eafa Bug 1189196 - Process MediaKeySystemConfiguration in navigator.requestMediaKeySystemAccess. r=jwwang 2015-10-27 14:10:51 +13:00
Chris Pearce
51df37a7c8 Bug 1189196 - Rename MediaKeySystemOptions to MediaKeySystemConfiguration and update WebIDL. r=bz 2015-10-27 14:10:51 +13: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
Nathan Froyd
583afa0965 Bug 1207245 - part 3 - switch all uses of mozilla::RefPtr<T> to nsRefPtr<T>; r=ehsan
This commit was generated using the following script, executed at the
top level of a typical source code checkout.

 # Don't modify select files in mfbt/ because it's not worth trying to
 # tease out the dependencies currently.
 #
 # Don't modify anything in media/gmp-clearkey/0.1/ because those files
 # use their own RefPtr, defined in their own RefCounted.h.
find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    grep -v 'mfbt/RefPtr.h' | \
    grep -v 'mfbt/nsRefPtr.h' | \
    grep -v 'mfbt/RefCounted.h' | \
    grep -v 'media/gmp-clearkey/0.1/' | \
    xargs perl -p -i -e '
 s/mozilla::RefPtr/nsRefPtr/g; # handle declarations in headers
 s/\bRefPtr</nsRefPtr</g; # handle local variables in functions
 s#mozilla/RefPtr.h#mozilla/nsRefPtr.h#; # handle #includes
 s#mfbt/RefPtr.h#mfbt/nsRefPtr.h#;       # handle strange #includes
'

 # |using mozilla::RefPtr;| is OK; |using nsRefPtr;| is invalid syntax.
find . -name '*.cpp' -o -name '*.mm' | xargs sed -i -e '/using nsRefPtr/d'

 # RefPtr.h used |byRef| for dealing with COM-style outparams.
 # nsRefPtr.h uses |getter_AddRefs|.
 # Fixup that mismatch.
find . -name '*.cpp' -o -name '*.h'| \
    xargs perl -p -i -e 's/byRef/getter_AddRefs/g'
2015-10-18 00:40:10 -04:00
Chris Pearce
7f29db1d5a Bug 1214478 - Ensure MediaKeySession.close() does not store its promise twice. r=gerald 2015-10-14 19:42:24 +13:00
Chris Pearce
d4ed7efef9 Bug 1207019 - Remove WMF availability check in MediaKeySystemAccess requests. r=edwin 2015-10-05 15:03:48 +13:00
Chris Pearce
d565fd2492 Bug 1208289 - Log outstanding frames in GMP DrainComplete() and detect dropped ResetComplete. r=jwwang
* * *
Bug 1208289 - Yet another bustage fix. r=bustage
2015-09-29 13:06:14 +13:00
Nigel Babu
4013fbd739 Backed out changeset efcfe0c08c24 (bug 1208289) for B2G build bustage 2015-09-28 12:22:34 +05:30
Chris Pearce
faefcaba27 Bug 1208289 - Log outstanding frames in GMP DrainComplete() and detect dropped ResetComplete. r=jwwang
* * *
Bug 1208289 - Yet another bustage fix. r=bustage
2015-09-28 17:57:10 +13:00
Chris Pearce
e30c6e5fa9 Bug 1208289 - Backout. r=backout 2015-09-28 15:37:18 +13:00
Chris Pearce
8ded475d58 Bug 1208289 - Log outstanding frames in GMP DrainComplete() and detect dropped ResetComplete. r=jwwang 2015-09-28 14:03:21 +13:00
Chris Pearce
dc7d7fd07d Bug 1207439 - Don't use GMPVideoDecoderTrialCreator for Primetime. r=edwin 2015-09-25 14:19:46 +12:00
Sotaro Ikeda
34a6dca7cc Bug 1205351 - Replace nsBaseHashtable::Enumerate() calls in dom/media/ with iterators r=cpearce 2015-09-24 18:48:25 -07:00
Chris Pearce
1dce7bcb10 Bug 1187760 - Add telemetry to record navigator.requestMediaKeySystemAccess latency. r=edwin,vladan 2015-09-23 16:43:46 +12:00
Chris Pearce
a808146d0f Bug 1207000 - Create GMPVideoDecoderTrialCreator on all platforms. r=edwin 2015-09-22 15:12:09 +12:00