summaryrefslogtreecommitdiff
path: root/dom/media/gmp/GMPService.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/media/gmp/GMPService.cpp')
-rw-r--r--dom/media/gmp/GMPService.cpp70
1 files changed, 7 insertions, 63 deletions
diff --git a/dom/media/gmp/GMPService.cpp b/dom/media/gmp/GMPService.cpp
index 1901210da1..fc3422f1f0 100644
--- a/dom/media/gmp/GMPService.cpp
+++ b/dom/media/gmp/GMPService.cpp
@@ -20,7 +20,6 @@
#include "nsNativeCharsetUtils.h"
#include "nsIConsoleService.h"
#include "mozilla/Unused.h"
-#include "GMPDecryptorParent.h"
#include "GMPAudioDecoderParent.h"
#include "nsComponentManagerUtils.h"
#include "runnable_utils.h"
@@ -346,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)
{
}
@@ -358,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);
}
@@ -368,15 +365,13 @@ public:
private:
UniquePtr<GetGMPVideoDecoderCallback> mCallback;
RefPtr<GMPCrashHelper> mHelper;
- const uint32_t mDecryptorId;
};
NS_IMETHODIMP
-GeckoMediaPluginService::GetDecryptingGMPVideoDecoder(GMPCrashHelper* aHelper,
- nsTArray<nsCString>* aTags,
- const nsACString& aNodeId,
- UniquePtr<GetGMPVideoDecoderCallback>&& aCallback,
- uint32_t aDecryptorId)
+GeckoMediaPluginService::GetGMPVideoDecoder(GMPCrashHelper* aHelper,
+ nsTArray<nsCString>* aTags,
+ const nsACString& aNodeId,
+ UniquePtr<GetGMPVideoDecoderCallback>&& aCallback)
{
MOZ_ASSERT(NS_GetCurrentThread() == mGMPThread);
NS_ENSURE_ARG(aTags && aTags->Length() > 0);
@@ -387,7 +382,7 @@ GeckoMediaPluginService::GetDecryptingGMPVideoDecoder(GMPCrashHelper* aHelper,
}
UniquePtr<GetGMPContentParentCallback> callback(
- new GetGMPContentParentForVideoDecoderDone(Move(aCallback), aHelper, aDecryptorId));
+ new GetGMPContentParentForVideoDecoderDone(Move(aCallback), aHelper));
if (!GetContentParentFrom(aHelper,
aNodeId,
NS_LITERAL_CSTRING(GMP_API_VIDEO_DECODER),
@@ -452,57 +447,6 @@ GeckoMediaPluginService::GetGMPVideoEncoder(GMPCrashHelper* aHelper,
return NS_OK;
}
-class GetGMPContentParentForDecryptorDone : public GetGMPContentParentCallback
-{
-public:
- explicit GetGMPContentParentForDecryptorDone(UniquePtr<GetGMPDecryptorCallback>&& aCallback,
- GMPCrashHelper* aHelper)
- : mCallback(Move(aCallback))
- , mHelper(aHelper)
- {
- }
-
- void Done(GMPContentParent* aGMPParent) override
- {
- GMPDecryptorParent* ksp = nullptr;
- if (aGMPParent && NS_SUCCEEDED(aGMPParent->GetGMPDecryptor(&ksp))) {
- ksp->SetCrashHelper(mHelper);
- }
- mCallback->Done(ksp);
- }
-
-private:
- UniquePtr<GetGMPDecryptorCallback> mCallback;
- RefPtr<GMPCrashHelper> mHelper;
-};
-
-NS_IMETHODIMP
-GeckoMediaPluginService::GetGMPDecryptor(GMPCrashHelper* aHelper,
- nsTArray<nsCString>* aTags,
- const nsACString& aNodeId,
- UniquePtr<GetGMPDecryptorCallback>&& aCallback)
-{
- MOZ_ASSERT(NS_GetCurrentThread() == mGMPThread);
- NS_ENSURE_ARG(aTags && aTags->Length() > 0);
- NS_ENSURE_ARG(aCallback);
-
- if (mShuttingDownOnGMPThread) {
- return NS_ERROR_FAILURE;
- }
-
- UniquePtr<GetGMPContentParentCallback> callback(
- new GetGMPContentParentForDecryptorDone(Move(aCallback), aHelper));
- if (!GetContentParentFrom(aHelper,
- aNodeId,
- NS_LITERAL_CSTRING(GMP_API_DECRYPTOR),
- *aTags,
- Move(callback))) {
- return NS_ERROR_FAILURE;
- }
-
- return NS_OK;
-}
-
void
GeckoMediaPluginService::ConnectCrashHelper(uint32_t aPluginId, GMPCrashHelper* aHelper)
{