WMFClearKeyCDMFactory.h (1813B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 #ifndef DOM_MEDIA_PLATFORM_WMF_CLEARKEY_WMFCLEARKEYCDMFACTORY_H 6 #define DOM_MEDIA_PLATFORM_WMF_CLEARKEY_WMFCLEARKEYCDMFACTORY_H 7 8 #include <mfidl.h> 9 #include <windows.h> 10 #include <wrl.h> 11 12 #include "MFCDMExtra.h" 13 14 namespace mozilla { 15 16 // This class is used to return WMFClearKeyCDMAccess and answer what kind of key 17 // system is supported. 18 class WMFClearKeyCDMFactory final 19 : public Microsoft::WRL::RuntimeClass< 20 Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::WinRtClassicComMix>, 21 Microsoft::WRL::CloakedIid<IMFContentDecryptionModuleFactory>, 22 Microsoft::WRL::CloakedIid<IMFExtendedDRMTypeSupport>, 23 Microsoft::WRL::FtmBase> { 24 InspectableClass(L"org.w3.clearkey", BaseTrust); 25 26 public: 27 WMFClearKeyCDMFactory() = default; 28 ~WMFClearKeyCDMFactory() = default; 29 WMFClearKeyCDMFactory(const WMFClearKeyCDMFactory&) = delete; 30 WMFClearKeyCDMFactory& operator=(const WMFClearKeyCDMFactory&) = delete; 31 32 HRESULT RuntimeClassInitialize() { return S_OK; } 33 34 // IMFContentDecryptionModuleFactory 35 STDMETHODIMP_(BOOL) 36 IsTypeSupported(LPCWSTR aKeySystem, LPCWSTR aContentType) override; 37 38 STDMETHODIMP CreateContentDecryptionModuleAccess( 39 LPCWSTR aKeySystem, IPropertyStore** aConfigurations, 40 DWORD aNumConfigurations, 41 IMFContentDecryptionModuleAccess** aCdmAccess) override; 42 43 // IMFExtendedDRMTypeSupport 44 STDMETHODIMP IsTypeSupportedEx(BSTR aType, BSTR aKeySystem, 45 MF_MEDIA_ENGINE_CANPLAY* aPAnswer) override; 46 }; 47 48 } // namespace mozilla 49 50 #endif // DOM_MEDIA_PLATFORM_WMF_CLEARKEY_WMFCLEARKEYCDMFACTORY_H