This file is indexed.

/usr/include/wine/windows/mfreadwrite.h is in libwine-dev 3.0-1ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
/*** Autogenerated by WIDL 3.0 from mfreadwrite.idl - Do not edit ***/

#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 475
#endif

#include <rpc.h>
#include <rpcndr.h>

#ifndef COM_NO_WINDOWS_H
#include <windows.h>
#include <ole2.h>
#endif

#ifndef __mfreadwrite_h__
#define __mfreadwrite_h__

/* Forward declarations */

#ifndef __IMFSourceReader_FWD_DEFINED__
#define __IMFSourceReader_FWD_DEFINED__
typedef interface IMFSourceReader IMFSourceReader;
#ifdef __cplusplus
interface IMFSourceReader;
#endif /* __cplusplus */
#endif

#ifndef __IMFSinkWriter_FWD_DEFINED__
#define __IMFSinkWriter_FWD_DEFINED__
typedef interface IMFSinkWriter IMFSinkWriter;
#ifdef __cplusplus
interface IMFSinkWriter;
#endif /* __cplusplus */
#endif

#ifndef __IMFSinkWriterEx_FWD_DEFINED__
#define __IMFSinkWriterEx_FWD_DEFINED__
typedef interface IMFSinkWriterEx IMFSinkWriterEx;
#ifdef __cplusplus
interface IMFSinkWriterEx;
#endif /* __cplusplus */
#endif

/* Headers for imported files */

#include <mfobjects.h>
#include <mftransform.h>

#ifdef __cplusplus
extern "C" {
#endif

enum {
    MF_SOURCE_READER_INVALID_STREAM_INDEX = 0xffffffff,
    MF_SOURCE_READER_ALL_STREAMS = 0xfffffffe,
    MF_SOURCE_READER_ANY_STREAM = 0xfffffffe,
    MF_SOURCE_READER_FIRST_AUDIO_STREAM = 0xfffffffd,
    MF_SOURCE_READER_FIRST_VIDEO_STREAM = 0xfffffffc,
    MF_SOURCE_READER_MEDIASOURCE = 0xffffffff,
    MF_SOURCE_READER_CURRENT_TYPE_INDEX = 0xffffffff
};
typedef enum MF_SOURCE_READER_FLAG {
    MF_SOURCE_READERF_ERROR = 0x1,
    MF_SOURCE_READERF_ENDOFSTREAM = 0x2,
    MF_SOURCE_READERF_NEWSTREAM = 0x4,
    MF_SOURCE_READERF_NATIVEMEDIATYPECHANGED = 0x10,
    MF_SOURCE_READERF_CURRENTMEDIATYPECHANGED = 0x20,
    MF_SOURCE_READERF_STREAMTICK = 0x100,
    MF_SOURCE_READERF_ALLEFFECTSREMOVED = 0x200
} MF_SOURCE_READER_FLAG;
typedef struct _MF_SINK_WRITER_STATISTICS {
    DWORD cb;
    LONGLONG llLastTimestampReceived;
    LONGLONG llLastTimestampEncoded;
    LONGLONG llLastTimestampProcessed;
    LONGLONG llLastStreamTickReceived;
    LONGLONG llLastSinkSampleRequest;
    QWORD qwNumSamplesReceived;
    QWORD qwNumSamplesEncoded;
    QWORD qwNumSamplesProcessed;
    QWORD qwNumStreamTicksReceived;
    DWORD dwByteCountQueued;
    QWORD qwByteCountProcessed;
    DWORD dwNumOutstandingSinkSampleRequests;
    DWORD dwAverageSampleRateReceived;
    DWORD dwAverageSampleRateEncoded;
    DWORD dwAverageSampleRateProcessed;
} MF_SINK_WRITER_STATISTICS;
EXTERN_GUID(CLSID_MFReadWriteClassFactory,           0x48e2ed0f, 0x98c2, 0x4a37, 0xbe, 0xd5, 0x16, 0x63, 0x12, 0xdd, 0xd8, 0x3f);
EXTERN_GUID(CLSID_MFSourceReader,                    0x1777133c, 0x0881, 0x411b, 0xa5, 0x77, 0xad, 0x54, 0x5f, 0x07, 0x14, 0xc4);
EXTERN_GUID(CLSID_MFSinkWriter,                      0xa3bbfb17, 0x8273, 0x4e52, 0x9e, 0x0e, 0x97, 0x39, 0xdc, 0x88, 0x79, 0x90);
EXTERN_GUID(MF_SINK_WRITER_ASYNC_CALLBACK,           0x48cb183e, 0x7b0b, 0x46f4, 0x82, 0x2e, 0x5e, 0x1d, 0x2d, 0xda, 0x43, 0x54);
EXTERN_GUID(MF_SINK_WRITER_DISABLE_THROTTLING,       0x08b845d8, 0x2b74, 0x4afe, 0x9d, 0x53, 0xbe, 0x16, 0xd2, 0xd5, 0xae, 0x4f);
EXTERN_GUID(MF_SINK_WRITER_D3D_MANAGER,              0xec822da2, 0xe1e9, 0x4b29, 0xa0, 0xd8, 0x56, 0x3c, 0x71, 0x9f, 0x52, 0x69);
EXTERN_GUID(MF_SINK_WRITER_ENCODER_CONFIG,           0xad91cd04, 0xa7cc, 0x4ac7, 0x99, 0xb6, 0xa5, 0x7b, 0x9a, 0x4a, 0x7c, 0x70);
EXTERN_GUID(MF_READWRITE_DISABLE_CONVERTERS,         0x98d5b065, 0x1374, 0x4847, 0x8d, 0x5d, 0x31, 0x52, 0x0f, 0xee, 0x71, 0x56);
EXTERN_GUID(MF_READWRITE_ENABLE_HARDWARE_TRANSFORMS, 0xa634a91c, 0x822b, 0x41b9, 0xa4, 0x94, 0x4d, 0xe4, 0x64, 0x36, 0x12, 0xb0);
EXTERN_GUID(MF_READWRITE_MMCSS_CLASS,                0x39384300, 0xd0eb, 0x40b1, 0x87, 0xa0, 0x33, 0x18, 0x87, 0x1b, 0x5a, 0x53);
EXTERN_GUID(MF_READWRITE_MMCSS_PRIORITY,             0x43ad19ce, 0xf33f, 0x4ba9, 0xa5, 0x80, 0xe4, 0xcd, 0x12, 0xf2, 0xd1, 0x44);
EXTERN_GUID(MF_READWRITE_MMCSS_CLASS_AUDIO,          0x430847da, 0x0890, 0x4b0e, 0x93, 0x8c, 0x05, 0x43, 0x32, 0xc5, 0x47, 0xe1);
EXTERN_GUID(MF_READWRITE_MMCSS_PRIORITY_AUDIO,       0x273db885, 0x2de2, 0x4db2, 0xa6, 0xa7, 0xfd, 0xb6, 0x6f, 0xb4, 0x0b, 0x61);
EXTERN_GUID(MF_READWRITE_D3D_OPTIONAL,               0x216479d9, 0x3071, 0x42ca, 0xbb, 0x6c, 0x4c, 0x22, 0x10, 0x2e, 0x1d, 0x18);
#ifndef __IMFMediaSource_FWD_DEFINED__
#define __IMFMediaSource_FWD_DEFINED__
typedef interface IMFMediaSource IMFMediaSource;
#ifdef __cplusplus
interface IMFMediaSource;
#endif /* __cplusplus */
#endif

/*****************************************************************************
 * IMFSourceReader interface
 */
#ifndef __IMFSourceReader_INTERFACE_DEFINED__
#define __IMFSourceReader_INTERFACE_DEFINED__

DEFINE_GUID(IID_IMFSourceReader, 0x70ae66f2, 0xc809, 0x4e4f, 0x89,0x15, 0xbd,0xcb,0x40,0x6b,0x79,0x93);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("70ae66f2-c809-4e4f-8915-bdcb406b7993")
IMFSourceReader : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE GetStreamSelection(
        DWORD index,
        BOOL *selected) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetStreamSelection(
        DWORD index,
        BOOL selected) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetNativeMediaType(
        DWORD index,
        DWORD typeindex,
        IMFMediaType **type) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetCurrentMediaType(
        DWORD index,
        IMFMediaType **type) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetCurrentMediaType(
        DWORD index,
        DWORD *reserved,
        IMFMediaType *type) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetCurrentPosition(
        REFGUID format,
        REFPROPVARIANT position) = 0;

    virtual HRESULT STDMETHODCALLTYPE ReadSample(
        DWORD index,
        DWORD flags,
        DWORD *actualindex,
        DWORD *sampleflags,
        LONGLONG *timestamp,
        IMFSample **sample) = 0;

    virtual HRESULT STDMETHODCALLTYPE Flush(
        DWORD index) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetServiceForStream(
        DWORD index,
        REFGUID service,
        REFIID riid,
        void **object) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetPresentationAttribute(
        DWORD index,
        REFGUID guid,
        PROPVARIANT *attr) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(IMFSourceReader, 0x70ae66f2, 0xc809, 0x4e4f, 0x89,0x15, 0xbd,0xcb,0x40,0x6b,0x79,0x93)
#endif
#else
typedef struct IMFSourceReaderVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IMFSourceReader *This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IMFSourceReader *This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IMFSourceReader *This);

    /*** IMFSourceReader methods ***/
    HRESULT (STDMETHODCALLTYPE *GetStreamSelection)(
        IMFSourceReader *This,
        DWORD index,
        BOOL *selected);

    HRESULT (STDMETHODCALLTYPE *SetStreamSelection)(
        IMFSourceReader *This,
        DWORD index,
        BOOL selected);

    HRESULT (STDMETHODCALLTYPE *GetNativeMediaType)(
        IMFSourceReader *This,
        DWORD index,
        DWORD typeindex,
        IMFMediaType **type);

    HRESULT (STDMETHODCALLTYPE *GetCurrentMediaType)(
        IMFSourceReader *This,
        DWORD index,
        IMFMediaType **type);

    HRESULT (STDMETHODCALLTYPE *SetCurrentMediaType)(
        IMFSourceReader *This,
        DWORD index,
        DWORD *reserved,
        IMFMediaType *type);

    HRESULT (STDMETHODCALLTYPE *SetCurrentPosition)(
        IMFSourceReader *This,
        REFGUID format,
        REFPROPVARIANT position);

    HRESULT (STDMETHODCALLTYPE *ReadSample)(
        IMFSourceReader *This,
        DWORD index,
        DWORD flags,
        DWORD *actualindex,
        DWORD *sampleflags,
        LONGLONG *timestamp,
        IMFSample **sample);

    HRESULT (STDMETHODCALLTYPE *Flush)(
        IMFSourceReader *This,
        DWORD index);

    HRESULT (STDMETHODCALLTYPE *GetServiceForStream)(
        IMFSourceReader *This,
        DWORD index,
        REFGUID service,
        REFIID riid,
        void **object);

    HRESULT (STDMETHODCALLTYPE *GetPresentationAttribute)(
        IMFSourceReader *This,
        DWORD index,
        REFGUID guid,
        PROPVARIANT *attr);

    END_INTERFACE
} IMFSourceReaderVtbl;

interface IMFSourceReader {
    CONST_VTBL IMFSourceReaderVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define IMFSourceReader_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IMFSourceReader_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IMFSourceReader_Release(This) (This)->lpVtbl->Release(This)
/*** IMFSourceReader methods ***/
#define IMFSourceReader_GetStreamSelection(This,index,selected) (This)->lpVtbl->GetStreamSelection(This,index,selected)
#define IMFSourceReader_SetStreamSelection(This,index,selected) (This)->lpVtbl->SetStreamSelection(This,index,selected)
#define IMFSourceReader_GetNativeMediaType(This,index,typeindex,type) (This)->lpVtbl->GetNativeMediaType(This,index,typeindex,type)
#define IMFSourceReader_GetCurrentMediaType(This,index,type) (This)->lpVtbl->GetCurrentMediaType(This,index,type)
#define IMFSourceReader_SetCurrentMediaType(This,index,reserved,type) (This)->lpVtbl->SetCurrentMediaType(This,index,reserved,type)
#define IMFSourceReader_SetCurrentPosition(This,format,position) (This)->lpVtbl->SetCurrentPosition(This,format,position)
#define IMFSourceReader_ReadSample(This,index,flags,actualindex,sampleflags,timestamp,sample) (This)->lpVtbl->ReadSample(This,index,flags,actualindex,sampleflags,timestamp,sample)
#define IMFSourceReader_Flush(This,index) (This)->lpVtbl->Flush(This,index)
#define IMFSourceReader_GetServiceForStream(This,index,service,riid,object) (This)->lpVtbl->GetServiceForStream(This,index,service,riid,object)
#define IMFSourceReader_GetPresentationAttribute(This,index,guid,attr) (This)->lpVtbl->GetPresentationAttribute(This,index,guid,attr)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT IMFSourceReader_QueryInterface(IMFSourceReader* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG IMFSourceReader_AddRef(IMFSourceReader* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG IMFSourceReader_Release(IMFSourceReader* This) {
    return This->lpVtbl->Release(This);
}
/*** IMFSourceReader methods ***/
static FORCEINLINE HRESULT IMFSourceReader_GetStreamSelection(IMFSourceReader* This,DWORD index,BOOL *selected) {
    return This->lpVtbl->GetStreamSelection(This,index,selected);
}
static FORCEINLINE HRESULT IMFSourceReader_SetStreamSelection(IMFSourceReader* This,DWORD index,BOOL selected) {
    return This->lpVtbl->SetStreamSelection(This,index,selected);
}
static FORCEINLINE HRESULT IMFSourceReader_GetNativeMediaType(IMFSourceReader* This,DWORD index,DWORD typeindex,IMFMediaType **type) {
    return This->lpVtbl->GetNativeMediaType(This,index,typeindex,type);
}
static FORCEINLINE HRESULT IMFSourceReader_GetCurrentMediaType(IMFSourceReader* This,DWORD index,IMFMediaType **type) {
    return This->lpVtbl->GetCurrentMediaType(This,index,type);
}
static FORCEINLINE HRESULT IMFSourceReader_SetCurrentMediaType(IMFSourceReader* This,DWORD index,DWORD *reserved,IMFMediaType *type) {
    return This->lpVtbl->SetCurrentMediaType(This,index,reserved,type);
}
static FORCEINLINE HRESULT IMFSourceReader_SetCurrentPosition(IMFSourceReader* This,REFGUID format,REFPROPVARIANT position) {
    return This->lpVtbl->SetCurrentPosition(This,format,position);
}
static FORCEINLINE HRESULT IMFSourceReader_ReadSample(IMFSourceReader* This,DWORD index,DWORD flags,DWORD *actualindex,DWORD *sampleflags,LONGLONG *timestamp,IMFSample **sample) {
    return This->lpVtbl->ReadSample(This,index,flags,actualindex,sampleflags,timestamp,sample);
}
static FORCEINLINE HRESULT IMFSourceReader_Flush(IMFSourceReader* This,DWORD index) {
    return This->lpVtbl->Flush(This,index);
}
static FORCEINLINE HRESULT IMFSourceReader_GetServiceForStream(IMFSourceReader* This,DWORD index,REFGUID service,REFIID riid,void **object) {
    return This->lpVtbl->GetServiceForStream(This,index,service,riid,object);
}
static FORCEINLINE HRESULT IMFSourceReader_GetPresentationAttribute(IMFSourceReader* This,DWORD index,REFGUID guid,PROPVARIANT *attr) {
    return This->lpVtbl->GetPresentationAttribute(This,index,guid,attr);
}
#endif
#endif

#endif


#endif  /* __IMFSourceReader_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IMFSinkWriter interface
 */
#ifndef __IMFSinkWriter_INTERFACE_DEFINED__
#define __IMFSinkWriter_INTERFACE_DEFINED__

DEFINE_GUID(IID_IMFSinkWriter, 0x3137f1cd, 0xfe5e, 0x4805, 0xa5,0xd8, 0xfb,0x47,0x74,0x48,0xcb,0x3d);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("3137f1cd-fe5e-4805-a5d8-fb477448cb3d")
IMFSinkWriter : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE AddStream(
        IMFMediaType *type,
        DWORD *index) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetInputMediaType(
        DWORD index,
        IMFMediaType *type,
        IMFAttributes *parameters) = 0;

    virtual HRESULT STDMETHODCALLTYPE BeginWriting(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE WriteSample(
        DWORD index,
        IMFSample *sample) = 0;

    virtual HRESULT STDMETHODCALLTYPE SendStreamTick(
        DWORD index,
        LONGLONG timestamp) = 0;

    virtual HRESULT STDMETHODCALLTYPE PlaceMarker(
        DWORD index,
        void *context) = 0;

    virtual HRESULT STDMETHODCALLTYPE NotifyEndOfSegment(
        DWORD index) = 0;

    virtual HRESULT STDMETHODCALLTYPE Flush(
        DWORD index) = 0;

    virtual HRESULT STDMETHODCALLTYPE Finalize(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetServiceForStream(
        DWORD index,
        REFGUID service,
        REFIID riid,
        void **object) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetStatistics(
        DWORD index,
        MF_SINK_WRITER_STATISTICS *stats) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(IMFSinkWriter, 0x3137f1cd, 0xfe5e, 0x4805, 0xa5,0xd8, 0xfb,0x47,0x74,0x48,0xcb,0x3d)
#endif
#else
typedef struct IMFSinkWriterVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IMFSinkWriter *This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IMFSinkWriter *This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IMFSinkWriter *This);

    /*** IMFSinkWriter methods ***/
    HRESULT (STDMETHODCALLTYPE *AddStream)(
        IMFSinkWriter *This,
        IMFMediaType *type,
        DWORD *index);

    HRESULT (STDMETHODCALLTYPE *SetInputMediaType)(
        IMFSinkWriter *This,
        DWORD index,
        IMFMediaType *type,
        IMFAttributes *parameters);

    HRESULT (STDMETHODCALLTYPE *BeginWriting)(
        IMFSinkWriter *This);

    HRESULT (STDMETHODCALLTYPE *WriteSample)(
        IMFSinkWriter *This,
        DWORD index,
        IMFSample *sample);

    HRESULT (STDMETHODCALLTYPE *SendStreamTick)(
        IMFSinkWriter *This,
        DWORD index,
        LONGLONG timestamp);

    HRESULT (STDMETHODCALLTYPE *PlaceMarker)(
        IMFSinkWriter *This,
        DWORD index,
        void *context);

    HRESULT (STDMETHODCALLTYPE *NotifyEndOfSegment)(
        IMFSinkWriter *This,
        DWORD index);

    HRESULT (STDMETHODCALLTYPE *Flush)(
        IMFSinkWriter *This,
        DWORD index);

    HRESULT (STDMETHODCALLTYPE *Finalize)(
        IMFSinkWriter *This);

    HRESULT (STDMETHODCALLTYPE *GetServiceForStream)(
        IMFSinkWriter *This,
        DWORD index,
        REFGUID service,
        REFIID riid,
        void **object);

    HRESULT (STDMETHODCALLTYPE *GetStatistics)(
        IMFSinkWriter *This,
        DWORD index,
        MF_SINK_WRITER_STATISTICS *stats);

    END_INTERFACE
} IMFSinkWriterVtbl;

interface IMFSinkWriter {
    CONST_VTBL IMFSinkWriterVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define IMFSinkWriter_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IMFSinkWriter_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IMFSinkWriter_Release(This) (This)->lpVtbl->Release(This)
/*** IMFSinkWriter methods ***/
#define IMFSinkWriter_AddStream(This,type,index) (This)->lpVtbl->AddStream(This,type,index)
#define IMFSinkWriter_SetInputMediaType(This,index,type,parameters) (This)->lpVtbl->SetInputMediaType(This,index,type,parameters)
#define IMFSinkWriter_BeginWriting(This) (This)->lpVtbl->BeginWriting(This)
#define IMFSinkWriter_WriteSample(This,index,sample) (This)->lpVtbl->WriteSample(This,index,sample)
#define IMFSinkWriter_SendStreamTick(This,index,timestamp) (This)->lpVtbl->SendStreamTick(This,index,timestamp)
#define IMFSinkWriter_PlaceMarker(This,index,context) (This)->lpVtbl->PlaceMarker(This,index,context)
#define IMFSinkWriter_NotifyEndOfSegment(This,index) (This)->lpVtbl->NotifyEndOfSegment(This,index)
#define IMFSinkWriter_Flush(This,index) (This)->lpVtbl->Flush(This,index)
#define IMFSinkWriter_Finalize(This) (This)->lpVtbl->Finalize(This)
#define IMFSinkWriter_GetServiceForStream(This,index,service,riid,object) (This)->lpVtbl->GetServiceForStream(This,index,service,riid,object)
#define IMFSinkWriter_GetStatistics(This,index,stats) (This)->lpVtbl->GetStatistics(This,index,stats)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT IMFSinkWriter_QueryInterface(IMFSinkWriter* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG IMFSinkWriter_AddRef(IMFSinkWriter* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG IMFSinkWriter_Release(IMFSinkWriter* This) {
    return This->lpVtbl->Release(This);
}
/*** IMFSinkWriter methods ***/
static FORCEINLINE HRESULT IMFSinkWriter_AddStream(IMFSinkWriter* This,IMFMediaType *type,DWORD *index) {
    return This->lpVtbl->AddStream(This,type,index);
}
static FORCEINLINE HRESULT IMFSinkWriter_SetInputMediaType(IMFSinkWriter* This,DWORD index,IMFMediaType *type,IMFAttributes *parameters) {
    return This->lpVtbl->SetInputMediaType(This,index,type,parameters);
}
static FORCEINLINE HRESULT IMFSinkWriter_BeginWriting(IMFSinkWriter* This) {
    return This->lpVtbl->BeginWriting(This);
}
static FORCEINLINE HRESULT IMFSinkWriter_WriteSample(IMFSinkWriter* This,DWORD index,IMFSample *sample) {
    return This->lpVtbl->WriteSample(This,index,sample);
}
static FORCEINLINE HRESULT IMFSinkWriter_SendStreamTick(IMFSinkWriter* This,DWORD index,LONGLONG timestamp) {
    return This->lpVtbl->SendStreamTick(This,index,timestamp);
}
static FORCEINLINE HRESULT IMFSinkWriter_PlaceMarker(IMFSinkWriter* This,DWORD index,void *context) {
    return This->lpVtbl->PlaceMarker(This,index,context);
}
static FORCEINLINE HRESULT IMFSinkWriter_NotifyEndOfSegment(IMFSinkWriter* This,DWORD index) {
    return This->lpVtbl->NotifyEndOfSegment(This,index);
}
static FORCEINLINE HRESULT IMFSinkWriter_Flush(IMFSinkWriter* This,DWORD index) {
    return This->lpVtbl->Flush(This,index);
}
static FORCEINLINE HRESULT IMFSinkWriter_Finalize(IMFSinkWriter* This) {
    return This->lpVtbl->Finalize(This);
}
static FORCEINLINE HRESULT IMFSinkWriter_GetServiceForStream(IMFSinkWriter* This,DWORD index,REFGUID service,REFIID riid,void **object) {
    return This->lpVtbl->GetServiceForStream(This,index,service,riid,object);
}
static FORCEINLINE HRESULT IMFSinkWriter_GetStatistics(IMFSinkWriter* This,DWORD index,MF_SINK_WRITER_STATISTICS *stats) {
    return This->lpVtbl->GetStatistics(This,index,stats);
}
#endif
#endif

#endif


#endif  /* __IMFSinkWriter_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IMFSinkWriterEx interface
 */
#ifndef __IMFSinkWriterEx_INTERFACE_DEFINED__
#define __IMFSinkWriterEx_INTERFACE_DEFINED__

DEFINE_GUID(IID_IMFSinkWriterEx, 0x588d72ab, 0x5bc1, 0x496a, 0x87,0x14, 0xb7,0x06,0x17,0x14,0x1b,0x25);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("588d72ab-5bc1-496a-8714-b70617141b25")
IMFSinkWriterEx : public IMFSinkWriter
{
    virtual HRESULT STDMETHODCALLTYPE GetTransformForStream(
        DWORD index,
        DWORD tindex,
        GUID *category,
        IMFTransform **transform) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(IMFSinkWriterEx, 0x588d72ab, 0x5bc1, 0x496a, 0x87,0x14, 0xb7,0x06,0x17,0x14,0x1b,0x25)
#endif
#else
typedef struct IMFSinkWriterExVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IMFSinkWriterEx *This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IMFSinkWriterEx *This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IMFSinkWriterEx *This);

    /*** IMFSinkWriter methods ***/
    HRESULT (STDMETHODCALLTYPE *AddStream)(
        IMFSinkWriterEx *This,
        IMFMediaType *type,
        DWORD *index);

    HRESULT (STDMETHODCALLTYPE *SetInputMediaType)(
        IMFSinkWriterEx *This,
        DWORD index,
        IMFMediaType *type,
        IMFAttributes *parameters);

    HRESULT (STDMETHODCALLTYPE *BeginWriting)(
        IMFSinkWriterEx *This);

    HRESULT (STDMETHODCALLTYPE *WriteSample)(
        IMFSinkWriterEx *This,
        DWORD index,
        IMFSample *sample);

    HRESULT (STDMETHODCALLTYPE *SendStreamTick)(
        IMFSinkWriterEx *This,
        DWORD index,
        LONGLONG timestamp);

    HRESULT (STDMETHODCALLTYPE *PlaceMarker)(
        IMFSinkWriterEx *This,
        DWORD index,
        void *context);

    HRESULT (STDMETHODCALLTYPE *NotifyEndOfSegment)(
        IMFSinkWriterEx *This,
        DWORD index);

    HRESULT (STDMETHODCALLTYPE *Flush)(
        IMFSinkWriterEx *This,
        DWORD index);

    HRESULT (STDMETHODCALLTYPE *Finalize)(
        IMFSinkWriterEx *This);

    HRESULT (STDMETHODCALLTYPE *GetServiceForStream)(
        IMFSinkWriterEx *This,
        DWORD index,
        REFGUID service,
        REFIID riid,
        void **object);

    HRESULT (STDMETHODCALLTYPE *GetStatistics)(
        IMFSinkWriterEx *This,
        DWORD index,
        MF_SINK_WRITER_STATISTICS *stats);

    /*** IMFSinkWriterEx methods ***/
    HRESULT (STDMETHODCALLTYPE *GetTransformForStream)(
        IMFSinkWriterEx *This,
        DWORD index,
        DWORD tindex,
        GUID *category,
        IMFTransform **transform);

    END_INTERFACE
} IMFSinkWriterExVtbl;

interface IMFSinkWriterEx {
    CONST_VTBL IMFSinkWriterExVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define IMFSinkWriterEx_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IMFSinkWriterEx_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IMFSinkWriterEx_Release(This) (This)->lpVtbl->Release(This)
/*** IMFSinkWriter methods ***/
#define IMFSinkWriterEx_AddStream(This,type,index) (This)->lpVtbl->AddStream(This,type,index)
#define IMFSinkWriterEx_SetInputMediaType(This,index,type,parameters) (This)->lpVtbl->SetInputMediaType(This,index,type,parameters)
#define IMFSinkWriterEx_BeginWriting(This) (This)->lpVtbl->BeginWriting(This)
#define IMFSinkWriterEx_WriteSample(This,index,sample) (This)->lpVtbl->WriteSample(This,index,sample)
#define IMFSinkWriterEx_SendStreamTick(This,index,timestamp) (This)->lpVtbl->SendStreamTick(This,index,timestamp)
#define IMFSinkWriterEx_PlaceMarker(This,index,context) (This)->lpVtbl->PlaceMarker(This,index,context)
#define IMFSinkWriterEx_NotifyEndOfSegment(This,index) (This)->lpVtbl->NotifyEndOfSegment(This,index)
#define IMFSinkWriterEx_Flush(This,index) (This)->lpVtbl->Flush(This,index)
#define IMFSinkWriterEx_Finalize(This) (This)->lpVtbl->Finalize(This)
#define IMFSinkWriterEx_GetServiceForStream(This,index,service,riid,object) (This)->lpVtbl->GetServiceForStream(This,index,service,riid,object)
#define IMFSinkWriterEx_GetStatistics(This,index,stats) (This)->lpVtbl->GetStatistics(This,index,stats)
/*** IMFSinkWriterEx methods ***/
#define IMFSinkWriterEx_GetTransformForStream(This,index,tindex,category,transform) (This)->lpVtbl->GetTransformForStream(This,index,tindex,category,transform)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT IMFSinkWriterEx_QueryInterface(IMFSinkWriterEx* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG IMFSinkWriterEx_AddRef(IMFSinkWriterEx* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG IMFSinkWriterEx_Release(IMFSinkWriterEx* This) {
    return This->lpVtbl->Release(This);
}
/*** IMFSinkWriter methods ***/
static FORCEINLINE HRESULT IMFSinkWriterEx_AddStream(IMFSinkWriterEx* This,IMFMediaType *type,DWORD *index) {
    return This->lpVtbl->AddStream(This,type,index);
}
static FORCEINLINE HRESULT IMFSinkWriterEx_SetInputMediaType(IMFSinkWriterEx* This,DWORD index,IMFMediaType *type,IMFAttributes *parameters) {
    return This->lpVtbl->SetInputMediaType(This,index,type,parameters);
}
static FORCEINLINE HRESULT IMFSinkWriterEx_BeginWriting(IMFSinkWriterEx* This) {
    return This->lpVtbl->BeginWriting(This);
}
static FORCEINLINE HRESULT IMFSinkWriterEx_WriteSample(IMFSinkWriterEx* This,DWORD index,IMFSample *sample) {
    return This->lpVtbl->WriteSample(This,index,sample);
}
static FORCEINLINE HRESULT IMFSinkWriterEx_SendStreamTick(IMFSinkWriterEx* This,DWORD index,LONGLONG timestamp) {
    return This->lpVtbl->SendStreamTick(This,index,timestamp);
}
static FORCEINLINE HRESULT IMFSinkWriterEx_PlaceMarker(IMFSinkWriterEx* This,DWORD index,void *context) {
    return This->lpVtbl->PlaceMarker(This,index,context);
}
static FORCEINLINE HRESULT IMFSinkWriterEx_NotifyEndOfSegment(IMFSinkWriterEx* This,DWORD index) {
    return This->lpVtbl->NotifyEndOfSegment(This,index);
}
static FORCEINLINE HRESULT IMFSinkWriterEx_Flush(IMFSinkWriterEx* This,DWORD index) {
    return This->lpVtbl->Flush(This,index);
}
static FORCEINLINE HRESULT IMFSinkWriterEx_Finalize(IMFSinkWriterEx* This) {
    return This->lpVtbl->Finalize(This);
}
static FORCEINLINE HRESULT IMFSinkWriterEx_GetServiceForStream(IMFSinkWriterEx* This,DWORD index,REFGUID service,REFIID riid,void **object) {
    return This->lpVtbl->GetServiceForStream(This,index,service,riid,object);
}
static FORCEINLINE HRESULT IMFSinkWriterEx_GetStatistics(IMFSinkWriterEx* This,DWORD index,MF_SINK_WRITER_STATISTICS *stats) {
    return This->lpVtbl->GetStatistics(This,index,stats);
}
/*** IMFSinkWriterEx methods ***/
static FORCEINLINE HRESULT IMFSinkWriterEx_GetTransformForStream(IMFSinkWriterEx* This,DWORD index,DWORD tindex,GUID *category,IMFTransform **transform) {
    return This->lpVtbl->GetTransformForStream(This,index,tindex,category,transform);
}
#endif
#endif

#endif


#endif  /* __IMFSinkWriterEx_INTERFACE_DEFINED__ */

HRESULT WINAPI MFCreateSourceReaderFromByteStream(IMFByteStream *stream, IMFAttributes *attributes,
                                                  IMFSourceReader **reader);
HRESULT WINAPI MFCreateSourceReaderFromMediaSource(IMFMediaSource *source, IMFAttributes *attributes,
                                                   IMFSourceReader **reader);
/* Begin additional prototypes for all interfaces */


/* End additional prototypes */

#ifdef __cplusplus
}
#endif

#endif /* __mfreadwrite_h__ */