Bug 1083658 - add "output-downscaled" to GMP. r=cpearce. a=lmandel
authorJW Wang <jwwang@mozilla.com>
Sun, 01 Feb 2015 09:18:39 +0800
changeset 250189 c4b5f9a4cc0a
parent 250188 075916728a00
child 250190 9910b5a6a99f
push id4521
push usercpearce@mozilla.com
push date2015-03-04 01:22 +0000
treeherdermozilla-beta@8abdbdecd2d6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce, lmandel
bugs1083658
milestone37.0
Bug 1083658 - add "output-downscaled" to GMP. r=cpearce. a=lmandel
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]