Граф коммитов

180 Коммитов

Автор SHA1 Сообщение Дата
Phil Ringnalda 7270ed519a Back out 4 changesets (bug 1276132) for browser_gmpProvider.js failures
CLOSED TREE

Backed out changeset 511a2389ca48 (bug 1276132)
Backed out changeset 91b3cdd0640a (bug 1276132)
Backed out changeset 09b9972e36f9 (bug 1276132)
Backed out changeset 69052d4e3dbb (bug 1276132)
2016-06-08 20:36:22 -07:00
Chris Pearce 64f7e2a1c9 Bug 1276132 - Remove use of #ifdef MOZ_{KEYSYSTEM}_EME in dom/media code. r=jwwang
Instead of controlling visibility of EME keysystems by build config, do it by
preference. This means keysystems can be turned on easier.


MozReview-Commit-ID: Ky1zrHPubOJ

--HG--
extra : rebase_source : 7d68ad8389afdac8fcfffd2c505f8467107c05a5
2016-05-31 11:00:55 +12:00
Chris Pearce ac79946809 Bug 1272521 - Reject Widevine keysystem requests on MacOSX 10.6. r=gerald
The Widevine CDM is crashing trying to determine the screen layout, and since
10.6 is being deprecated in August, we're not going to bother making it work.


MozReview-Commit-ID: K1k1WZqjoyy

--HG--
extra : rebase_source : 7862852195a796e6bb18ef763f1b20837801531a
2016-05-13 14:00:29 +12: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
Kyle Huey 941ab1f522 Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-05-05 01:45:00 -07:00
Carsten "Tomcat" Book ba3fe0975c Backed out changeset 85ce8cb0639a (bug 1268313)
--HG--
extra : rebase_source : 56d1cf41a2dc4959b67f834e07192a5c772176a8
2016-04-29 14:21:16 +02:00
Kyle Huey 48a594a09e Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-04-28 14:08:25 -07:00
Kyle Huey c73656947b Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
Gerald Squelart 5853b8739b Bug 848994 - p3. Check MediaKeySystem requests - r=cpearce
Media Key System access requests are now recorded with their success/failure,
as well as accompanying issues of importance.
In this bug we focus on the Widevine-with-no-WMF case.

MozReview-Commit-ID: ElBN6cXKwAW
2016-04-22 13:42:11 +10:00
Chris Pearce 0e273ade3c Bug 1265587 - Force keystatuses to be cleared when Widevine keysessions are closed. r=gerald
The Widevine CDM, and I believe the Adobe CDM too probably, do not mark a
session's keys as unusable when a key session is closed. This means that
the CDMCaps' copy of the keys that are usable is wrong, and so if the media
with the same keys is reloaded with the same MediaKeys, Firefox will assume
that the keys are usable before the license for the keys has been
re-negotiated, and so decryption will fail.


MozReview-Commit-ID: 1kTDzwSD8PE

--HG--
extra : rebase_source : 89c480f36bfaec11ceb5ca1e8d798b0ae795eaea
2016-04-22 08:31:18 +12: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
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