diff options
author | Moonchild <moonchild@palemoon.org> | 2023-11-03 21:50:37 +0100 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2023-11-03 21:50:37 +0100 |
commit | 66527647517bb08cb92ebec91b3595452d8a2e40 (patch) | |
tree | b851c4b356198a447143aa0a79c5402e946a849e | |
parent | d16bc65a16409ee2a0315c210a6b7ce6a966a558 (diff) | |
download | uxp-66527647517bb08cb92ebec91b3595452d8a2e40.tar.gz |
Issue #2346 - Remove now-unused DecryptorId
-rw-r--r-- | dom/media/gmp/GMPChild.cpp | 5 | ||||
-rw-r--r-- | dom/media/gmp/GMPChild.h | 2 | ||||
-rw-r--r-- | dom/media/gmp/GMPContentChild.cpp | 7 | ||||
-rw-r--r-- | dom/media/gmp/GMPContentChild.h | 4 | ||||
-rw-r--r-- | dom/media/gmp/GMPContentParent.cpp | 7 | ||||
-rw-r--r-- | dom/media/gmp/GMPContentParent.h | 5 | ||||
-rw-r--r-- | dom/media/gmp/GMPLoader.cpp | 11 | ||||
-rw-r--r-- | dom/media/gmp/GMPLoader.h | 6 | ||||
-rw-r--r-- | dom/media/gmp/GMPService.cpp | 9 | ||||
-rw-r--r-- | dom/media/gmp/PGMPContent.ipdl | 2 | ||||
-rw-r--r-- | dom/media/platforms/agnostic/gmp/GMPVideoDecoder.h | 1 |
11 files changed, 23 insertions, 36 deletions
diff --git a/dom/media/gmp/GMPChild.cpp b/dom/media/gmp/GMPChild.cpp index b89794834e..1b02a0c244 100644 --- a/dom/media/gmp/GMPChild.cpp +++ b/dom/media/gmp/GMPChild.cpp @@ -163,13 +163,12 @@ GMPChild::RecvSetNodeId(const nsCString& aNodeId) GMPErr GMPChild::GetAPI(const char* aAPIName, void* aHostAPI, - void** aPluginAPI, - uint32_t aDecryptorId) + void** aPluginAPI) { if (!mGMPLoader) { return GMPGenericErr; } - return mGMPLoader->GetAPI(aAPIName, aHostAPI, aPluginAPI, aDecryptorId); + return mGMPLoader->GetAPI(aAPIName, aHostAPI, aPluginAPI); } bool diff --git a/dom/media/gmp/GMPChild.h b/dom/media/gmp/GMPChild.h index 722e4c7a91..a807564f72 100644 --- a/dom/media/gmp/GMPChild.h +++ b/dom/media/gmp/GMPChild.h @@ -69,7 +69,7 @@ private: void ActorDestroy(ActorDestroyReason aWhy) override; void ProcessingError(Result aCode, const char* aReason) override; - GMPErr GetAPI(const char* aAPIName, void* aHostAPI, void** aPluginAPI, uint32_t aDecryptorId = 0); + GMPErr GetAPI(const char* aAPIName, void* aHostAPI, void** aPluginAPI); nsTArray<UniquePtr<GMPContentChild>> mGMPContentChildren; diff --git a/dom/media/gmp/GMPContentChild.cpp b/dom/media/gmp/GMPContentChild.cpp index b85ea1e855..9155d9bf4d 100644 --- a/dom/media/gmp/GMPContentChild.cpp +++ b/dom/media/gmp/GMPContentChild.cpp @@ -62,7 +62,7 @@ GMPContentChild::DeallocPGMPAudioDecoderChild(PGMPAudioDecoderChild* aActor) } PGMPVideoDecoderChild* -GMPContentChild::AllocPGMPVideoDecoderChild(const uint32_t& aDecryptorId) +GMPContentChild::AllocPGMPVideoDecoderChild() { GMPVideoDecoderChild* actor = new GMPVideoDecoderChild(this); actor->AddRef(); @@ -108,13 +108,12 @@ GMPContentChild::RecvPGMPAudioDecoderConstructor(PGMPAudioDecoderChild* aActor) } bool -GMPContentChild::RecvPGMPVideoDecoderConstructor(PGMPVideoDecoderChild* aActor, - const uint32_t& aDecryptorId) +GMPContentChild::RecvPGMPVideoDecoderConstructor(PGMPVideoDecoderChild* aActor) { auto vdc = static_cast<GMPVideoDecoderChild*>(aActor); void* vd = nullptr; - GMPErr err = mGMPChild->GetAPI(GMP_API_VIDEO_DECODER, &vdc->Host(), &vd, aDecryptorId); + GMPErr err = mGMPChild->GetAPI(GMP_API_VIDEO_DECODER, &vdc->Host(), &vd); if (err != GMPNoErr || !vd) { NS_WARNING("GMPGetAPI call failed trying to construct decoder."); return false; diff --git a/dom/media/gmp/GMPContentChild.h b/dom/media/gmp/GMPContentChild.h index 17d495e392..8cbcc90cd0 100644 --- a/dom/media/gmp/GMPContentChild.h +++ b/dom/media/gmp/GMPContentChild.h @@ -24,13 +24,13 @@ public: MessageLoop* GMPMessageLoop(); bool RecvPGMPAudioDecoderConstructor(PGMPAudioDecoderChild* aActor) override; - bool RecvPGMPVideoDecoderConstructor(PGMPVideoDecoderChild* aActor, const uint32_t& aDecryptorId) override; + bool RecvPGMPVideoDecoderConstructor(PGMPVideoDecoderChild* aActor) override; bool RecvPGMPVideoEncoderConstructor(PGMPVideoEncoderChild* aActor) override; PGMPAudioDecoderChild* AllocPGMPAudioDecoderChild() override; bool DeallocPGMPAudioDecoderChild(PGMPAudioDecoderChild* aActor) override; - PGMPVideoDecoderChild* AllocPGMPVideoDecoderChild(const uint32_t& aDecryptorId) override; + PGMPVideoDecoderChild* AllocPGMPVideoDecoderChild() override; bool DeallocPGMPVideoDecoderChild(PGMPVideoDecoderChild* aActor) override; PGMPVideoEncoderChild* AllocPGMPVideoEncoderChild() override; diff --git a/dom/media/gmp/GMPContentParent.cpp b/dom/media/gmp/GMPContentParent.cpp index 1a8cb6d2ae..efc21e19e7 100644 --- a/dom/media/gmp/GMPContentParent.cpp +++ b/dom/media/gmp/GMPContentParent.cpp @@ -165,11 +165,10 @@ GMPContentParent::GetGMPAudioDecoder(GMPAudioDecoderParent** aGMPAD) } nsresult -GMPContentParent::GetGMPVideoDecoder(GMPVideoDecoderParent** aGMPVD, - uint32_t aDecryptorId) +GMPContentParent::GetGMPVideoDecoder(GMPVideoDecoderParent** aGMPVD) { // returned with one anonymous AddRef that locks it until Destroy - PGMPVideoDecoderParent* pvdp = SendPGMPVideoDecoderConstructor(aDecryptorId); + PGMPVideoDecoderParent* pvdp = SendPGMPVideoDecoderConstructor(); if (!pvdp) { return NS_ERROR_FAILURE; } @@ -202,7 +201,7 @@ GMPContentParent::GetGMPVideoEncoder(GMPVideoEncoderParent** aGMPVE) } PGMPVideoDecoderParent* -GMPContentParent::AllocPGMPVideoDecoderParent(const uint32_t& aDecryptorId) +GMPContentParent::AllocPGMPVideoDecoderParent() { GMPVideoDecoderParent* vdp = new GMPVideoDecoderParent(this); NS_ADDREF(vdp); diff --git a/dom/media/gmp/GMPContentParent.h b/dom/media/gmp/GMPContentParent.h index 9edd9bdef7..e53d811038 100644 --- a/dom/media/gmp/GMPContentParent.h +++ b/dom/media/gmp/GMPContentParent.h @@ -26,8 +26,7 @@ public: explicit GMPContentParent(GMPParent* aParent = nullptr); - nsresult GetGMPVideoDecoder(GMPVideoDecoderParent** aGMPVD, - uint32_t aDecryptorId); + nsresult GetGMPVideoDecoder(GMPVideoDecoderParent** aGMPVD); void VideoDecoderDestroyed(GMPVideoDecoderParent* aDecoder); nsresult GetGMPVideoEncoder(GMPVideoEncoderParent** aGMPVE); @@ -63,7 +62,7 @@ private: void ActorDestroy(ActorDestroyReason aWhy) override; - PGMPVideoDecoderParent* AllocPGMPVideoDecoderParent(const uint32_t& aDecryptorId) override; + PGMPVideoDecoderParent* AllocPGMPVideoDecoderParent() override; bool DeallocPGMPVideoDecoderParent(PGMPVideoDecoderParent* aActor) override; PGMPVideoEncoderParent* AllocPGMPVideoEncoderParent() override; diff --git a/dom/media/gmp/GMPLoader.cpp b/dom/media/gmp/GMPLoader.cpp index f0437494fa..c84d71788f 100644 --- a/dom/media/gmp/GMPLoader.cpp +++ b/dom/media/gmp/GMPLoader.cpp @@ -38,8 +38,7 @@ public: GMPErr GetAPI(const char* aAPIName, void* aHostAPI, - void** aPluginAPI, - uint32_t aDecryptorId) override; + void** aPluginAPI) override; void Shutdown() override; @@ -78,8 +77,7 @@ public: GMPErr GMPGetAPI(const char* aAPIName, void* aHostAPI, - void** aPluginAPI, - uint32_t aDecryptorId) override + void** aPluginAPI) override { if (!mLib) { return GMPGenericErr; @@ -189,10 +187,9 @@ GMPLoaderImpl::Load(const char* aUTF8LibPath, GMPErr GMPLoaderImpl::GetAPI(const char* aAPIName, void* aHostAPI, - void** aPluginAPI, - uint32_t aDecryptorId) + void** aPluginAPI) { - return mAdapter->GMPGetAPI(aAPIName, aHostAPI, aPluginAPI, aDecryptorId); + return mAdapter->GMPGetAPI(aAPIName, aHostAPI, aPluginAPI); } void diff --git a/dom/media/gmp/GMPLoader.h b/dom/media/gmp/GMPLoader.h index 5b6030ad7c..91989f9c24 100644 --- a/dom/media/gmp/GMPLoader.h +++ b/dom/media/gmp/GMPLoader.h @@ -33,8 +33,7 @@ public: virtual GMPErr GMPInit(const GMPPlatformAPI* aPlatformAPI) = 0; virtual GMPErr GMPGetAPI(const char* aAPIName, void* aHostAPI, - void** aPluginAPI, - uint32_t aDecryptorId) = 0; + void** aPluginAPI) = 0; virtual void GMPShutdown() = 0; virtual void GMPSetNodeId(const char* aNodeId, uint32_t aLength) = 0; }; @@ -77,8 +76,7 @@ public: // Retrieves an interface pointer from the GMP. virtual GMPErr GetAPI(const char* aAPIName, void* aHostAPI, - void** aPluginAPI, - uint32_t aDecryptorId) = 0; + void** aPluginAPI) = 0; // Calls the GMPShutdown function exported by the GMP lib, and unloads the // plugin library. diff --git a/dom/media/gmp/GMPService.cpp b/dom/media/gmp/GMPService.cpp index f0d570e90c..fc3422f1f0 100644 --- a/dom/media/gmp/GMPService.cpp +++ b/dom/media/gmp/GMPService.cpp @@ -345,11 +345,9 @@ class GetGMPContentParentForVideoDecoderDone : public GetGMPContentParentCallbac { public: explicit GetGMPContentParentForVideoDecoderDone(UniquePtr<GetGMPVideoDecoderCallback>&& aCallback, - GMPCrashHelper* aHelper, - uint32_t aDecryptorId) + GMPCrashHelper* aHelper) : mCallback(Move(aCallback)) , mHelper(aHelper) - , mDecryptorId(aDecryptorId) { } @@ -357,7 +355,7 @@ public: { GMPVideoDecoderParent* gmpVDP = nullptr; GMPVideoHostImpl* videoHost = nullptr; - if (aGMPParent && NS_SUCCEEDED(aGMPParent->GetGMPVideoDecoder(&gmpVDP, mDecryptorId))) { + if (aGMPParent && NS_SUCCEEDED(aGMPParent->GetGMPVideoDecoder(&gmpVDP))) { videoHost = &gmpVDP->Host(); gmpVDP->SetCrashHelper(mHelper); } @@ -367,7 +365,6 @@ public: private: UniquePtr<GetGMPVideoDecoderCallback> mCallback; RefPtr<GMPCrashHelper> mHelper; - const uint32_t mDecryptorId; }; NS_IMETHODIMP @@ -385,7 +382,7 @@ GeckoMediaPluginService::GetGMPVideoDecoder(GMPCrashHelper* aHelper, } UniquePtr<GetGMPContentParentCallback> callback( - new GetGMPContentParentForVideoDecoderDone(Move(aCallback), aHelper, 0)); + new GetGMPContentParentForVideoDecoderDone(Move(aCallback), aHelper)); if (!GetContentParentFrom(aHelper, aNodeId, NS_LITERAL_CSTRING(GMP_API_VIDEO_DECODER), diff --git a/dom/media/gmp/PGMPContent.ipdl b/dom/media/gmp/PGMPContent.ipdl index 0a58d5d4e0..b1ca2491b0 100644 --- a/dom/media/gmp/PGMPContent.ipdl +++ b/dom/media/gmp/PGMPContent.ipdl @@ -22,7 +22,7 @@ intr protocol PGMPContent child: async PGMPAudioDecoder(); - async PGMPVideoDecoder(uint32_t aDecryptorId); + async PGMPVideoDecoder(); async PGMPVideoEncoder(); }; diff --git a/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.h b/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.h index 290f02a867..7d9b8ebe2e 100644 --- a/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.h +++ b/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.h @@ -81,7 +81,6 @@ public: protected: virtual void InitTags(nsTArray<nsCString>& aTags); virtual nsCString GetNodeId(); - virtual uint32_t DecryptorId() const { return 0; } virtual GMPUniquePtr<GMPVideoEncodedFrame> CreateFrame(MediaRawData* aSample); virtual const VideoInfo& GetConfig() const; |