1 /* GStreamer 2 * Copyright (C) 2020 Seungha Yang <seungha.yang@navercorp.com> 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Library General Public 6 * License as published by the Free Software Foundation; either 7 * version 2 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Library General Public License for more details. 13 * 14 * You should have received a copy of the GNU Library General Public 15 * License along with this library; if not, write to the 16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 17 * Boston, MA 02110-1301, USA. 18 */ 19 20 #ifndef __GST_STRMIF_H__ 21 #define __GST_STRMIF_H__ 22 23 #include <strmif.h> 24 25 /* From strmif.h. 26 * ICodecAPI interface will not be exposed 27 * for the !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) case 28 * but MSDN said the interface should be available on both 29 * desktop and UWP cases */ 30 #ifndef __ICodecAPI_INTERFACE_DEFINED__ 31 #define __ICodecAPI_INTERFACE_DEFINED__ 32 33 /* interface ICodecAPI */ 34 /* [unique][uuid][object][local] */ 35 36 37 EXTERN_C const IID IID_ICodecAPI; 38 39 #if defined(__cplusplus) && !defined(CINTERFACE) 40 41 MIDL_INTERFACE("901db4c7-31ce-41a2-85dc-8fa0bf41b8da") 42 ICodecAPI : public IUnknown 43 { 44 public: 45 virtual HRESULT STDMETHODCALLTYPE IsSupported( 46 /* [in] */ const GUID *Api) = 0; 47 48 virtual HRESULT STDMETHODCALLTYPE IsModifiable( 49 /* [in] */ const GUID *Api) = 0; 50 51 virtual HRESULT STDMETHODCALLTYPE GetParameterRange( 52 /* [in] */ const GUID *Api, 53 /* [annotation][out] */ 54 _Out_ VARIANT *ValueMin, 55 /* [annotation][out] */ 56 _Out_ VARIANT *ValueMax, 57 /* [annotation][out] */ 58 _Out_ VARIANT *SteppingDelta) = 0; 59 60 virtual HRESULT STDMETHODCALLTYPE GetParameterValues( 61 /* [in] */ const GUID *Api, 62 /* [annotation][size_is][size_is][out] */ 63 _Outptr_result_buffer_all_(*ValuesCount) VARIANT **Values, 64 /* [annotation][out] */ 65 _Out_ ULONG *ValuesCount) = 0; 66 67 virtual HRESULT STDMETHODCALLTYPE GetDefaultValue( 68 /* [in] */ const GUID *Api, 69 /* [annotation][out] */ 70 _Out_ VARIANT *Value) = 0; 71 72 virtual HRESULT STDMETHODCALLTYPE GetValue( 73 /* [in] */ const GUID *Api, 74 /* [annotation][out] */ 75 _Out_ VARIANT *Value) = 0; 76 77 virtual HRESULT STDMETHODCALLTYPE SetValue( 78 /* [in] */ const GUID *Api, 79 /* [annotation][in] */ 80 _In_ VARIANT *Value) = 0; 81 82 virtual HRESULT STDMETHODCALLTYPE RegisterForEvent( 83 /* [in] */ const GUID *Api, 84 /* [in] */ LONG_PTR userData) = 0; 85 86 virtual HRESULT STDMETHODCALLTYPE UnregisterForEvent( 87 /* [in] */ const GUID *Api) = 0; 88 89 virtual HRESULT STDMETHODCALLTYPE SetAllDefaults( void) = 0; 90 91 virtual HRESULT STDMETHODCALLTYPE SetValueWithNotify( 92 /* [in] */ const GUID *Api, 93 /* [in] */ VARIANT *Value, 94 /* [annotation][size_is][size_is][out] */ 95 _Outptr_result_buffer_all_(*ChangedParamCount) GUID **ChangedParam, 96 /* [annotation][out] */ 97 _Out_ ULONG *ChangedParamCount) = 0; 98 99 virtual HRESULT STDMETHODCALLTYPE SetAllDefaultsWithNotify( 100 /* [annotation][size_is][size_is][out] */ 101 _Outptr_result_buffer_all_(*ChangedParamCount) GUID **ChangedParam, 102 /* [annotation][out] */ 103 _Out_ ULONG *ChangedParamCount) = 0; 104 105 virtual HRESULT STDMETHODCALLTYPE GetAllSettings( 106 /* [in] */ IStream *__MIDL__ICodecAPI0000) = 0; 107 108 virtual HRESULT STDMETHODCALLTYPE SetAllSettings( 109 /* [in] */ IStream *__MIDL__ICodecAPI0001) = 0; 110 111 virtual HRESULT STDMETHODCALLTYPE SetAllSettingsWithNotify( 112 IStream *__MIDL__ICodecAPI0002, 113 /* [annotation][size_is][size_is][out] */ 114 _Outptr_result_buffer_all_(*ChangedParamCount) GUID **ChangedParam, 115 /* [annotation][out] */ 116 _Out_ ULONG *ChangedParamCount) = 0; 117 118 }; 119 120 121 #else /* C style interface */ 122 123 typedef struct ICodecAPIVtbl 124 { 125 BEGIN_INTERFACE 126 127 HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 128 ICodecAPI * This, 129 /* [in] */ REFIID riid, 130 /* [annotation][iid_is][out] */ 131 _COM_Outptr_ void **ppvObject); 132 133 ULONG ( STDMETHODCALLTYPE *AddRef )( 134 ICodecAPI * This); 135 136 ULONG ( STDMETHODCALLTYPE *Release )( 137 ICodecAPI * This); 138 139 HRESULT ( STDMETHODCALLTYPE *IsSupported )( 140 ICodecAPI * This, 141 /* [in] */ const GUID *Api); 142 143 HRESULT ( STDMETHODCALLTYPE *IsModifiable )( 144 ICodecAPI * This, 145 /* [in] */ const GUID *Api); 146 147 HRESULT ( STDMETHODCALLTYPE *GetParameterRange )( 148 ICodecAPI * This, 149 /* [in] */ const GUID *Api, 150 /* [annotation][out] */ 151 _Out_ VARIANT *ValueMin, 152 /* [annotation][out] */ 153 _Out_ VARIANT *ValueMax, 154 /* [annotation][out] */ 155 _Out_ VARIANT *SteppingDelta); 156 157 HRESULT ( STDMETHODCALLTYPE *GetParameterValues )( 158 ICodecAPI * This, 159 /* [in] */ const GUID *Api, 160 /* [annotation][size_is][size_is][out] */ 161 _Outptr_result_buffer_all_(*ValuesCount) VARIANT **Values, 162 /* [annotation][out] */ 163 _Out_ ULONG *ValuesCount); 164 165 HRESULT ( STDMETHODCALLTYPE *GetDefaultValue )( 166 ICodecAPI * This, 167 /* [in] */ const GUID *Api, 168 /* [annotation][out] */ 169 _Out_ VARIANT *Value); 170 171 HRESULT ( STDMETHODCALLTYPE *GetValue )( 172 ICodecAPI * This, 173 /* [in] */ const GUID *Api, 174 /* [annotation][out] */ 175 _Out_ VARIANT *Value); 176 177 HRESULT ( STDMETHODCALLTYPE *SetValue )( 178 ICodecAPI * This, 179 /* [in] */ const GUID *Api, 180 /* [annotation][in] */ 181 _In_ VARIANT *Value); 182 183 HRESULT ( STDMETHODCALLTYPE *RegisterForEvent )( 184 ICodecAPI * This, 185 /* [in] */ const GUID *Api, 186 /* [in] */ LONG_PTR userData); 187 188 HRESULT ( STDMETHODCALLTYPE *UnregisterForEvent )( 189 ICodecAPI * This, 190 /* [in] */ const GUID *Api); 191 192 HRESULT ( STDMETHODCALLTYPE *SetAllDefaults )( 193 ICodecAPI * This); 194 195 HRESULT ( STDMETHODCALLTYPE *SetValueWithNotify )( 196 ICodecAPI * This, 197 /* [in] */ const GUID *Api, 198 /* [in] */ VARIANT *Value, 199 /* [annotation][size_is][size_is][out] */ 200 _Outptr_result_buffer_all_(*ChangedParamCount) GUID **ChangedParam, 201 /* [annotation][out] */ 202 _Out_ ULONG *ChangedParamCount); 203 204 HRESULT ( STDMETHODCALLTYPE *SetAllDefaultsWithNotify )( 205 ICodecAPI * This, 206 /* [annotation][size_is][size_is][out] */ 207 _Outptr_result_buffer_all_(*ChangedParamCount) GUID **ChangedParam, 208 /* [annotation][out] */ 209 _Out_ ULONG *ChangedParamCount); 210 211 HRESULT ( STDMETHODCALLTYPE *GetAllSettings )( 212 ICodecAPI * This, 213 /* [in] */ IStream *__MIDL__ICodecAPI0000); 214 215 HRESULT ( STDMETHODCALLTYPE *SetAllSettings )( 216 ICodecAPI * This, 217 /* [in] */ IStream *__MIDL__ICodecAPI0001); 218 219 HRESULT ( STDMETHODCALLTYPE *SetAllSettingsWithNotify )( 220 ICodecAPI * This, 221 IStream *__MIDL__ICodecAPI0002, 222 /* [annotation][size_is][size_is][out] */ 223 _Outptr_result_buffer_all_(*ChangedParamCount) GUID **ChangedParam, 224 /* [annotation][out] */ 225 _Out_ ULONG *ChangedParamCount); 226 227 END_INTERFACE 228 } ICodecAPIVtbl; 229 230 interface ICodecAPI 231 { 232 CONST_VTBL struct ICodecAPIVtbl *lpVtbl; 233 }; 234 235 236 237 #ifdef COBJMACROS 238 239 240 #define ICodecAPI_QueryInterface(This,riid,ppvObject) \ 241 ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 242 243 #define ICodecAPI_AddRef(This) \ 244 ( (This)->lpVtbl -> AddRef(This) ) 245 246 #define ICodecAPI_Release(This) \ 247 ( (This)->lpVtbl -> Release(This) ) 248 249 250 #define ICodecAPI_IsSupported(This,Api) \ 251 ( (This)->lpVtbl -> IsSupported(This,Api) ) 252 253 #define ICodecAPI_IsModifiable(This,Api) \ 254 ( (This)->lpVtbl -> IsModifiable(This,Api) ) 255 256 #define ICodecAPI_GetParameterRange(This,Api,ValueMin,ValueMax,SteppingDelta) \ 257 ( (This)->lpVtbl -> GetParameterRange(This,Api,ValueMin,ValueMax,SteppingDelta) ) 258 259 #define ICodecAPI_GetParameterValues(This,Api,Values,ValuesCount) \ 260 ( (This)->lpVtbl -> GetParameterValues(This,Api,Values,ValuesCount) ) 261 262 #define ICodecAPI_GetDefaultValue(This,Api,Value) \ 263 ( (This)->lpVtbl -> GetDefaultValue(This,Api,Value) ) 264 265 #define ICodecAPI_GetValue(This,Api,Value) \ 266 ( (This)->lpVtbl -> GetValue(This,Api,Value) ) 267 268 #define ICodecAPI_SetValue(This,Api,Value) \ 269 ( (This)->lpVtbl -> SetValue(This,Api,Value) ) 270 271 #define ICodecAPI_RegisterForEvent(This,Api,userData) \ 272 ( (This)->lpVtbl -> RegisterForEvent(This,Api,userData) ) 273 274 #define ICodecAPI_UnregisterForEvent(This,Api) \ 275 ( (This)->lpVtbl -> UnregisterForEvent(This,Api) ) 276 277 #define ICodecAPI_SetAllDefaults(This) \ 278 ( (This)->lpVtbl -> SetAllDefaults(This) ) 279 280 #define ICodecAPI_SetValueWithNotify(This,Api,Value,ChangedParam,ChangedParamCount) \ 281 ( (This)->lpVtbl -> SetValueWithNotify(This,Api,Value,ChangedParam,ChangedParamCount) ) 282 283 #define ICodecAPI_SetAllDefaultsWithNotify(This,ChangedParam,ChangedParamCount) \ 284 ( (This)->lpVtbl -> SetAllDefaultsWithNotify(This,ChangedParam,ChangedParamCount) ) 285 286 #define ICodecAPI_GetAllSettings(This,__MIDL__ICodecAPI0000) \ 287 ( (This)->lpVtbl -> GetAllSettings(This,__MIDL__ICodecAPI0000) ) 288 289 #define ICodecAPI_SetAllSettings(This,__MIDL__ICodecAPI0001) \ 290 ( (This)->lpVtbl -> SetAllSettings(This,__MIDL__ICodecAPI0001) ) 291 292 #define ICodecAPI_SetAllSettingsWithNotify(This,__MIDL__ICodecAPI0002,ChangedParam,ChangedParamCount) \ 293 ( (This)->lpVtbl -> SetAllSettingsWithNotify(This,__MIDL__ICodecAPI0002,ChangedParam,ChangedParamCount) ) 294 295 #endif /* COBJMACROS */ 296 297 298 #endif /* C style interface */ 299 300 301 302 303 #endif /* __ICodecAPI_INTERFACE_DEFINED__ */ 304 305 #endif /* __GST_STRMIF_H__ */