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/. */
5 #ifndef DOM_MEDIA_PLATFORM_WMF_CLEARKEY_WMFPMPSERVER_H
6 #define DOM_MEDIA_PLATFORM_WMF_CLEARKEY_WMFPMPSERVER_H
10 #include <windows.media.protection.h>
13 #include "MFCDMExtra.h"
17 // A mock PMP server in order to allow media engine to create in-process PMP
19 class WMFPMPServer final
20 : public Microsoft::WRL::RuntimeClass
<
21 Microsoft::WRL::RuntimeClassFlags
<Microsoft::WRL::ClassicCom
>,
22 ABI::Windows::Media::Protection::IMediaProtectionPMPServer
,
23 IMFGetService
, Microsoft::WRL::FtmBase
> {
25 WMFPMPServer() = default;
26 ~WMFPMPServer() = default;
27 WMFPMPServer(const WMFPMPServer
&) = delete;
28 WMFPMPServer
& operator=(const WMFPMPServer
&) = delete;
30 HRESULT
RuntimeClassInitialize(
31 ABI::Windows::Foundation::Collections::IPropertySet
* aPropertyPmp
);
34 STDMETHODIMP
GetIids(ULONG
* aIidCount
, IID
** aIids
) override
;
35 STDMETHODIMP
GetRuntimeClassName(HSTRING
* aClassName
) override
;
36 STDMETHODIMP
GetTrustLevel(TrustLevel
* aTrustLevel
) override
;
38 // IMediaProtectionPMPServer
39 STDMETHODIMP
get_Properties(
40 ABI::Windows::Foundation::Collections::IPropertySet
** aPpProperties
)
44 STDMETHODIMP
GetService(REFGUID aGuidService
, REFIID aRiid
,
45 LPVOID
* aObject
) override
;
48 Microsoft::WRL::ComPtr
<ABI::Windows::Foundation::Collections::IPropertySet
>
50 Microsoft::WRL::ComPtr
<IMFPMPServer
> mPmpServer
;
51 Microsoft::WRL::ComPtr
<IMFPMPHost
> mPmpHost
;
52 Microsoft::WRL::ComPtr
<IMFMediaSession
> mMediaSession
;
55 } // namespace mozilla
57 #endif // DOM_MEDIA_PLATFORM_WMF_CLEARKEY_WMFPMPSERVER_H