[X2Go-Commits] [pale-moon] 09/294: [EME} Hackily implement cdm::Host_9::RequestStorageId

git-admin at x2go.org git-admin at x2go.org
Sat Apr 27 08:57:40 CEST 2019


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch upstream/28.5.0
in repository pale-moon.

commit 6310310e0ae2acb88b2f83c7fb5abb806fa64dcb
Author: trav90 <travawine at protonmail.ch>
Date:   Fri Feb 8 10:41:49 2019 -0600

    [EME} Hackily implement cdm::Host_9::RequestStorageId
    
    TODO: Implement this properly in the future.
---
 dom/media/gmp/widevine-adapter/WidevineDecryptor.cpp | 13 +++++++++++++
 dom/media/gmp/widevine-adapter/WidevineDecryptor.h   |  2 +-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/dom/media/gmp/widevine-adapter/WidevineDecryptor.cpp b/dom/media/gmp/widevine-adapter/WidevineDecryptor.cpp
index e85aa2d..e3560d3 100644
--- a/dom/media/gmp/widevine-adapter/WidevineDecryptor.cpp
+++ b/dom/media/gmp/widevine-adapter/WidevineDecryptor.cpp
@@ -541,4 +541,17 @@ WidevineDecryptor::CreateFileIO(FileIOClient* aClient)
   return new WidevineFileIO(aClient);
 }
 
+void
+WidevineDecryptor::RequestStorageId(uint32_t aVersion)
+{
+  Log("ChromiumCDMChild::RequestStorageId() aVersion = %u", aVersion);
+  if (aVersion >= 0x80000000) {
+    mCDM->OnStorageId(aVersion, nullptr, 0);
+    return;
+  }
+
+  //TODO: Need to provide a menaingful buffer instead of a dummy one.
+  mCDM->OnStorageId(aVersion, new uint8_t[1024*1024], 1024 * 1024);
+}
+
 } // namespace mozilla
diff --git a/dom/media/gmp/widevine-adapter/WidevineDecryptor.h b/dom/media/gmp/widevine-adapter/WidevineDecryptor.h
index c1a1eba..f291c32 100644
--- a/dom/media/gmp/widevine-adapter/WidevineDecryptor.h
+++ b/dom/media/gmp/widevine-adapter/WidevineDecryptor.h
@@ -110,7 +110,7 @@ public:
                                     cdm::Status aDecoderStatus) override;
   // cdm::Host_9 interface
   // NOTE: the interface has changed upstream.
-  void RequestStorageId() override {}
+  void RequestStorageId(uint32_t aVersion) override;
   cdm::FileIO* CreateFileIO(cdm::FileIOClient* aClient) override;
 
   GMPDecryptorCallback* Callback() const { return mCallback; }

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/pale-moon.git


More information about the x2go-commits mailing list