WMFClearKeyOutputPolicy.cpp (6652B)
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 #include "WMFClearKeyOutputPolicy.h" 6 7 #include <mfapi.h> 8 #include <mferror.h> 9 10 #include "WMFClearKeyUtils.h" 11 12 namespace mozilla { 13 14 using Microsoft::WRL::ComPtr; 15 using Microsoft::WRL::MakeAndInitialize; 16 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; 23 } 24 return S_OK; 25 } 26 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; 40 } 41 42 STDMETHODIMP WMFClearKeyOutputPolicy::GetOriginatorID(GUID* aGuidOriginatorId) { 43 ENTRY_LOG(); 44 *aGuidOriginatorId = GUID_NULL; 45 return S_OK; 46 } 47 48 STDMETHODIMP WMFClearKeyOutputPolicy::GetMinimumGRLVersion( 49 DWORD* aMinimumGrlVersion) { 50 ENTRY_LOG(); 51 *aMinimumGrlVersion = 0; 52 return S_OK; 53 } 54 55 // IMFAttributes inherited by IMFOutputPolicy 56 STDMETHODIMP WMFClearKeyOutputPolicy::GetItem(REFGUID aGuidKey, 57 PROPVARIANT* aValue) { 58 return E_NOTIMPL; 59 } 60 61 STDMETHODIMP WMFClearKeyOutputPolicy::GetItemType(REFGUID aGuidKey, 62 MF_ATTRIBUTE_TYPE* aType) { 63 return E_NOTIMPL; 64 } 65 66 STDMETHODIMP WMFClearKeyOutputPolicy::CompareItem(REFGUID aGuidKey, 67 REFPROPVARIANT aValue, 68 BOOL* aResult) { 69 return E_NOTIMPL; 70 } 71 72 STDMETHODIMP WMFClearKeyOutputPolicy::Compare(IMFAttributes* aAttributes, 73 MF_ATTRIBUTES_MATCH_TYPE aType, 74 BOOL* aResult) { 75 return E_NOTIMPL; 76 } 77 78 STDMETHODIMP WMFClearKeyOutputPolicy::GetUINT32(REFGUID aGuidKey, 79 UINT32* aValue) { 80 return E_NOTIMPL; 81 } 82 83 STDMETHODIMP WMFClearKeyOutputPolicy::GetUINT64(REFGUID aGuidKey, 84 UINT64* aValue) { 85 return E_NOTIMPL; 86 } 87 88 STDMETHODIMP WMFClearKeyOutputPolicy::GetDouble(REFGUID aGuidKey, 89 double* aValue) { 90 return E_NOTIMPL; 91 } 92 93 STDMETHODIMP WMFClearKeyOutputPolicy::GetGUID(REFGUID aGuidKey, 94 GUID* aGuidValue) { 95 return E_NOTIMPL; 96 } 97 98 STDMETHODIMP WMFClearKeyOutputPolicy::GetStringLength(REFGUID aGuidKey, 99 UINT32* aPcchLength) { 100 return E_NOTIMPL; 101 } 102 103 STDMETHODIMP WMFClearKeyOutputPolicy::GetString(REFGUID aGuidKey, 104 LPWSTR aPwszValue, 105 UINT32 aCchBufSize, 106 UINT32* aPcchLength) { 107 return E_NOTIMPL; 108 } 109 110 STDMETHODIMP WMFClearKeyOutputPolicy::GetAllocatedString(REFGUID aGuidKey, 111 LPWSTR* aPpwszValue, 112 UINT32* aPcchLength) { 113 return E_NOTIMPL; 114 } 115 116 STDMETHODIMP WMFClearKeyOutputPolicy::GetBlobSize(REFGUID aGuidKey, 117 UINT32* aPcbBlobSize) { 118 return E_NOTIMPL; 119 } 120 121 STDMETHODIMP WMFClearKeyOutputPolicy::GetBlob(REFGUID aGuidKey, UINT8* pBuf, 122 UINT32 aCbBufSize, 123 UINT32* aPcbBlobSize) { 124 return E_NOTIMPL; 125 } 126 127 STDMETHODIMP WMFClearKeyOutputPolicy::GetAllocatedBlob(REFGUID aGuidKey, 128 UINT8** aBuf, 129 UINT32* aPcbSize) { 130 return E_NOTIMPL; 131 } 132 133 STDMETHODIMP WMFClearKeyOutputPolicy::GetUnknown(REFGUID aGuidKey, REFIID aRiid, 134 LPVOID* aPpv) { 135 return E_NOTIMPL; 136 } 137 138 STDMETHODIMP WMFClearKeyOutputPolicy::SetItem(REFGUID aGuidKey, 139 REFPROPVARIANT aValue) { 140 return E_NOTIMPL; 141 } 142 143 STDMETHODIMP WMFClearKeyOutputPolicy::DeleteItem(REFGUID aGuidKey) { 144 return E_NOTIMPL; 145 } 146 147 STDMETHODIMP WMFClearKeyOutputPolicy::DeleteAllItems() { return E_NOTIMPL; } 148 149 STDMETHODIMP WMFClearKeyOutputPolicy::SetUINT32(REFGUID aGuidKey, 150 UINT32 aValue) { 151 return E_NOTIMPL; 152 } 153 154 STDMETHODIMP WMFClearKeyOutputPolicy::SetUINT64(REFGUID aGuidKey, 155 UINT64 aValue) { 156 return E_NOTIMPL; 157 } 158 159 STDMETHODIMP WMFClearKeyOutputPolicy::SetDouble(REFGUID aGuidKey, 160 double aValue) { 161 return E_NOTIMPL; 162 } 163 164 STDMETHODIMP WMFClearKeyOutputPolicy::SetGUID(REFGUID aGuidKey, 165 REFGUID aGuidValue) { 166 return E_NOTIMPL; 167 } 168 169 STDMETHODIMP WMFClearKeyOutputPolicy::SetString(REFGUID aGuidKey, 170 LPCWSTR aWszValue) { 171 return E_NOTIMPL; 172 } 173 174 STDMETHODIMP WMFClearKeyOutputPolicy::SetBlob(REFGUID aGuidKey, 175 const UINT8* aBuf, 176 UINT32 aCbBufSize) { 177 return E_NOTIMPL; 178 } 179 180 STDMETHODIMP WMFClearKeyOutputPolicy::SetUnknown(REFGUID aGuidKey, 181 IUnknown* aUnknown) { 182 return E_NOTIMPL; 183 } 184 185 STDMETHODIMP WMFClearKeyOutputPolicy::LockStore() { return E_NOTIMPL; } 186 187 STDMETHODIMP WMFClearKeyOutputPolicy::UnlockStore() { return E_NOTIMPL; } 188 189 STDMETHODIMP WMFClearKeyOutputPolicy::GetCount(UINT32* aPcItems) { 190 return E_NOTIMPL; 191 } 192 193 STDMETHODIMP WMFClearKeyOutputPolicy::GetItemByIndex(UINT32 aIndex, 194 GUID* aGuidKey, 195 PROPVARIANT* aValue) { 196 return E_NOTIMPL; 197 } 198 199 STDMETHODIMP WMFClearKeyOutputPolicy::CopyAllItems(IMFAttributes* aDest) { 200 return E_NOTIMPL; 201 } 202 203 } // namespace mozilla