Bug 1874684 - Part 28: Return DateDuration from DifferenceISODateTime. r=mgaudet
[gecko.git] / media / wmf-clearkey / WMFClearKeyOutputPolicy.cpp
blobb992d931dd01074264da75199bd87c3216a752f3
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 #include "WMFClearKeyOutputPolicy.h"
7 #include <mfapi.h>
8 #include <mferror.h>
10 #include "WMFClearKeyUtils.h"
12 namespace mozilla {
14 using Microsoft::WRL::ComPtr;
15 using Microsoft::WRL::MakeAndInitialize;
17 HRESULT WMFClearKeyOutputPolicy::RuntimeClassInitialize(
18 MFPOLICYMANAGER_ACTION aAction) {
19 ENTRY_LOG_ARGS("aAction=%d", aAction);
20 if (aAction != PEACTION_PLAY && aAction != PEACTION_EXTRACT &&
21 aAction != PEACTION_NO) {
22 return MF_E_UNEXPECTED;
24 return S_OK;
27 // IMFOutputPolicy
28 STDMETHODIMP WMFClearKeyOutputPolicy::GenerateRequiredSchemas(
29 DWORD aAttributes, GUID aGuidOutputSubtype,
30 GUID* aGuidProtectionSchemasSupported,
31 DWORD aProtectionSchemasSupportedCount,
32 IMFCollection** aRequiredProtectionSchemas) {
33 ENTRY_LOG();
34 // We don't require an OTA (output trust authority) to enforce for testing.
35 // However, we still need to return an empty collection on success.
36 ComPtr<IMFCollection> collection;
37 RETURN_IF_FAILED(MFCreateCollection(&collection));
38 *aRequiredProtectionSchemas = collection.Detach();
39 return S_OK;
42 STDMETHODIMP WMFClearKeyOutputPolicy::GetOriginatorID(GUID* aGuidOriginatorId) {
43 ENTRY_LOG();
44 *aGuidOriginatorId = GUID_NULL;
45 return S_OK;
48 STDMETHODIMP WMFClearKeyOutputPolicy::GetMinimumGRLVersion(
49 DWORD* aMinimumGrlVersion) {
50 ENTRY_LOG();
51 *aMinimumGrlVersion = 0;
52 return S_OK;
55 // IMFAttributes inherited by IMFOutputPolicy
56 STDMETHODIMP WMFClearKeyOutputPolicy::GetItem(REFGUID aGuidKey,
57 PROPVARIANT* aValue) {
58 return E_NOTIMPL;
61 STDMETHODIMP WMFClearKeyOutputPolicy::GetItemType(REFGUID aGuidKey,
62 MF_ATTRIBUTE_TYPE* aType) {
63 return E_NOTIMPL;
66 STDMETHODIMP WMFClearKeyOutputPolicy::CompareItem(REFGUID aGuidKey,
67 REFPROPVARIANT aValue,
68 BOOL* aResult) {
69 return E_NOTIMPL;
72 STDMETHODIMP WMFClearKeyOutputPolicy::Compare(IMFAttributes* aAttributes,
73 MF_ATTRIBUTES_MATCH_TYPE aType,
74 BOOL* aResult) {
75 return E_NOTIMPL;
78 STDMETHODIMP WMFClearKeyOutputPolicy::GetUINT32(REFGUID aGuidKey,
79 UINT32* aValue) {
80 return E_NOTIMPL;
83 STDMETHODIMP WMFClearKeyOutputPolicy::GetUINT64(REFGUID aGuidKey,
84 UINT64* aValue) {
85 return E_NOTIMPL;
88 STDMETHODIMP WMFClearKeyOutputPolicy::GetDouble(REFGUID aGuidKey,
89 double* aValue) {
90 return E_NOTIMPL;
93 STDMETHODIMP WMFClearKeyOutputPolicy::GetGUID(REFGUID aGuidKey,
94 GUID* aGuidValue) {
95 return E_NOTIMPL;
98 STDMETHODIMP WMFClearKeyOutputPolicy::GetStringLength(REFGUID aGuidKey,
99 UINT32* aPcchLength) {
100 return E_NOTIMPL;
103 STDMETHODIMP WMFClearKeyOutputPolicy::GetString(REFGUID aGuidKey,
104 LPWSTR aPwszValue,
105 UINT32 aCchBufSize,
106 UINT32* aPcchLength) {
107 return E_NOTIMPL;
110 STDMETHODIMP WMFClearKeyOutputPolicy::GetAllocatedString(REFGUID aGuidKey,
111 LPWSTR* aPpwszValue,
112 UINT32* aPcchLength) {
113 return E_NOTIMPL;
116 STDMETHODIMP WMFClearKeyOutputPolicy::GetBlobSize(REFGUID aGuidKey,
117 UINT32* aPcbBlobSize) {
118 return E_NOTIMPL;
121 STDMETHODIMP WMFClearKeyOutputPolicy::GetBlob(REFGUID aGuidKey, UINT8* pBuf,
122 UINT32 aCbBufSize,
123 UINT32* aPcbBlobSize) {
124 return E_NOTIMPL;
127 STDMETHODIMP WMFClearKeyOutputPolicy::GetAllocatedBlob(REFGUID aGuidKey,
128 UINT8** aBuf,
129 UINT32* aPcbSize) {
130 return E_NOTIMPL;
133 STDMETHODIMP WMFClearKeyOutputPolicy::GetUnknown(REFGUID aGuidKey, REFIID aRiid,
134 LPVOID* aPpv) {
135 return E_NOTIMPL;
138 STDMETHODIMP WMFClearKeyOutputPolicy::SetItem(REFGUID aGuidKey,
139 REFPROPVARIANT aValue) {
140 return E_NOTIMPL;
143 STDMETHODIMP WMFClearKeyOutputPolicy::DeleteItem(REFGUID aGuidKey) {
144 return E_NOTIMPL;
147 STDMETHODIMP WMFClearKeyOutputPolicy::DeleteAllItems() { return E_NOTIMPL; }
149 STDMETHODIMP WMFClearKeyOutputPolicy::SetUINT32(REFGUID aGuidKey,
150 UINT32 aValue) {
151 return E_NOTIMPL;
154 STDMETHODIMP WMFClearKeyOutputPolicy::SetUINT64(REFGUID aGuidKey,
155 UINT64 aValue) {
156 return E_NOTIMPL;
159 STDMETHODIMP WMFClearKeyOutputPolicy::SetDouble(REFGUID aGuidKey,
160 double aValue) {
161 return E_NOTIMPL;
164 STDMETHODIMP WMFClearKeyOutputPolicy::SetGUID(REFGUID aGuidKey,
165 REFGUID aGuidValue) {
166 return E_NOTIMPL;
169 STDMETHODIMP WMFClearKeyOutputPolicy::SetString(REFGUID aGuidKey,
170 LPCWSTR aWszValue) {
171 return E_NOTIMPL;
174 STDMETHODIMP WMFClearKeyOutputPolicy::SetBlob(REFGUID aGuidKey,
175 const UINT8* aBuf,
176 UINT32 aCbBufSize) {
177 return E_NOTIMPL;
180 STDMETHODIMP WMFClearKeyOutputPolicy::SetUnknown(REFGUID aGuidKey,
181 IUnknown* aUnknown) {
182 return E_NOTIMPL;
185 STDMETHODIMP WMFClearKeyOutputPolicy::LockStore() { return E_NOTIMPL; }
187 STDMETHODIMP WMFClearKeyOutputPolicy::UnlockStore() { return E_NOTIMPL; }
189 STDMETHODIMP WMFClearKeyOutputPolicy::GetCount(UINT32* aPcItems) {
190 return E_NOTIMPL;
193 STDMETHODIMP WMFClearKeyOutputPolicy::GetItemByIndex(UINT32 aIndex,
194 GUID* aGuidKey,
195 PROPVARIANT* aValue) {
196 return E_NOTIMPL;
199 STDMETHODIMP WMFClearKeyOutputPolicy::CopyAllItems(IMFAttributes* aDest) {
200 return E_NOTIMPL;
203 } // namespace mozilla