summaryrefslogtreecommitdiffstats
path: root/dom/media
diff options
context:
space:
mode:
authortrav90 <travawine@protonmail.ch>2019-02-08 10:41:49 -0600
committertrav90 <travawine@protonmail.ch>2019-02-08 10:41:49 -0600
commit6310310e0ae2acb88b2f83c7fb5abb806fa64dcb (patch)
treea9940b100e8f24d3d8db8ecb93997d652de06742 /dom/media
parent1fa998d8919375312d20d6d54bae955d166031c7 (diff)
downloadUXP-6310310e0ae2acb88b2f83c7fb5abb806fa64dcb.tar
UXP-6310310e0ae2acb88b2f83c7fb5abb806fa64dcb.tar.gz
UXP-6310310e0ae2acb88b2f83c7fb5abb806fa64dcb.tar.lz
UXP-6310310e0ae2acb88b2f83c7fb5abb806fa64dcb.tar.xz
UXP-6310310e0ae2acb88b2f83c7fb5abb806fa64dcb.zip
[EME} Hackily implement cdm::Host_9::RequestStorageId
TODO: Implement this properly in the future.
Diffstat (limited to 'dom/media')
-rw-r--r--dom/media/gmp/widevine-adapter/WidevineDecryptor.cpp13
-rw-r--r--dom/media/gmp/widevine-adapter/WidevineDecryptor.h2
2 files changed, 14 insertions, 1 deletions
diff --git a/dom/media/gmp/widevine-adapter/WidevineDecryptor.cpp b/dom/media/gmp/widevine-adapter/WidevineDecryptor.cpp
index e85aa2db3..e3560d33f 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 c1a1ebaa1..f291c321d 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; }