1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
media / cdm / win / test / media_foundation_clear_key_activate.cc [blame]
// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/cdm/win/test/media_foundation_clear_key_activate.h"
#include <wrl/client.h>
#include <wrl/implements.h>
#include "base/logging.h"
#include "base/notreached.h"
#include "media/base/win/mf_helpers.h"
#include "media/cdm/win/test/media_foundation_clear_key_content_enabler.h"
namespace media {
using Microsoft::WRL::ComPtr;
using Microsoft::WRL::MakeAndInitialize;
MediaFoundationClearKeyActivate::MediaFoundationClearKeyActivate() = default;
MediaFoundationClearKeyActivate::~MediaFoundationClearKeyActivate() {
DVLOG_FUNC(1);
}
HRESULT MediaFoundationClearKeyActivate::RuntimeClassInitialize() {
DVLOG_FUNC(1);
return S_OK;
}
STDMETHODIMP MediaFoundationClearKeyActivate::ActivateObject(
_In_ REFIID riid,
_COM_Outptr_ void** ppv) {
DVLOG_FUNC(1);
*ppv = nullptr;
ComPtr<IMFContentEnabler> content_enabler;
RETURN_IF_FAILED(MakeAndInitialize<MediaFoundationClearKeyContentEnabler>(
&content_enabler));
RETURN_IF_FAILED(content_enabler.CopyTo(riid, ppv));
return S_OK;
}
STDMETHODIMP MediaFoundationClearKeyActivate::ShutdownObject() {
DVLOG_FUNC(3);
// API not used.
NOTIMPLEMENTED();
return E_NOTIMPL;
}
STDMETHODIMP MediaFoundationClearKeyActivate::DetachObject() {
DVLOG_FUNC(3);
// API not used.
NOTIMPLEMENTED();
return E_NOTIMPL;
}
// IMFAttributes inherited by IMFActivate
STDMETHODIMP MediaFoundationClearKeyActivate::GetItem(
__RPC__in REFGUID guidKey,
__RPC__inout_opt PROPVARIANT* pValue) {
NOTIMPLEMENTED();
return E_NOTIMPL;
}
STDMETHODIMP MediaFoundationClearKeyActivate::GetItemType(
__RPC__in REFGUID guidKey,
__RPC__out MF_ATTRIBUTE_TYPE* pType) {
NOTIMPLEMENTED();
return E_NOTIMPL;
}
STDMETHODIMP MediaFoundationClearKeyActivate::CompareItem(
__RPC__in REFGUID guidKey,
__RPC__in REFPROPVARIANT Value,
__RPC__out BOOL* pbResult) {
NOTIMPLEMENTED();
return E_NOTIMPL;
}
STDMETHODIMP MediaFoundationClearKeyActivate::Compare(
__RPC__in_opt IMFAttributes* pTheirs,
MF_ATTRIBUTES_MATCH_TYPE MatchType,
__RPC__out BOOL* pbResult) {
NOTIMPLEMENTED();
return E_NOTIMPL;
}
STDMETHODIMP MediaFoundationClearKeyActivate::GetUINT32(
__RPC__in REFGUID guidKey,
__RPC__out UINT32* punValue) {
NOTIMPLEMENTED();
return E_NOTIMPL;
}
STDMETHODIMP MediaFoundationClearKeyActivate::GetUINT64(
__RPC__in REFGUID guidKey,
__RPC__out UINT64* punValue) {
NOTIMPLEMENTED();
return E_NOTIMPL;
}
STDMETHODIMP MediaFoundationClearKeyActivate::GetDouble(
__RPC__in REFGUID guidKey,
__RPC__out double* pfValue) {
NOTIMPLEMENTED();
return E_NOTIMPL;
}
STDMETHODIMP MediaFoundationClearKeyActivate::GetGUID(
__RPC__in REFGUID guidKey,
__RPC__out GUID* pguidValue) {
NOTIMPLEMENTED();
return E_NOTIMPL;
}
STDMETHODIMP MediaFoundationClearKeyActivate::GetStringLength(
__RPC__in REFGUID guidKey,
__RPC__out UINT32* pcchLength) {
NOTIMPLEMENTED();
return E_NOTIMPL;
}
STDMETHODIMP MediaFoundationClearKeyActivate::GetString(
__RPC__in REFGUID guidKey,
__RPC__out_ecount_full(cchBufSize) LPWSTR pwszValue,
UINT32 cchBufSize,
__RPC__inout_opt UINT32* pcchLength) {
NOTIMPLEMENTED();
return E_NOTIMPL;
}
STDMETHODIMP MediaFoundationClearKeyActivate::GetAllocatedString(
__RPC__in REFGUID guidKey,
__RPC__deref_out_ecount_full_opt((*pcchLength + 1)) LPWSTR* ppwszValue,
__RPC__out UINT32* pcchLength) {
NOTIMPLEMENTED();
return E_NOTIMPL;
}
STDMETHODIMP MediaFoundationClearKeyActivate::GetBlobSize(
__RPC__in REFGUID guidKey,
__RPC__out UINT32* pcbBlobSize) {
NOTIMPLEMENTED();
return E_NOTIMPL;
}
STDMETHODIMP MediaFoundationClearKeyActivate::GetBlob(
__RPC__in REFGUID guidKey,
__RPC__out_ecount_full(cbBufSize) UINT8* pBuf,
UINT32 cbBufSize,
__RPC__inout_opt UINT32* pcbBlobSize) {
NOTIMPLEMENTED();
return E_NOTIMPL;
}
STDMETHODIMP MediaFoundationClearKeyActivate::GetAllocatedBlob(
__RPC__in REFGUID guidKey,
__RPC__deref_out_ecount_full_opt(*pcbSize) UINT8** ppBuf,
__RPC__out UINT32* pcbSize) {
NOTIMPLEMENTED();
return E_NOTIMPL;
}
STDMETHODIMP MediaFoundationClearKeyActivate::GetUnknown(
__RPC__in REFGUID guidKey,
__RPC__in REFIID riid,
__RPC__deref_out_opt LPVOID* ppv) {
NOTIMPLEMENTED();
return E_NOTIMPL;
}
STDMETHODIMP MediaFoundationClearKeyActivate::SetItem(__RPC__in REFGUID guidKey,
__RPC__in REFPROPVARIANT
Value) {
NOTIMPLEMENTED();
return E_NOTIMPL;
}
STDMETHODIMP MediaFoundationClearKeyActivate::DeleteItem(
__RPC__in REFGUID guidKey) {
NOTIMPLEMENTED();
return E_NOTIMPL;
}
STDMETHODIMP MediaFoundationClearKeyActivate::DeleteAllItems() {
NOTIMPLEMENTED();
return E_NOTIMPL;
}
STDMETHODIMP MediaFoundationClearKeyActivate::SetUINT32(__RPC__in REFGUID
guidKey,
UINT32 unValue) {
NOTIMPLEMENTED();
return E_NOTIMPL;
}
STDMETHODIMP MediaFoundationClearKeyActivate::SetUINT64(__RPC__in REFGUID
guidKey,
UINT64 unValue) {
NOTIMPLEMENTED();
return E_NOTIMPL;
}
STDMETHODIMP MediaFoundationClearKeyActivate::SetDouble(__RPC__in REFGUID
guidKey,
double fValue) {
NOTIMPLEMENTED();
return E_NOTIMPL;
}
STDMETHODIMP MediaFoundationClearKeyActivate::SetGUID(__RPC__in REFGUID guidKey,
__RPC__in REFGUID
guidValue) {
NOTIMPLEMENTED();
return E_NOTIMPL;
}
STDMETHODIMP MediaFoundationClearKeyActivate::SetString(
__RPC__in REFGUID guidKey,
__RPC__in_string LPCWSTR wszValue) {
NOTIMPLEMENTED();
return E_NOTIMPL;
}
STDMETHODIMP MediaFoundationClearKeyActivate::SetBlob(
__RPC__in REFGUID guidKey,
__RPC__in_ecount_full(cbBufSize) const UINT8* pBuf,
UINT32 cbBufSize) {
NOTIMPLEMENTED();
return E_NOTIMPL;
}
STDMETHODIMP MediaFoundationClearKeyActivate::SetUnknown(
__RPC__in REFGUID guidKey,
__RPC__in_opt IUnknown* pUnknown) {
NOTIMPLEMENTED();
return E_NOTIMPL;
}
STDMETHODIMP MediaFoundationClearKeyActivate::LockStore() {
NOTIMPLEMENTED();
return E_NOTIMPL;
}
STDMETHODIMP MediaFoundationClearKeyActivate::UnlockStore() {
NOTIMPLEMENTED();
return E_NOTIMPL;
}
STDMETHODIMP MediaFoundationClearKeyActivate::GetCount(
__RPC__out UINT32* pcItems) {
NOTIMPLEMENTED();
return E_NOTIMPL;
}
STDMETHODIMP MediaFoundationClearKeyActivate::GetItemByIndex(
UINT32 unIndex,
__RPC__out GUID* pguidKey,
__RPC__inout_opt PROPVARIANT* pValue) {
NOTIMPLEMENTED();
return E_NOTIMPL;
}
STDMETHODIMP MediaFoundationClearKeyActivate::CopyAllItems(
__RPC__in_opt IMFAttributes* pDest) {
NOTIMPLEMENTED();
return E_NOTIMPL;
}
} // namespace media