1 /*** Autogenerated by WIDL 1.6 from include/mfreadwrite.idl - Do not edit ***/ 2 3 #ifndef __REQUIRED_RPCNDR_H_VERSION__ 4 #define __REQUIRED_RPCNDR_H_VERSION__ 475 5 #endif 6 7 #include <rpc.h> 8 #include <rpcndr.h> 9 10 #ifndef COM_NO_WINDOWS_H 11 #include <windows.h> 12 #include <ole2.h> 13 #endif 14 15 #ifndef __mfreadwrite_h__ 16 #define __mfreadwrite_h__ 17 18 /* Forward declarations */ 19 20 #ifndef __IMFSourceReader_FWD_DEFINED__ 21 #define __IMFSourceReader_FWD_DEFINED__ 22 typedef interface IMFSourceReader IMFSourceReader; 23 #endif 24 25 #ifndef __IMFSinkWriter_FWD_DEFINED__ 26 #define __IMFSinkWriter_FWD_DEFINED__ 27 typedef interface IMFSinkWriter IMFSinkWriter; 28 #endif 29 30 #ifndef __IMFSourceReaderCallback_FWD_DEFINED__ 31 #define __IMFSourceReaderCallback_FWD_DEFINED__ 32 typedef interface IMFSourceReaderCallback IMFSourceReaderCallback; 33 #endif 34 35 /* Headers for imported files */ 36 37 #include <mfobjects.h> 38 39 #ifdef __cplusplus 40 extern "C" { 41 #endif 42 43 EXTERN_GUID(MF_SOURCE_READER_ASYNC_CALLBACK, 0x1e3dbeac,0xbb43,0x4c35,0xb5,0x07,0xcd,0x64,0x44,0x64,0xc9,0x65); 44 EXTERN_GUID(MF_SOURCE_READER_D3D_MANAGER, 0xec822da2,0xe1e9,0x4b29,0xa0,0xd8,0x56,0x3c,0x71,0x9f,0x52,0x69); 45 EXTERN_GUID(MF_SOURCE_READER_DISABLE_DXVA, 0xaa456cfd,0x3943,0x4a1e,0xa7,0x7d,0x18,0x38,0xc0,0xea,0x2e,0x35); 46 EXTERN_GUID(MF_SOURCE_READER_MEDIASOURCE_CONFIG, 0x9085abeb,0x0354,0x48f9,0xab,0xb5,0x20,0x0d,0xf8,0x38,0xc6,0x8e); 47 EXTERN_GUID(MF_SOURCE_READER_MEDIASOURCE_CHARACTERISTICS, 0x6d23f5c8,0xc5d7,0x4a9b,0x99,0x71,0x5d,0x11,0xf8,0xbc,0xa8,0x80); 48 EXTERN_GUID(MF_SOURCE_READER_ENABLE_VIDEO_PROCESSING, 0xfb394f3d,0xccf1,0x42ee,0xbb,0xb3,0xf9,0xb8,0x45,0xd5,0x68,0x1d); 49 EXTERN_GUID(MF_SOURCE_READER_DISCONNECT_MEDIASOURCE_ON_SHUTDOWN, 0x56b67165,0x219e,0x456d,0xa2,0x2e,0x2d,0x30,0x04,0xc7,0xfe,0x56); 50 typedef enum MF_SOURCE_READER_FLAG { 51 MF_SOURCE_READERF_ERROR = 0x1, 52 MF_SOURCE_READERF_ENDOFSTREAM = 0x2, 53 MF_SOURCE_READERF_NEWSTREAM = 0x4, 54 MF_SOURCE_READERF_NATIVEMEDIATYPECHANGED = 0x10, 55 MF_SOURCE_READERF_CURRENTMEDIATYPECHANGED = 0x20, 56 MF_SOURCE_READERF_STREAMTICK = 0x100 57 } MF_SOURCE_READER_FLAG; 58 typedef struct _MF_SINK_WRITER_STATISTICS { 59 DWORD cb; 60 LONGLONG llLastTimestampReceived; 61 LONGLONG llLastTimestampEncoded; 62 LONGLONG llLastTimestampProcessed; 63 LONGLONG llLastStreamTickReceived; 64 LONGLONG llLastSinkSampleRequest; 65 QWORD qwNumSamplesReceived; 66 QWORD qwNumSamplesEncoded; 67 QWORD qwNumSamplesProcessed; 68 QWORD qwNumStreamTicksReceived; 69 DWORD dwByteCountQueued; 70 QWORD qwByteCountProcessed; 71 DWORD dwNumOutstandingSinkSampleRequests; 72 DWORD dwAverageSampleRateReceived; 73 DWORD dwAverageSampleRateEncoded; 74 DWORD dwAverageSampleRateProcessed; 75 } MF_SINK_WRITER_STATISTICS; 76 enum { 77 MF_SOURCE_READER_INVALID_STREAM_INDEX = 0xffffffff, 78 MF_SOURCE_READER_ALL_STREAMS = 0xfffffffe, 79 MF_SOURCE_READER_ANY_STREAM = 0xfffffffe, 80 MF_SOURCE_READER_FIRST_AUDIO_STREAM = 0xfffffffd, 81 MF_SOURCE_READER_FIRST_VIDEO_STREAM = 0xfffffffc, 82 MF_SOURCE_READER_MEDIASOURCE = 0xffffffff 83 }; 84 85 /***************************************************************************** 86 * IMFSourceReader interface 87 */ 88 #ifndef __IMFSourceReader_INTERFACE_DEFINED__ 89 #define __IMFSourceReader_INTERFACE_DEFINED__ 90 91 DEFINE_GUID(IID_IMFSourceReader, 0x70ae66f2, 0xc809, 0x4e4f, 0x89,0x15, 0xbd,0xcb,0x40,0x6b,0x79,0x93); 92 #if defined(__cplusplus) && !defined(CINTERFACE) 93 MIDL_INTERFACE("70ae66f2-c809-4e4f-8915-bdcb406b7993") 94 IMFSourceReader : public IUnknown 95 { 96 virtual HRESULT STDMETHODCALLTYPE GetStreamSelection( 97 DWORD dwStreamIndex, 98 WINBOOL *pfSelected) = 0; 99 100 virtual HRESULT STDMETHODCALLTYPE SetStreamSelection( 101 DWORD dwStreamIndex, 102 WINBOOL fSelected) = 0; 103 104 virtual HRESULT STDMETHODCALLTYPE GetNativeMediaType( 105 DWORD dwStreamIndex, 106 DWORD dwMediaTypeIndex, 107 IMFMediaType **ppMediaType) = 0; 108 109 virtual HRESULT STDMETHODCALLTYPE GetCurrentMediaType( 110 DWORD dwStreamIndex, 111 IMFMediaType **ppMediaType) = 0; 112 113 virtual HRESULT STDMETHODCALLTYPE SetCurrentMediaType( 114 DWORD dwStreamIndex, 115 DWORD *pdwReserved, 116 IMFMediaType *pMediaType) = 0; 117 118 virtual HRESULT STDMETHODCALLTYPE SetCurrentPosition( 119 REFGUID guidTimeFormat, 120 REFPROPVARIANT varPosition) = 0; 121 122 virtual HRESULT STDMETHODCALLTYPE ReadSample( 123 DWORD dwStreamIndex, 124 DWORD dwControlFlags, 125 DWORD *pdwActualStreamIndex, 126 DWORD *pdwStreamFlags, 127 LONGLONG *pllTimestamp, 128 IMFSample **ppSample) = 0; 129 130 virtual HRESULT STDMETHODCALLTYPE Flush( 131 DWORD dwStreamIndex) = 0; 132 133 virtual HRESULT STDMETHODCALLTYPE GetServiceForStream( 134 DWORD dwStreamIndex, 135 REFGUID guidService, 136 REFIID riid, 137 LPVOID *ppvObject) = 0; 138 139 virtual HRESULT STDMETHODCALLTYPE GetPresentationAttribute( 140 DWORD dwStreamIndex, 141 REFGUID guidAttribute, 142 PROPVARIANT *pvarAttribute) = 0; 143 144 }; 145 #ifdef __CRT_UUID_DECL 146 __CRT_UUID_DECL(IMFSourceReader, 0x70ae66f2, 0xc809, 0x4e4f, 0x89,0x15, 0xbd,0xcb,0x40,0x6b,0x79,0x93) 147 #endif 148 #else 149 typedef struct IMFSourceReaderVtbl { 150 BEGIN_INTERFACE 151 152 /*** IUnknown methods ***/ 153 HRESULT (STDMETHODCALLTYPE *QueryInterface)( 154 IMFSourceReader* This, 155 REFIID riid, 156 void **ppvObject); 157 158 ULONG (STDMETHODCALLTYPE *AddRef)( 159 IMFSourceReader* This); 160 161 ULONG (STDMETHODCALLTYPE *Release)( 162 IMFSourceReader* This); 163 164 /*** IMFSourceReader methods ***/ 165 HRESULT (STDMETHODCALLTYPE *GetStreamSelection)( 166 IMFSourceReader* This, 167 DWORD dwStreamIndex, 168 WINBOOL *pfSelected); 169 170 HRESULT (STDMETHODCALLTYPE *SetStreamSelection)( 171 IMFSourceReader* This, 172 DWORD dwStreamIndex, 173 WINBOOL fSelected); 174 175 HRESULT (STDMETHODCALLTYPE *GetNativeMediaType)( 176 IMFSourceReader* This, 177 DWORD dwStreamIndex, 178 DWORD dwMediaTypeIndex, 179 IMFMediaType **ppMediaType); 180 181 HRESULT (STDMETHODCALLTYPE *GetCurrentMediaType)( 182 IMFSourceReader* This, 183 DWORD dwStreamIndex, 184 IMFMediaType **ppMediaType); 185 186 HRESULT (STDMETHODCALLTYPE *SetCurrentMediaType)( 187 IMFSourceReader* This, 188 DWORD dwStreamIndex, 189 DWORD *pdwReserved, 190 IMFMediaType *pMediaType); 191 192 HRESULT (STDMETHODCALLTYPE *SetCurrentPosition)( 193 IMFSourceReader* This, 194 REFGUID guidTimeFormat, 195 REFPROPVARIANT varPosition); 196 197 HRESULT (STDMETHODCALLTYPE *ReadSample)( 198 IMFSourceReader* This, 199 DWORD dwStreamIndex, 200 DWORD dwControlFlags, 201 DWORD *pdwActualStreamIndex, 202 DWORD *pdwStreamFlags, 203 LONGLONG *pllTimestamp, 204 IMFSample **ppSample); 205 206 HRESULT (STDMETHODCALLTYPE *Flush)( 207 IMFSourceReader* This, 208 DWORD dwStreamIndex); 209 210 HRESULT (STDMETHODCALLTYPE *GetServiceForStream)( 211 IMFSourceReader* This, 212 DWORD dwStreamIndex, 213 REFGUID guidService, 214 REFIID riid, 215 LPVOID *ppvObject); 216 217 HRESULT (STDMETHODCALLTYPE *GetPresentationAttribute)( 218 IMFSourceReader* This, 219 DWORD dwStreamIndex, 220 REFGUID guidAttribute, 221 PROPVARIANT *pvarAttribute); 222 223 END_INTERFACE 224 } IMFSourceReaderVtbl; 225 interface IMFSourceReader { 226 CONST_VTBL IMFSourceReaderVtbl* lpVtbl; 227 }; 228 229 #ifdef COBJMACROS 230 #ifndef WIDL_C_INLINE_WRAPPERS 231 /*** IUnknown methods ***/ 232 #define IMFSourceReader_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) 233 #define IMFSourceReader_AddRef(This) (This)->lpVtbl->AddRef(This) 234 #define IMFSourceReader_Release(This) (This)->lpVtbl->Release(This) 235 /*** IMFSourceReader methods ***/ 236 #define IMFSourceReader_GetStreamSelection(This,dwStreamIndex,pfSelected) (This)->lpVtbl->GetStreamSelection(This,dwStreamIndex,pfSelected) 237 #define IMFSourceReader_SetStreamSelection(This,dwStreamIndex,fSelected) (This)->lpVtbl->SetStreamSelection(This,dwStreamIndex,fSelected) 238 #define IMFSourceReader_GetNativeMediaType(This,dwStreamIndex,dwMediaTypeIndex,ppMediaType) (This)->lpVtbl->GetNativeMediaType(This,dwStreamIndex,dwMediaTypeIndex,ppMediaType) 239 #define IMFSourceReader_GetCurrentMediaType(This,dwStreamIndex,ppMediaType) (This)->lpVtbl->GetCurrentMediaType(This,dwStreamIndex,ppMediaType) 240 #define IMFSourceReader_SetCurrentMediaType(This,dwStreamIndex,pdwReserved,pMediaType) (This)->lpVtbl->SetCurrentMediaType(This,dwStreamIndex,pdwReserved,pMediaType) 241 #define IMFSourceReader_SetCurrentPosition(This,guidTimeFormat,varPosition) (This)->lpVtbl->SetCurrentPosition(This,guidTimeFormat,varPosition) 242 #define IMFSourceReader_ReadSample(This,dwStreamIndex,dwControlFlags,pdwActualStreamIndex,pdwStreamFlags,pllTimestamp,ppSample) (This)->lpVtbl->ReadSample(This,dwStreamIndex,dwControlFlags,pdwActualStreamIndex,pdwStreamFlags,pllTimestamp,ppSample) 243 #define IMFSourceReader_Flush(This,dwStreamIndex) (This)->lpVtbl->Flush(This,dwStreamIndex) 244 #define IMFSourceReader_GetServiceForStream(This,dwStreamIndex,guidService,riid,ppvObject) (This)->lpVtbl->GetServiceForStream(This,dwStreamIndex,guidService,riid,ppvObject) 245 #define IMFSourceReader_GetPresentationAttribute(This,dwStreamIndex,guidAttribute,pvarAttribute) (This)->lpVtbl->GetPresentationAttribute(This,dwStreamIndex,guidAttribute,pvarAttribute) 246 #else 247 /*** IUnknown methods ***/ 248 static FORCEINLINE HRESULT IMFSourceReader_QueryInterface(IMFSourceReader* This,REFIID riid,void **ppvObject) { 249 return This->lpVtbl->QueryInterface(This,riid,ppvObject); 250 } 251 static FORCEINLINE ULONG IMFSourceReader_AddRef(IMFSourceReader* This) { 252 return This->lpVtbl->AddRef(This); 253 } 254 static FORCEINLINE ULONG IMFSourceReader_Release(IMFSourceReader* This) { 255 return This->lpVtbl->Release(This); 256 } 257 /*** IMFSourceReader methods ***/ 258 static FORCEINLINE HRESULT IMFSourceReader_GetStreamSelection(IMFSourceReader* This,DWORD dwStreamIndex,WINBOOL *pfSelected) { 259 return This->lpVtbl->GetStreamSelection(This,dwStreamIndex,pfSelected); 260 } 261 static FORCEINLINE HRESULT IMFSourceReader_SetStreamSelection(IMFSourceReader* This,DWORD dwStreamIndex,WINBOOL fSelected) { 262 return This->lpVtbl->SetStreamSelection(This,dwStreamIndex,fSelected); 263 } 264 static FORCEINLINE HRESULT IMFSourceReader_GetNativeMediaType(IMFSourceReader* This,DWORD dwStreamIndex,DWORD dwMediaTypeIndex,IMFMediaType **ppMediaType) { 265 return This->lpVtbl->GetNativeMediaType(This,dwStreamIndex,dwMediaTypeIndex,ppMediaType); 266 } 267 static FORCEINLINE HRESULT IMFSourceReader_GetCurrentMediaType(IMFSourceReader* This,DWORD dwStreamIndex,IMFMediaType **ppMediaType) { 268 return This->lpVtbl->GetCurrentMediaType(This,dwStreamIndex,ppMediaType); 269 } 270 static FORCEINLINE HRESULT IMFSourceReader_SetCurrentMediaType(IMFSourceReader* This,DWORD dwStreamIndex,DWORD *pdwReserved,IMFMediaType *pMediaType) { 271 return This->lpVtbl->SetCurrentMediaType(This,dwStreamIndex,pdwReserved,pMediaType); 272 } 273 static FORCEINLINE HRESULT IMFSourceReader_SetCurrentPosition(IMFSourceReader* This,REFGUID guidTimeFormat,REFPROPVARIANT varPosition) { 274 return This->lpVtbl->SetCurrentPosition(This,guidTimeFormat,varPosition); 275 } 276 static FORCEINLINE HRESULT IMFSourceReader_ReadSample(IMFSourceReader* This,DWORD dwStreamIndex,DWORD dwControlFlags,DWORD *pdwActualStreamIndex,DWORD *pdwStreamFlags,LONGLONG *pllTimestamp,IMFSample **ppSample) { 277 return This->lpVtbl->ReadSample(This,dwStreamIndex,dwControlFlags,pdwActualStreamIndex,pdwStreamFlags,pllTimestamp,ppSample); 278 } 279 static FORCEINLINE HRESULT IMFSourceReader_Flush(IMFSourceReader* This,DWORD dwStreamIndex) { 280 return This->lpVtbl->Flush(This,dwStreamIndex); 281 } 282 static FORCEINLINE HRESULT IMFSourceReader_GetServiceForStream(IMFSourceReader* This,DWORD dwStreamIndex,REFGUID guidService,REFIID riid,LPVOID *ppvObject) { 283 return This->lpVtbl->GetServiceForStream(This,dwStreamIndex,guidService,riid,ppvObject); 284 } 285 static FORCEINLINE HRESULT IMFSourceReader_GetPresentationAttribute(IMFSourceReader* This,DWORD dwStreamIndex,REFGUID guidAttribute,PROPVARIANT *pvarAttribute) { 286 return This->lpVtbl->GetPresentationAttribute(This,dwStreamIndex,guidAttribute,pvarAttribute); 287 } 288 #endif 289 #endif 290 291 #endif 292 293 HRESULT STDMETHODCALLTYPE IMFSourceReader_GetStreamSelection_Proxy( 294 IMFSourceReader* This, 295 DWORD dwStreamIndex, 296 WINBOOL *pfSelected); 297 void __RPC_STUB IMFSourceReader_GetStreamSelection_Stub( 298 IRpcStubBuffer* This, 299 IRpcChannelBuffer* pRpcChannelBuffer, 300 PRPC_MESSAGE pRpcMessage, 301 DWORD* pdwStubPhase); 302 HRESULT STDMETHODCALLTYPE IMFSourceReader_SetStreamSelection_Proxy( 303 IMFSourceReader* This, 304 DWORD dwStreamIndex, 305 WINBOOL fSelected); 306 void __RPC_STUB IMFSourceReader_SetStreamSelection_Stub( 307 IRpcStubBuffer* This, 308 IRpcChannelBuffer* pRpcChannelBuffer, 309 PRPC_MESSAGE pRpcMessage, 310 DWORD* pdwStubPhase); 311 HRESULT STDMETHODCALLTYPE IMFSourceReader_GetNativeMediaType_Proxy( 312 IMFSourceReader* This, 313 DWORD dwStreamIndex, 314 DWORD dwMediaTypeIndex, 315 IMFMediaType **ppMediaType); 316 void __RPC_STUB IMFSourceReader_GetNativeMediaType_Stub( 317 IRpcStubBuffer* This, 318 IRpcChannelBuffer* pRpcChannelBuffer, 319 PRPC_MESSAGE pRpcMessage, 320 DWORD* pdwStubPhase); 321 HRESULT STDMETHODCALLTYPE IMFSourceReader_GetCurrentMediaType_Proxy( 322 IMFSourceReader* This, 323 DWORD dwStreamIndex, 324 IMFMediaType **ppMediaType); 325 void __RPC_STUB IMFSourceReader_GetCurrentMediaType_Stub( 326 IRpcStubBuffer* This, 327 IRpcChannelBuffer* pRpcChannelBuffer, 328 PRPC_MESSAGE pRpcMessage, 329 DWORD* pdwStubPhase); 330 HRESULT STDMETHODCALLTYPE IMFSourceReader_SetCurrentMediaType_Proxy( 331 IMFSourceReader* This, 332 DWORD dwStreamIndex, 333 DWORD *pdwReserved, 334 IMFMediaType *pMediaType); 335 void __RPC_STUB IMFSourceReader_SetCurrentMediaType_Stub( 336 IRpcStubBuffer* This, 337 IRpcChannelBuffer* pRpcChannelBuffer, 338 PRPC_MESSAGE pRpcMessage, 339 DWORD* pdwStubPhase); 340 HRESULT STDMETHODCALLTYPE IMFSourceReader_SetCurrentPosition_Proxy( 341 IMFSourceReader* This, 342 REFGUID guidTimeFormat, 343 REFPROPVARIANT varPosition); 344 void __RPC_STUB IMFSourceReader_SetCurrentPosition_Stub( 345 IRpcStubBuffer* This, 346 IRpcChannelBuffer* pRpcChannelBuffer, 347 PRPC_MESSAGE pRpcMessage, 348 DWORD* pdwStubPhase); 349 HRESULT STDMETHODCALLTYPE IMFSourceReader_ReadSample_Proxy( 350 IMFSourceReader* This, 351 DWORD dwStreamIndex, 352 DWORD dwControlFlags, 353 DWORD *pdwActualStreamIndex, 354 DWORD *pdwStreamFlags, 355 LONGLONG *pllTimestamp, 356 IMFSample **ppSample); 357 void __RPC_STUB IMFSourceReader_ReadSample_Stub( 358 IRpcStubBuffer* This, 359 IRpcChannelBuffer* pRpcChannelBuffer, 360 PRPC_MESSAGE pRpcMessage, 361 DWORD* pdwStubPhase); 362 HRESULT STDMETHODCALLTYPE IMFSourceReader_Flush_Proxy( 363 IMFSourceReader* This, 364 DWORD dwStreamIndex); 365 void __RPC_STUB IMFSourceReader_Flush_Stub( 366 IRpcStubBuffer* This, 367 IRpcChannelBuffer* pRpcChannelBuffer, 368 PRPC_MESSAGE pRpcMessage, 369 DWORD* pdwStubPhase); 370 HRESULT STDMETHODCALLTYPE IMFSourceReader_GetServiceForStream_Proxy( 371 IMFSourceReader* This, 372 DWORD dwStreamIndex, 373 REFGUID guidService, 374 REFIID riid, 375 LPVOID *ppvObject); 376 void __RPC_STUB IMFSourceReader_GetServiceForStream_Stub( 377 IRpcStubBuffer* This, 378 IRpcChannelBuffer* pRpcChannelBuffer, 379 PRPC_MESSAGE pRpcMessage, 380 DWORD* pdwStubPhase); 381 HRESULT STDMETHODCALLTYPE IMFSourceReader_GetPresentationAttribute_Proxy( 382 IMFSourceReader* This, 383 DWORD dwStreamIndex, 384 REFGUID guidAttribute, 385 PROPVARIANT *pvarAttribute); 386 void __RPC_STUB IMFSourceReader_GetPresentationAttribute_Stub( 387 IRpcStubBuffer* This, 388 IRpcChannelBuffer* pRpcChannelBuffer, 389 PRPC_MESSAGE pRpcMessage, 390 DWORD* pdwStubPhase); 391 392 #endif /* __IMFSourceReader_INTERFACE_DEFINED__ */ 393 394 /***************************************************************************** 395 * IMFSinkWriter interface 396 */ 397 #ifndef __IMFSinkWriter_INTERFACE_DEFINED__ 398 #define __IMFSinkWriter_INTERFACE_DEFINED__ 399 400 DEFINE_GUID(IID_IMFSinkWriter, 0x3137f1cd, 0xfe5e, 0x4805, 0xa5,0xd8, 0xfb,0x47,0x74,0x48,0xcb,0x3d); 401 #if defined(__cplusplus) && !defined(CINTERFACE) 402 MIDL_INTERFACE("3137f1cd-fe5e-4805-a5d8-fb477448cb3d") 403 IMFSinkWriter : public IUnknown 404 { 405 virtual HRESULT STDMETHODCALLTYPE AddStream( 406 IMFMediaType *pTargetMediaType, 407 DWORD *pdwStreamIndex) = 0; 408 409 virtual HRESULT STDMETHODCALLTYPE SetInputMediaType( 410 DWORD dwStreamIndex, 411 IMFMediaType *pInputMediaType, 412 IMFAttributes *pEncodingParameters) = 0; 413 414 virtual HRESULT STDMETHODCALLTYPE BeginWriting( 415 ) = 0; 416 417 virtual HRESULT STDMETHODCALLTYPE WriteSample( 418 DWORD dwStreamIndex, 419 IMFSample *pSample) = 0; 420 421 virtual HRESULT STDMETHODCALLTYPE SendStreamTick( 422 DWORD dwStreamIndex, 423 LONGLONG llTimestamp) = 0; 424 425 virtual HRESULT STDMETHODCALLTYPE PlaceMarker( 426 DWORD dwStreamIndex, 427 LPVOID pvContext) = 0; 428 429 virtual HRESULT STDMETHODCALLTYPE NotifyEndOfSegment( 430 DWORD dwStreamIndex) = 0; 431 432 virtual HRESULT STDMETHODCALLTYPE Flush( 433 DWORD dwStreamIndex) = 0; 434 435 virtual HRESULT STDMETHODCALLTYPE Finalize( 436 ) = 0; 437 438 virtual HRESULT STDMETHODCALLTYPE GetServiceForStream( 439 DWORD dwStreamIndex, 440 REFGUID guidService, 441 REFIID riid, 442 LPVOID *ppvObject) = 0; 443 444 virtual HRESULT STDMETHODCALLTYPE GetStatistics( 445 DWORD dwStreamIndex, 446 MF_SINK_WRITER_STATISTICS *pStats) = 0; 447 448 }; 449 #ifdef __CRT_UUID_DECL 450 __CRT_UUID_DECL(IMFSinkWriter, 0x3137f1cd, 0xfe5e, 0x4805, 0xa5,0xd8, 0xfb,0x47,0x74,0x48,0xcb,0x3d) 451 #endif 452 #else 453 typedef struct IMFSinkWriterVtbl { 454 BEGIN_INTERFACE 455 456 /*** IUnknown methods ***/ 457 HRESULT (STDMETHODCALLTYPE *QueryInterface)( 458 IMFSinkWriter* This, 459 REFIID riid, 460 void **ppvObject); 461 462 ULONG (STDMETHODCALLTYPE *AddRef)( 463 IMFSinkWriter* This); 464 465 ULONG (STDMETHODCALLTYPE *Release)( 466 IMFSinkWriter* This); 467 468 /*** IMFSinkWriter methods ***/ 469 HRESULT (STDMETHODCALLTYPE *AddStream)( 470 IMFSinkWriter* This, 471 IMFMediaType *pTargetMediaType, 472 DWORD *pdwStreamIndex); 473 474 HRESULT (STDMETHODCALLTYPE *SetInputMediaType)( 475 IMFSinkWriter* This, 476 DWORD dwStreamIndex, 477 IMFMediaType *pInputMediaType, 478 IMFAttributes *pEncodingParameters); 479 480 HRESULT (STDMETHODCALLTYPE *BeginWriting)( 481 IMFSinkWriter* This); 482 483 HRESULT (STDMETHODCALLTYPE *WriteSample)( 484 IMFSinkWriter* This, 485 DWORD dwStreamIndex, 486 IMFSample *pSample); 487 488 HRESULT (STDMETHODCALLTYPE *SendStreamTick)( 489 IMFSinkWriter* This, 490 DWORD dwStreamIndex, 491 LONGLONG llTimestamp); 492 493 HRESULT (STDMETHODCALLTYPE *PlaceMarker)( 494 IMFSinkWriter* This, 495 DWORD dwStreamIndex, 496 LPVOID pvContext); 497 498 HRESULT (STDMETHODCALLTYPE *NotifyEndOfSegment)( 499 IMFSinkWriter* This, 500 DWORD dwStreamIndex); 501 502 HRESULT (STDMETHODCALLTYPE *Flush)( 503 IMFSinkWriter* This, 504 DWORD dwStreamIndex); 505 506 HRESULT (STDMETHODCALLTYPE *Finalize)( 507 IMFSinkWriter* This); 508 509 HRESULT (STDMETHODCALLTYPE *GetServiceForStream)( 510 IMFSinkWriter* This, 511 DWORD dwStreamIndex, 512 REFGUID guidService, 513 REFIID riid, 514 LPVOID *ppvObject); 515 516 HRESULT (STDMETHODCALLTYPE *GetStatistics)( 517 IMFSinkWriter* This, 518 DWORD dwStreamIndex, 519 MF_SINK_WRITER_STATISTICS *pStats); 520 521 END_INTERFACE 522 } IMFSinkWriterVtbl; 523 interface IMFSinkWriter { 524 CONST_VTBL IMFSinkWriterVtbl* lpVtbl; 525 }; 526 527 #ifdef COBJMACROS 528 #ifndef WIDL_C_INLINE_WRAPPERS 529 /*** IUnknown methods ***/ 530 #define IMFSinkWriter_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) 531 #define IMFSinkWriter_AddRef(This) (This)->lpVtbl->AddRef(This) 532 #define IMFSinkWriter_Release(This) (This)->lpVtbl->Release(This) 533 /*** IMFSinkWriter methods ***/ 534 #define IMFSinkWriter_AddStream(This,pTargetMediaType,pdwStreamIndex) (This)->lpVtbl->AddStream(This,pTargetMediaType,pdwStreamIndex) 535 #define IMFSinkWriter_SetInputMediaType(This,dwStreamIndex,pInputMediaType,pEncodingParameters) (This)->lpVtbl->SetInputMediaType(This,dwStreamIndex,pInputMediaType,pEncodingParameters) 536 #define IMFSinkWriter_BeginWriting(This) (This)->lpVtbl->BeginWriting(This) 537 #define IMFSinkWriter_WriteSample(This,dwStreamIndex,pSample) (This)->lpVtbl->WriteSample(This,dwStreamIndex,pSample) 538 #define IMFSinkWriter_SendStreamTick(This,dwStreamIndex,llTimestamp) (This)->lpVtbl->SendStreamTick(This,dwStreamIndex,llTimestamp) 539 #define IMFSinkWriter_PlaceMarker(This,dwStreamIndex,pvContext) (This)->lpVtbl->PlaceMarker(This,dwStreamIndex,pvContext) 540 #define IMFSinkWriter_NotifyEndOfSegment(This,dwStreamIndex) (This)->lpVtbl->NotifyEndOfSegment(This,dwStreamIndex) 541 #define IMFSinkWriter_Flush(This,dwStreamIndex) (This)->lpVtbl->Flush(This,dwStreamIndex) 542 #define IMFSinkWriter_Finalize(This) (This)->lpVtbl->Finalize(This) 543 #define IMFSinkWriter_GetServiceForStream(This,dwStreamIndex,guidService,riid,ppvObject) (This)->lpVtbl->GetServiceForStream(This,dwStreamIndex,guidService,riid,ppvObject) 544 #define IMFSinkWriter_GetStatistics(This,dwStreamIndex,pStats) (This)->lpVtbl->GetStatistics(This,dwStreamIndex,pStats) 545 #else 546 /*** IUnknown methods ***/ 547 static FORCEINLINE HRESULT IMFSinkWriter_QueryInterface(IMFSinkWriter* This,REFIID riid,void **ppvObject) { 548 return This->lpVtbl->QueryInterface(This,riid,ppvObject); 549 } 550 static FORCEINLINE ULONG IMFSinkWriter_AddRef(IMFSinkWriter* This) { 551 return This->lpVtbl->AddRef(This); 552 } 553 static FORCEINLINE ULONG IMFSinkWriter_Release(IMFSinkWriter* This) { 554 return This->lpVtbl->Release(This); 555 } 556 /*** IMFSinkWriter methods ***/ 557 static FORCEINLINE HRESULT IMFSinkWriter_AddStream(IMFSinkWriter* This,IMFMediaType *pTargetMediaType,DWORD *pdwStreamIndex) { 558 return This->lpVtbl->AddStream(This,pTargetMediaType,pdwStreamIndex); 559 } 560 static FORCEINLINE HRESULT IMFSinkWriter_SetInputMediaType(IMFSinkWriter* This,DWORD dwStreamIndex,IMFMediaType *pInputMediaType,IMFAttributes *pEncodingParameters) { 561 return This->lpVtbl->SetInputMediaType(This,dwStreamIndex,pInputMediaType,pEncodingParameters); 562 } 563 static FORCEINLINE HRESULT IMFSinkWriter_BeginWriting(IMFSinkWriter* This) { 564 return This->lpVtbl->BeginWriting(This); 565 } 566 static FORCEINLINE HRESULT IMFSinkWriter_WriteSample(IMFSinkWriter* This,DWORD dwStreamIndex,IMFSample *pSample) { 567 return This->lpVtbl->WriteSample(This,dwStreamIndex,pSample); 568 } 569 static FORCEINLINE HRESULT IMFSinkWriter_SendStreamTick(IMFSinkWriter* This,DWORD dwStreamIndex,LONGLONG llTimestamp) { 570 return This->lpVtbl->SendStreamTick(This,dwStreamIndex,llTimestamp); 571 } 572 static FORCEINLINE HRESULT IMFSinkWriter_PlaceMarker(IMFSinkWriter* This,DWORD dwStreamIndex,LPVOID pvContext) { 573 return This->lpVtbl->PlaceMarker(This,dwStreamIndex,pvContext); 574 } 575 static FORCEINLINE HRESULT IMFSinkWriter_NotifyEndOfSegment(IMFSinkWriter* This,DWORD dwStreamIndex) { 576 return This->lpVtbl->NotifyEndOfSegment(This,dwStreamIndex); 577 } 578 static FORCEINLINE HRESULT IMFSinkWriter_Flush(IMFSinkWriter* This,DWORD dwStreamIndex) { 579 return This->lpVtbl->Flush(This,dwStreamIndex); 580 } 581 static FORCEINLINE HRESULT IMFSinkWriter_Finalize(IMFSinkWriter* This) { 582 return This->lpVtbl->Finalize(This); 583 } 584 static FORCEINLINE HRESULT IMFSinkWriter_GetServiceForStream(IMFSinkWriter* This,DWORD dwStreamIndex,REFGUID guidService,REFIID riid,LPVOID *ppvObject) { 585 return This->lpVtbl->GetServiceForStream(This,dwStreamIndex,guidService,riid,ppvObject); 586 } 587 static FORCEINLINE HRESULT IMFSinkWriter_GetStatistics(IMFSinkWriter* This,DWORD dwStreamIndex,MF_SINK_WRITER_STATISTICS *pStats) { 588 return This->lpVtbl->GetStatistics(This,dwStreamIndex,pStats); 589 } 590 #endif 591 #endif 592 593 #endif 594 595 HRESULT STDMETHODCALLTYPE IMFSinkWriter_AddStream_Proxy( 596 IMFSinkWriter* This, 597 IMFMediaType *pTargetMediaType, 598 DWORD *pdwStreamIndex); 599 void __RPC_STUB IMFSinkWriter_AddStream_Stub( 600 IRpcStubBuffer* This, 601 IRpcChannelBuffer* pRpcChannelBuffer, 602 PRPC_MESSAGE pRpcMessage, 603 DWORD* pdwStubPhase); 604 HRESULT STDMETHODCALLTYPE IMFSinkWriter_SetInputMediaType_Proxy( 605 IMFSinkWriter* This, 606 DWORD dwStreamIndex, 607 IMFMediaType *pInputMediaType, 608 IMFAttributes *pEncodingParameters); 609 void __RPC_STUB IMFSinkWriter_SetInputMediaType_Stub( 610 IRpcStubBuffer* This, 611 IRpcChannelBuffer* pRpcChannelBuffer, 612 PRPC_MESSAGE pRpcMessage, 613 DWORD* pdwStubPhase); 614 HRESULT STDMETHODCALLTYPE IMFSinkWriter_BeginWriting_Proxy( 615 IMFSinkWriter* This); 616 void __RPC_STUB IMFSinkWriter_BeginWriting_Stub( 617 IRpcStubBuffer* This, 618 IRpcChannelBuffer* pRpcChannelBuffer, 619 PRPC_MESSAGE pRpcMessage, 620 DWORD* pdwStubPhase); 621 HRESULT STDMETHODCALLTYPE IMFSinkWriter_WriteSample_Proxy( 622 IMFSinkWriter* This, 623 DWORD dwStreamIndex, 624 IMFSample *pSample); 625 void __RPC_STUB IMFSinkWriter_WriteSample_Stub( 626 IRpcStubBuffer* This, 627 IRpcChannelBuffer* pRpcChannelBuffer, 628 PRPC_MESSAGE pRpcMessage, 629 DWORD* pdwStubPhase); 630 HRESULT STDMETHODCALLTYPE IMFSinkWriter_SendStreamTick_Proxy( 631 IMFSinkWriter* This, 632 DWORD dwStreamIndex, 633 LONGLONG llTimestamp); 634 void __RPC_STUB IMFSinkWriter_SendStreamTick_Stub( 635 IRpcStubBuffer* This, 636 IRpcChannelBuffer* pRpcChannelBuffer, 637 PRPC_MESSAGE pRpcMessage, 638 DWORD* pdwStubPhase); 639 HRESULT STDMETHODCALLTYPE IMFSinkWriter_PlaceMarker_Proxy( 640 IMFSinkWriter* This, 641 DWORD dwStreamIndex, 642 LPVOID pvContext); 643 void __RPC_STUB IMFSinkWriter_PlaceMarker_Stub( 644 IRpcStubBuffer* This, 645 IRpcChannelBuffer* pRpcChannelBuffer, 646 PRPC_MESSAGE pRpcMessage, 647 DWORD* pdwStubPhase); 648 HRESULT STDMETHODCALLTYPE IMFSinkWriter_NotifyEndOfSegment_Proxy( 649 IMFSinkWriter* This, 650 DWORD dwStreamIndex); 651 void __RPC_STUB IMFSinkWriter_NotifyEndOfSegment_Stub( 652 IRpcStubBuffer* This, 653 IRpcChannelBuffer* pRpcChannelBuffer, 654 PRPC_MESSAGE pRpcMessage, 655 DWORD* pdwStubPhase); 656 HRESULT STDMETHODCALLTYPE IMFSinkWriter_Flush_Proxy( 657 IMFSinkWriter* This, 658 DWORD dwStreamIndex); 659 void __RPC_STUB IMFSinkWriter_Flush_Stub( 660 IRpcStubBuffer* This, 661 IRpcChannelBuffer* pRpcChannelBuffer, 662 PRPC_MESSAGE pRpcMessage, 663 DWORD* pdwStubPhase); 664 HRESULT STDMETHODCALLTYPE IMFSinkWriter_Finalize_Proxy( 665 IMFSinkWriter* This); 666 void __RPC_STUB IMFSinkWriter_Finalize_Stub( 667 IRpcStubBuffer* This, 668 IRpcChannelBuffer* pRpcChannelBuffer, 669 PRPC_MESSAGE pRpcMessage, 670 DWORD* pdwStubPhase); 671 HRESULT STDMETHODCALLTYPE IMFSinkWriter_GetServiceForStream_Proxy( 672 IMFSinkWriter* This, 673 DWORD dwStreamIndex, 674 REFGUID guidService, 675 REFIID riid, 676 LPVOID *ppvObject); 677 void __RPC_STUB IMFSinkWriter_GetServiceForStream_Stub( 678 IRpcStubBuffer* This, 679 IRpcChannelBuffer* pRpcChannelBuffer, 680 PRPC_MESSAGE pRpcMessage, 681 DWORD* pdwStubPhase); 682 HRESULT STDMETHODCALLTYPE IMFSinkWriter_GetStatistics_Proxy( 683 IMFSinkWriter* This, 684 DWORD dwStreamIndex, 685 MF_SINK_WRITER_STATISTICS *pStats); 686 void __RPC_STUB IMFSinkWriter_GetStatistics_Stub( 687 IRpcStubBuffer* This, 688 IRpcChannelBuffer* pRpcChannelBuffer, 689 PRPC_MESSAGE pRpcMessage, 690 DWORD* pdwStubPhase); 691 692 #endif /* __IMFSinkWriter_INTERFACE_DEFINED__ */ 693 694 /***************************************************************************** 695 * IMFSourceReaderCallback interface 696 */ 697 #ifndef __IMFSourceReaderCallback_INTERFACE_DEFINED__ 698 #define __IMFSourceReaderCallback_INTERFACE_DEFINED__ 699 700 DEFINE_GUID(IID_IMFSourceReaderCallback, 0xdeec8d99, 0xfa1d, 0x4d82, 0x84,0xc2, 0x2c,0x89,0x69,0x94,0x48,0x67); 701 #if defined(__cplusplus) && !defined(CINTERFACE) 702 MIDL_INTERFACE("deec8d99-fa1d-4d82-84c2-2c8969944867") 703 IMFSourceReaderCallback : public IUnknown 704 { 705 virtual HRESULT STDMETHODCALLTYPE OnReadSample( 706 HRESULT hrStatus, 707 DWORD dwStreamIndex, 708 DWORD dwStreamFlags, 709 LONGLONG llTimestamp, 710 IMFSample *pSample) = 0; 711 712 virtual HRESULT STDMETHODCALLTYPE OnFlush( 713 DWORD dwStreamIndex) = 0; 714 715 virtual HRESULT STDMETHODCALLTYPE OnEvent( 716 DWORD dwStreamIndex, 717 IMFMediaEvent *pEvent) = 0; 718 719 }; 720 #ifdef __CRT_UUID_DECL 721 __CRT_UUID_DECL(IMFSourceReaderCallback, 0xdeec8d99, 0xfa1d, 0x4d82, 0x84,0xc2, 0x2c,0x89,0x69,0x94,0x48,0x67) 722 #endif 723 #else 724 typedef struct IMFSourceReaderCallbackVtbl { 725 BEGIN_INTERFACE 726 727 /*** IUnknown methods ***/ 728 HRESULT (STDMETHODCALLTYPE *QueryInterface)( 729 IMFSourceReaderCallback* This, 730 REFIID riid, 731 void **ppvObject); 732 733 ULONG (STDMETHODCALLTYPE *AddRef)( 734 IMFSourceReaderCallback* This); 735 736 ULONG (STDMETHODCALLTYPE *Release)( 737 IMFSourceReaderCallback* This); 738 739 /*** IMFSourceReaderCallback methods ***/ 740 HRESULT (STDMETHODCALLTYPE *OnReadSample)( 741 IMFSourceReaderCallback* This, 742 HRESULT hrStatus, 743 DWORD dwStreamIndex, 744 DWORD dwStreamFlags, 745 LONGLONG llTimestamp, 746 IMFSample *pSample); 747 748 HRESULT (STDMETHODCALLTYPE *OnFlush)( 749 IMFSourceReaderCallback* This, 750 DWORD dwStreamIndex); 751 752 HRESULT (STDMETHODCALLTYPE *OnEvent)( 753 IMFSourceReaderCallback* This, 754 DWORD dwStreamIndex, 755 IMFMediaEvent *pEvent); 756 757 END_INTERFACE 758 } IMFSourceReaderCallbackVtbl; 759 interface IMFSourceReaderCallback { 760 CONST_VTBL IMFSourceReaderCallbackVtbl* lpVtbl; 761 }; 762 763 #ifdef COBJMACROS 764 #ifndef WIDL_C_INLINE_WRAPPERS 765 /*** IUnknown methods ***/ 766 #define IMFSourceReaderCallback_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) 767 #define IMFSourceReaderCallback_AddRef(This) (This)->lpVtbl->AddRef(This) 768 #define IMFSourceReaderCallback_Release(This) (This)->lpVtbl->Release(This) 769 /*** IMFSourceReaderCallback methods ***/ 770 #define IMFSourceReaderCallback_OnReadSample(This,hrStatus,dwStreamIndex,dwStreamFlags,llTimestamp,pSample) (This)->lpVtbl->OnReadSample(This,hrStatus,dwStreamIndex,dwStreamFlags,llTimestamp,pSample) 771 #define IMFSourceReaderCallback_OnFlush(This,dwStreamIndex) (This)->lpVtbl->OnFlush(This,dwStreamIndex) 772 #define IMFSourceReaderCallback_OnEvent(This,dwStreamIndex,pEvent) (This)->lpVtbl->OnEvent(This,dwStreamIndex,pEvent) 773 #else 774 /*** IUnknown methods ***/ 775 static FORCEINLINE HRESULT IMFSourceReaderCallback_QueryInterface(IMFSourceReaderCallback* This,REFIID riid,void **ppvObject) { 776 return This->lpVtbl->QueryInterface(This,riid,ppvObject); 777 } 778 static FORCEINLINE ULONG IMFSourceReaderCallback_AddRef(IMFSourceReaderCallback* This) { 779 return This->lpVtbl->AddRef(This); 780 } 781 static FORCEINLINE ULONG IMFSourceReaderCallback_Release(IMFSourceReaderCallback* This) { 782 return This->lpVtbl->Release(This); 783 } 784 /*** IMFSourceReaderCallback methods ***/ 785 static FORCEINLINE HRESULT IMFSourceReaderCallback_OnReadSample(IMFSourceReaderCallback* This,HRESULT hrStatus,DWORD dwStreamIndex,DWORD dwStreamFlags,LONGLONG llTimestamp,IMFSample *pSample) { 786 return This->lpVtbl->OnReadSample(This,hrStatus,dwStreamIndex,dwStreamFlags,llTimestamp,pSample); 787 } 788 static FORCEINLINE HRESULT IMFSourceReaderCallback_OnFlush(IMFSourceReaderCallback* This,DWORD dwStreamIndex) { 789 return This->lpVtbl->OnFlush(This,dwStreamIndex); 790 } 791 static FORCEINLINE HRESULT IMFSourceReaderCallback_OnEvent(IMFSourceReaderCallback* This,DWORD dwStreamIndex,IMFMediaEvent *pEvent) { 792 return This->lpVtbl->OnEvent(This,dwStreamIndex,pEvent); 793 } 794 #endif 795 #endif 796 797 #endif 798 799 HRESULT STDMETHODCALLTYPE IMFSourceReaderCallback_OnReadSample_Proxy( 800 IMFSourceReaderCallback* This, 801 HRESULT hrStatus, 802 DWORD dwStreamIndex, 803 DWORD dwStreamFlags, 804 LONGLONG llTimestamp, 805 IMFSample *pSample); 806 void __RPC_STUB IMFSourceReaderCallback_OnReadSample_Stub( 807 IRpcStubBuffer* This, 808 IRpcChannelBuffer* pRpcChannelBuffer, 809 PRPC_MESSAGE pRpcMessage, 810 DWORD* pdwStubPhase); 811 HRESULT STDMETHODCALLTYPE IMFSourceReaderCallback_OnFlush_Proxy( 812 IMFSourceReaderCallback* This, 813 DWORD dwStreamIndex); 814 void __RPC_STUB IMFSourceReaderCallback_OnFlush_Stub( 815 IRpcStubBuffer* This, 816 IRpcChannelBuffer* pRpcChannelBuffer, 817 PRPC_MESSAGE pRpcMessage, 818 DWORD* pdwStubPhase); 819 HRESULT STDMETHODCALLTYPE IMFSourceReaderCallback_OnEvent_Proxy( 820 IMFSourceReaderCallback* This, 821 DWORD dwStreamIndex, 822 IMFMediaEvent *pEvent); 823 void __RPC_STUB IMFSourceReaderCallback_OnEvent_Stub( 824 IRpcStubBuffer* This, 825 IRpcChannelBuffer* pRpcChannelBuffer, 826 PRPC_MESSAGE pRpcMessage, 827 DWORD* pdwStubPhase); 828 829 #endif /* __IMFSourceReaderCallback_INTERFACE_DEFINED__ */ 830 831 HRESULT WINAPI MFCreateSinkWriterFromMediaSink(IMFMediaSink *pMediaSink,IMFAttributes *pAttributes,IMFSinkWriter **ppSinkWriter); 832 HRESULT WINAPI MFCreateSinkWriterFromURL(LPCWSTR pwszOutputURL,IMFByteStream *pByteStream,IMFAttributes *pAttributes,IMFSinkWriter **ppSinkWriter); 833 HRESULT WINAPI MFCreateSourceReaderFromByteStream(IMFByteStream *pByteStream,IMFAttributes *pAttributes,IMFSourceReader **ppSourceReader); 834 HRESULT WINAPI MFCreateSourceReaderFromMediaSource(IMFMediaSource *pMediaSource,IMFAttributes *pAttributes,IMFSourceReader **ppSourceReader); 835 HRESULT WINAPI MFCreateSourceReaderFromURL(LPCWSTR pwszURL,IMFAttributes *pAttributes,IMFSourceReader **ppSourceReader); 836 /* Begin additional prototypes for all interfaces */ 837 838 839 /* End additional prototypes */ 840 841 #ifdef __cplusplus 842 } 843 #endif 844 845 #endif /* __mfreadwrite_h__ */ 846