Bug 1083658 - add "output-downscaled" to GMP. r=cpearce.
authorJW Wang <jwwang@mozilla.com>
Sun, 01 Feb 2015 09:18:39 +0800
changeset 226937 ae8394c92f2820b5d977661706586118596d7a4d
parent 226936 e463f1385ecb8f9b74b1f2d5e0d6458622850d6d
child 226938 b40b4a20e62ca2c52f5aed7284ec465853433356
push id54957
push userjwwang@mozilla.com
push dateSun, 01 Feb 2015 01:36:52 +0000
treeherdermozilla-inbound@ae8394c92f28 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce
bugs1083658
milestone38.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1083658 - add "output-downscaled" to GMP. r=cpearce.
dom/media/eme/MediaKeyStatusMap.cpp
dom/media/gmp-plugin/fake.info
dom/media/gmp/gmp-api/gmp-decryption.h
media/gmp-clearkey/0.1/clearkey.info
--- a/dom/media/eme/MediaKeyStatusMap.cpp
+++ b/dom/media/eme/MediaKeyStatusMap.cpp
@@ -177,17 +177,19 @@ MediaKeyStatusMap::GetSize(JSContext* aC
   return JS::MapSize(aCx, map);
 }
 
 static MediaKeyStatus
 ToMediaKeyStatus(GMPMediaKeyStatus aStatus) {
   switch (aStatus) {
     case kGMPUsable: return MediaKeyStatus::Usable;
     case kGMPExpired: return MediaKeyStatus::Expired;
+    case kGMPOutputDownscaled: return MediaKeyStatus::Output_downscaled;
     case kGMPOutputNotAllowed: return MediaKeyStatus::Output_not_allowed;
+    case kGMPInternalError: return MediaKeyStatus::Internal_error;
     default: return MediaKeyStatus::Internal_error;
   }
 }
 
 static bool
 ToJSString(JSContext* aCx, GMPMediaKeyStatus aStatus,
            JS::MutableHandle<JS::Value> aResult)
 {
--- a/dom/media/gmp-plugin/fake.info
+++ b/dom/media/gmp-plugin/fake.info
@@ -1,5 +1,5 @@
 Name: fake
 Description: Fake GMP Plugin
 Version: 1.0
-APIs: encode-video[h264], decode-video[h264], eme-decrypt-v5[fake]
+APIs: encode-video[h264], decode-video[h264], eme-decrypt-v6[fake]
 Libraries: dxva2.dll
--- a/dom/media/gmp/gmp-api/gmp-decryption.h
+++ b/dom/media/gmp/gmp-api/gmp-decryption.h
@@ -74,19 +74,21 @@ enum GMPSessionMessageType {
   kGMPLicenseRelease = 2,
   kGMPIndividualizationRequest = 3,
   kGMPMessageInvalid = 4 // Must always be last.
 };
 
 enum GMPMediaKeyStatus {
   kGMPUsable = 0,
   kGMPExpired = 1,
-  kGMPOutputNotAllowed = 2,
-  kGMPUnknown = 3,
-  kGMPMediaKeyStatusInvalid = 4 // Must always be last.
+  kGMPOutputDownscaled = 2,
+  kGMPOutputNotAllowed = 3,
+  kGMPInternalError = 4,
+  kGMPUnknown = 5,
+  kGMPMediaKeyStatusInvalid = 6 // Must always be last.
 };
 
 // Time in milliseconds, as offset from epoch, 1 Jan 1970.
 typedef int64_t GMPTimestamp;
 
 // Capability definitions. The capabilities of the EME GMP are reported
 // to Gecko by calling the GMPDecryptorCallback::SetCapabilities()
 // callback and specifying the logical OR of the GMP_EME_CAP_* flags below.
@@ -217,17 +219,17 @@ public:
 };
 
 enum GMPSessionType {
   kGMPTemporySession = 0,
   kGMPPersistentSession = 1,
   kGMPSessionInvalid = 2 // Must always be last.
 };
 
-#define GMP_API_DECRYPTOR "eme-decrypt-v5"
+#define GMP_API_DECRYPTOR "eme-decrypt-v6"
 
 // API exposed by plugin library to manage decryption sessions.
 // When the Host requests this by calling GMPGetAPIFunc().
 //
 // API name macro: GMP_API_DECRYPTOR
 // Host API: GMPDecryptorHost
 class GMPDecryptor {
 public:
--- a/media/gmp-clearkey/0.1/clearkey.info
+++ b/media/gmp-clearkey/0.1/clearkey.info
@@ -1,4 +1,4 @@
 Name: clearkey
 Description: ClearKey decrypt-only GMP plugin
 Version: 0.1
-APIs: eme-decrypt-v5[org.w3.clearkey]
+APIs: eme-decrypt-v6[org.w3.clearkey]