comdlg32: Use a helper to update the devmode handle.
[wine] / include / axextend.idl
1 /*
2  * Copyright (C) 2002 Robert Shearman
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 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  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18
19 interface IAMAnalogVideoDecoder;
20 interface IAMAnalogVideoEncoder;
21 interface IAMAudioInputMixer;
22 interface IAMAudioRendererStats;
23 interface IAMBufferNegotiation;
24 interface IAMCameraControl;
25 interface IAMCopyCaptureFileProgress;
26 interface IAMCrossbar;
27 interface IAMDevMemoryAllocator;
28 interface IAMDevMemoryControl;
29 interface IAMDroppedFrames;
30 interface IAMExtDevice;
31 interface IAMExtTransport;
32 interface IAMGraphStreams;
33 interface IAMLatency;
34 interface IAMOpenProgress;
35 interface IAMOverlayFX;
36 interface IAMPhysicalPinInfo;
37 interface IAMPushSource;
38 interface IAMStreamConfig;
39 interface IAMTimecodeDisplay;
40 interface IAMTimecodeGenerator;
41 interface IAMTimecodeReader;
42 interface IAMTVTuner;
43 interface IAMVfwCaptureDialogs;
44 interface IAMVfwCompressDialogs;
45 interface IAMVideoCompression;
46 interface IAMVideoDecimationProperties;
47 interface IAMVideoProcAmp;
48 interface IAMGraphBuilderCallback;
49 interface ICaptureGraphBuilder;
50 interface ICaptureGraphBuilder2;
51 interface IConfigAviMux;
52 interface IConfigInterleaving;
53 interface IDecimateVideoImage;
54 interface IDrawVideoImage;
55 interface IEnumRegFilters;
56 interface IEnumStreamIdMap;
57 interface IFileSourceFilter;
58 interface IFileSinkFilter;
59 interface IFileSinkFilter2;
60 interface IFilterMapper;
61 interface IFilterMapper2;
62 interface IGraphBuilder;
63 interface IKsPropertySet;
64 interface IMediaEventSink;
65 interface IMpeg2Demultiplexer;
66 interface IMPEG2StreamIdMap;
67 interface IOverlay;
68 interface IOverlayNotify;
69 interface IOverlayNotify2;
70 interface IQualityControl;
71 interface ISeekingPassThru;
72
73 typedef struct
74 {
75     CLSID Clsid;
76     LPWSTR Name;
77 } REGFILTER;
78
79 [
80 object,
81 uuid(56a868a4-0ad4-11ce-b03a-0020af0ba770),
82 pointer_default(unique)
83 ]
84 interface IEnumRegFilters : IUnknown
85 {
86     HRESULT Next
87         ( [in]  ULONG cFilters,
88           [out] REGFILTER ** apRegFilter,
89           [out] ULONG * pcFetched
90         );
91
92     HRESULT Skip(
93         [in] ULONG cFilters
94     );
95
96     HRESULT Reset(void);
97
98     HRESULT Clone(
99         [out] IEnumRegFilters **ppEnum
100     );
101 }
102
103
104 typedef IEnumRegFilters *PENUMREGFILTERS;
105
106 [
107 object,
108 uuid(56a868a3-0ad4-11ce-b03a-0020af0ba770),
109 pointer_default(unique)
110 ]
111 interface IFilterMapper : IUnknown
112 {
113     enum { MERIT_PREFERRED     = 0x800000,
114            MERIT_NORMAL        = 0x600000,
115            MERIT_UNLIKELY      = 0x400000,
116            MERIT_DO_NOT_USE    = 0x200000,
117            MERIT_SW_COMPRESSOR = 0x100000,
118            MERIT_HW_COMPRESSOR = 0x100050
119          };
120
121     HRESULT RegisterFilter
122         ( [in] CLSID   clsid,
123           [in] LPCWSTR Name,
124           [in] DWORD   dwMerit
125         );
126
127     HRESULT RegisterFilterInstance
128         ( [in]  CLSID  clsid,
129           [in]  LPCWSTR Name,
130           [out] CLSID *MRId
131         );
132
133
134     HRESULT RegisterPin
135         ( [in] CLSID   Filter,
136           [in] LPCWSTR Name,
137           [in] BOOL    bRendered,
138           [in] BOOL    bOutput,
139           [in] BOOL    bZero,
140           [in] BOOL    bMany,
141           [in] CLSID   ConnectsToFilter,
142           [in] LPCWSTR ConnectsToPin
143         );
144
145     HRESULT RegisterPinType
146         ( [in] CLSID   clsFilter,
147           [in] LPCWSTR strName,
148           [in] CLSID   clsMajorType,
149           [in] CLSID   clsSubType
150         );
151
152
153     HRESULT UnregisterFilter
154         ( [in] CLSID  Filter
155         );
156
157
158     HRESULT UnregisterFilterInstance
159         ( [in] CLSID  MRId
160         );
161
162
163     HRESULT UnregisterPin
164         ( [in] CLSID   Filter,
165           [in] LPCWSTR Name
166         );
167
168     HRESULT EnumMatchingFilters
169        ( [out] IEnumRegFilters **ppEnum,
170          [in]  DWORD dwMerit,
171          [in]  BOOL  bInputNeeded,
172          [in]  CLSID clsInMaj,
173          [in]  CLSID clsInSub,
174          [in]  BOOL  bRender,
175          [in]  BOOL  bOututNeeded,
176          [in]  CLSID clsOutMaj,
177          [in]  CLSID clsOutSub
178        );
179
180 }
181
182 typedef struct
183 {
184     const CLSID * clsMajorType;
185     const CLSID * clsMinorType;
186 } REGPINTYPES;
187
188 typedef struct
189 {
190     LPWSTR           strName;
191     BOOL             bRendered;
192     BOOL             bOutput;
193     BOOL             bZero;
194     BOOL             bMany;
195     const CLSID *    clsConnectsToFilter;
196     const WCHAR *    strConnectsToPin;
197     UINT             nMediaTypes;
198     const REGPINTYPES * lpMediaType;
199 } REGFILTERPINS;
200
201 typedef struct
202 {
203     CLSID clsMedium;
204     DWORD dw1;
205     DWORD dw2;
206 } REGPINMEDIUM;
207
208 enum
209 {
210     REG_PINFLAG_B_ZERO = 0x1,
211     REG_PINFLAG_B_RENDERER = 0x2,
212     REG_PINFLAG_B_MANY = 0x4,
213     REG_PINFLAG_B_OUTPUT = 0x8
214 };
215
216
217 typedef struct
218 {
219     DWORD dwFlags;
220     UINT             cInstances;
221     UINT             nMediaTypes;
222     [size_is(nMediaTypes)] const REGPINTYPES * lpMediaType;
223     UINT             nMediums;
224     [size_is(nMediums)] const REGPINMEDIUM *lpMedium;
225     const CLSID      *clsPinCategory;
226 } REGFILTERPINS2;
227
228 typedef struct
229 {
230     DWORD dwVersion;
231     DWORD dwMerit;
232     [switch_is(dwVersion)] [switch_type(DWORD)] union
233     {
234         [case(1)]
235             struct
236             {
237                 ULONG cPins;
238                 [size_is(cPins)] const REGFILTERPINS *rgPins;
239             } DUMMYSTRUCTNAME;
240
241         [case(2)]
242             struct
243             {
244                 ULONG cPins2;
245                 [size_is(cPins2)] const REGFILTERPINS2 *rgPins2;
246             } DUMMYSTRUCTNAME1;
247
248         [default]
249             ;
250     } DUMMYUNIONNAME;
251
252 } REGFILTER2;
253
254
255 [
256 object,
257 uuid(b79bb0b0-33c1-11d1-abe1-00a0c905f375),
258 pointer_default(unique)
259 ]
260 interface IFilterMapper2 : IUnknown
261 {
262     HRESULT CreateCategory
263         ( [in] REFCLSID clsidCategory,
264           [in] DWORD dwCategoryMerit,
265           [in] LPCWSTR Description
266           );
267
268     HRESULT UnregisterFilter
269         ( [in] const CLSID *pclsidCategory,
270           [in] LPCOLESTR szInstance,
271           [in] REFCLSID Filter
272         );
273
274     HRESULT RegisterFilter
275         ( [in] REFCLSID clsidFilter,
276           [in] LPCWSTR Name,
277           [in, out] IMoniker **ppMoniker,
278           [in] const CLSID *pclsidCategory,
279           [in] LPCOLESTR szInstance,
280           [in] const REGFILTER2 *prf2
281         );
282
283     HRESULT EnumMatchingFilters
284        ( [out] IEnumMoniker **ppEnum,
285          [in]  DWORD dwFlags,
286          [in]  BOOL bExactMatch,
287          [in]  DWORD dwMerit,
288          [in]  BOOL  bInputNeeded,
289          [in]  DWORD cInputTypes,
290          [size_is(cInputTypes*2)]  const GUID *pInputTypes,
291          [in]  const REGPINMEDIUM *pMedIn,
292          [in]  const CLSID *pPinCategoryIn,
293          [in]  BOOL  bRender,
294          [in]  BOOL  bOutputNeeded,
295          [in]  DWORD cOutputTypes,
296          [size_is(cOutputTypes*2)]  const GUID *pOutputTypes,
297          [in]  const REGPINMEDIUM *pMedOut,
298          [in]  const CLSID *pPinCategoryOut
299        );
300 }
301
302 [
303 object,
304 uuid(b79bb0b1-33c1-11d1-abe1-00a0c905f375),
305 pointer_default(unique)
306 ]
307 interface IFilterMapper3 : IFilterMapper2
308 {
309     HRESULT GetICreateDevEnum( [out] ICreateDevEnum **ppEnum );
310 }
311
312 typedef enum tagQualityMessageType
313 {
314     Famine,
315     Flood
316 } QualityMessageType;
317
318 typedef struct tagQuality
319 {
320     QualityMessageType Type;
321     LONG               Proportion;
322     REFERENCE_TIME       Late;
323     REFERENCE_TIME       TimeStamp;
324 } Quality;
325
326 typedef IQualityControl *PQUALITYCONTROL;
327
328 [
329 object,
330 uuid(56a868a5-0ad4-11ce-b03a-0020af0ba770),
331 pointer_default(unique)
332 ]
333 interface IQualityControl : IUnknown
334 {
335     HRESULT Notify
336         ( [in] IBaseFilter * pSelf,
337           [in] Quality q
338         );
339
340     HRESULT SetSink
341         ( [in] IQualityControl * piqc
342         );
343 }
344
345 enum
346 {
347     CK_NOCOLORKEY  = 0x0,
348     CK_INDEX       = 0x1,
349     CK_RGB         = 0x2
350 };
351
352 typedef struct tagCOLORKEY
353 {
354     DWORD    KeyType;
355     DWORD    PaletteIndex;
356     COLORREF LowColorValue;
357     COLORREF HighColorValue;
358 } COLORKEY;
359
360 enum
361 {
362     ADVISE_NONE = 0x0,
363     ADVISE_CLIPPING = 0x1,
364     ADVISE_PALETTE = 0x2,
365     ADVISE_COLORKEY = 0x4,
366     ADVISE_POSITION = 0x8,
367     ADVISE_DISPLAY_CHANGE = 0x10
368 };
369
370 const DWORD ADVISE_ALL = ADVISE_CLIPPING |
371                          ADVISE_PALETTE  |
372                          ADVISE_COLORKEY |
373                          ADVISE_POSITION;
374
375 const DWORD ADVISE_ALL2 = ADVISE_ALL |
376                           ADVISE_DISPLAY_CHANGE;
377
378 cpp_quote("#ifndef _WINGDI_")
379
380 /* already defined in wingdi.h, but needed for WIDL */
381
382 typedef struct _RGNDATAHEADER
383 {
384     DWORD dwSize;
385     DWORD iType;
386     DWORD nCount;
387     DWORD nRgnSize;
388     RECT  rcBound;
389 } RGNDATAHEADER;
390
391 typedef struct _RGNDATA
392 {
393     RGNDATAHEADER rdh;
394     char Buffer[1];
395 } RGNDATA;
396
397 cpp_quote("#endif /* _WINGDI_ */")
398
399 [
400 object,
401 local,
402 uuid(56a868a0-0ad4-11ce-b03a-0020af0ba770),
403 pointer_default(unique)
404 ]
405 interface IOverlayNotify : IUnknown
406 {
407     HRESULT OnPaletteChange(
408         [in] DWORD dwColors,
409         [in] const PALETTEENTRY *pPalette);
410
411     HRESULT OnClipChange(
412         [in] const RECT *pSourceRect,
413         [in] const RECT *pDestinationRect,
414         [in] const RGNDATA *pRgnData);
415
416     HRESULT OnColorKeyChange([in] const COLORKEY *pColorKey);
417
418     HRESULT OnPositionChange([in] const RECT *pSourceRect,
419                              [in] const RECT *pDestinationRect);
420 }
421
422 typedef IOverlayNotify *POVERLAYNOTIFY;
423
424 cpp_quote("#if 0")
425 typedef HANDLE HMONITOR;
426 cpp_quote("#endif /* 0 */")
427
428 [
429 object,
430 local,
431 uuid(680EFA10-D535-11D1-87C8-00A0C9223196),
432 pointer_default(unique)
433 ]
434 interface IOverlayNotify2 : IOverlayNotify
435 {
436     HRESULT OnDisplayChange(
437         HMONITOR hMonitor);
438 }
439
440 typedef IOverlayNotify2 *POVERLAYNOTIFY2;
441
442 [
443 object,
444 local,
445 uuid(56a868a1-0ad4-11ce-b03a-0020af0ba770),
446 pointer_default(unique)
447 ]
448 interface IOverlay : IUnknown
449 {
450     HRESULT GetPalette(
451         [out] DWORD *pdwColors,
452         [out] PALETTEENTRY **ppPalette);
453
454     HRESULT SetPalette(
455         [in] DWORD dwColors,
456         [in] PALETTEENTRY *pPalette);
457
458     HRESULT GetDefaultColorKey([out] COLORKEY *pColorKey);
459
460     HRESULT GetColorKey([out] COLORKEY *pColorKey);
461
462     HRESULT SetColorKey([in,out] COLORKEY *pColorKey);
463
464     HRESULT GetWindowHandle([out] HWND *pHwnd);
465
466     HRESULT GetClipList([out] RECT *pSourceRect,
467                         [out] RECT *pDestinationRect,
468                         [out] RGNDATA **ppRgnData);
469
470     HRESULT GetVideoPosition([out] RECT *pSourceRect,
471                              [out] RECT *pDestinationRect);
472
473     HRESULT Advise(
474         [in] IOverlayNotify *pOverlayNotify,
475         [in] DWORD dwInterests);
476
477     HRESULT Unadvise();
478 }
479
480 typedef IOverlay *POVERLAY;
481
482 [
483 object,
484 uuid(56a868a2-0ad4-11ce-b03a-0020af0ba770),
485 pointer_default(unique)
486 ]
487 interface IMediaEventSink : IUnknown
488 {
489     HRESULT Notify(
490         [in] LONG EventCode,
491         [in] LONG_PTR EventParam1,
492         [in] LONG_PTR EventParam2
493     );
494 }
495
496 typedef IMediaEventSink *PMEDIAEVENTSINK;
497
498 [
499 object,
500 uuid(56a868a6-0ad4-11ce-b03a-0020af0ba770),
501 pointer_default(unique)
502 ]
503 interface IFileSourceFilter : IUnknown
504 {
505     HRESULT Load(
506         [in] LPCOLESTR pszFileName,
507         [in, unique] const AM_MEDIA_TYPE *pmt
508     );
509
510     HRESULT GetCurFile(
511         [out] LPOLESTR *ppszFileName,
512         [out] AM_MEDIA_TYPE *pmt
513     );
514 }
515
516 typedef IFileSourceFilter *PFILTERFILESOURCE;
517
518 [
519 object,
520 uuid(a2104830-7c70-11cf-8bce-00aa00a3f1a6),
521 pointer_default(unique)
522 ]
523 interface IFileSinkFilter : IUnknown
524 {
525     HRESULT SetFileName(
526         [in] LPCOLESTR pszFileName,
527         [in, unique] const AM_MEDIA_TYPE *pmt
528     );
529
530     HRESULT GetCurFile(
531         [out] LPOLESTR *ppszFileName,
532         [out] AM_MEDIA_TYPE *pmt
533     );
534 }
535
536 typedef IFileSinkFilter *PFILTERFILESINK;
537
538 [
539         object,
540         uuid(00855B90-CE1B-11d0-BD4F-00A0C911CE86),
541         pointer_default(unique)
542 ]
543 interface IFileSinkFilter2 : IFileSinkFilter
544 {
545     HRESULT SetMode(
546         [in] DWORD dwFlags
547     );
548
549     HRESULT GetMode(
550         [out] DWORD *pdwFlags
551     );
552 }
553
554 typedef IFileSinkFilter2 *PFILESINKFILTER2;
555
556 typedef enum
557 {
558     AM_FILE_OVERWRITE = 0x00000001,
559 } AM_FILESINK_FLAGS;
560
561 [
562 object,
563 uuid(56a868a9-0ad4-11ce-b03a-0020af0ba770),
564 pointer_default(unique)
565 ]
566 interface IGraphBuilder : IFilterGraph
567 {
568     HRESULT Connect
569         ( [in] IPin * ppinOut,
570           [in] IPin * ppinIn
571         );
572
573     HRESULT Render
574         ( [in] IPin * ppinOut
575         );
576
577     HRESULT RenderFile
578         ( [in] LPCWSTR lpcwstrFile,
579           [in, unique] LPCWSTR lpcwstrPlayList
580         );
581
582     HRESULT AddSourceFilter
583         ( [in]      LPCWSTR lpcwstrFileName,
584           [in, unique]      LPCWSTR lpcwstrFilterName,
585           [out]     IBaseFilter* *ppFilter
586         );
587
588     HRESULT SetLogFile
589         ( [in]      DWORD_PTR hFile
590         );
591
592     HRESULT Abort();
593
594     HRESULT ShouldOperationContinue();
595 }
596
597
598 [
599     object,
600     uuid(bf87b6e0-8c27-11d0-b3f0-00aa003761c5),
601     pointer_default(unique)
602 ]
603 interface ICaptureGraphBuilder : IUnknown {
604
605     HRESULT SetFiltergraph(
606         [in] IGraphBuilder *pfg);
607
608     HRESULT GetFiltergraph(
609         [out] IGraphBuilder **ppfg);
610
611     HRESULT SetOutputFileName(
612         [in] const GUID *pType,
613         [in] LPCOLESTR lpstrFile,
614         [out] IBaseFilter **ppf,
615         [out] IFileSinkFilter **ppSink);
616
617     [local] HRESULT FindInterface(
618         [in, unique] const GUID *pCategory,
619         [in] IBaseFilter *pf,
620         [in] REFIID riid,
621         [out] void **ppint);
622
623     [call_as(FindInterface)] HRESULT RemoteFindInterface(
624         [in, unique] const GUID *pCategory,
625         [in] IBaseFilter *pf,
626         [in] REFIID riid,
627         [out] IUnknown **ppint);
628
629     HRESULT RenderStream(
630         [in] const GUID *pCategory,
631         [in] IUnknown *pSource,
632         [in] IBaseFilter *pfCompressor,
633         [in] IBaseFilter *pfRenderer);
634
635     HRESULT ControlStream(
636         [in] const GUID *pCategory,
637         [in] IBaseFilter *pFilter,
638         [in] REFERENCE_TIME *pstart,
639         [in] REFERENCE_TIME *pstop,
640         [in] WORD wStartCookie,
641         [in] WORD wStopCookie);
642
643     HRESULT AllocCapFile(
644         [in] LPCOLESTR lpstr,
645         [in] DWORDLONG dwlSize);
646
647     HRESULT CopyCaptureFile(
648         [in] LPOLESTR lpwstrOld,
649         [in] LPOLESTR lpwstrNew,
650         [in] int fAllowEscAbort,
651         [in] IAMCopyCaptureFileProgress *pCallback);
652 }
653
654 [
655 object,
656 uuid(670d1d20-a068-11d0-b3f0-00aa003761c5),
657 pointer_default(unique)
658 ]
659 interface IAMCopyCaptureFileProgress : IUnknown
660 {
661     HRESULT Progress(
662         [in] int iProgress);
663 }
664
665 [
666     object,
667     uuid(93E5A4E0-2D50-11d2-ABFA-00A0C9C6E38D),
668     pointer_default(unique)
669 ]
670 interface ICaptureGraphBuilder2 : IUnknown
671 {
672     HRESULT SetFiltergraph(
673         [in] IGraphBuilder *pfg);
674
675     HRESULT GetFiltergraph(
676         [out] IGraphBuilder **ppfg);
677
678     HRESULT SetOutputFileName(
679         [in] const GUID *pType,
680         [in] LPCOLESTR lpstrFile,
681         [out] IBaseFilter **ppf,
682         [out] IFileSinkFilter **ppSink);
683
684     [local] HRESULT FindInterface(
685         [in] const GUID *pCategory,
686         [in] const GUID *pType,
687         [in] IBaseFilter *pf,
688         [in] REFIID riid,
689         [out] void **ppint);
690
691     [call_as(FindInterface)] HRESULT RemoteFindInterface(
692         [in] const GUID *pCategory,
693         [in] const GUID *pType,
694         [in] IBaseFilter *pf,
695         [in] REFIID riid,
696         [out] IUnknown **ppint);
697
698     HRESULT RenderStream(
699         [in] const GUID *pCategory,
700         [in] const GUID *pType,
701         [in] IUnknown *pSource,
702         [in] IBaseFilter *pfCompressor,
703         [in] IBaseFilter *pfRenderer);
704
705     HRESULT ControlStream(
706         [in] const GUID *pCategory,
707         [in] const GUID *pType,
708         [in] IBaseFilter *pFilter,
709         [in] REFERENCE_TIME *pstart,
710         [in] REFERENCE_TIME *pstop,
711         [in] WORD wStartCookie,
712         [in] WORD wStopCookie);
713
714     HRESULT AllocCapFile(
715         [in] LPCOLESTR lpstr,
716         [in] DWORDLONG dwlSize);
717
718     HRESULT CopyCaptureFile(
719         [in] LPOLESTR lpwstrOld,
720         [in] LPOLESTR lpwstrNew,
721         [in] int fAllowEscAbort,
722         [in] IAMCopyCaptureFileProgress *pCallback);
723
724     HRESULT FindPin(
725         [in] IUnknown *pSource,
726         [in] PIN_DIRECTION pindir,
727         [in] const GUID *pCategory,
728         [in] const GUID *pType,
729         [in] BOOL fUnconnected,
730         [in] int num,
731         [out] IPin **ppPin);
732 }
733
734 enum _AM_RENSDEREXFLAGS
735 {
736     AM_RENDEREX_RENDERTOEXISTINGRENDERERS = 0x01
737 };
738
739 [
740     object,
741     uuid(36b73882-c2c8-11cf-8b46-00805f6cef60),
742     pointer_default(unique)
743 ]
744 interface IFilterGraph2: IGraphBuilder
745 {
746     HRESULT AddSourceFilterForMoniker(
747           [in] IMoniker *pMoniker,
748           [in] IBindCtx *pCtx,
749           [in, unique] LPCWSTR lpcwstrFilterName,
750           [out] IBaseFilter **ppFilter
751     );
752
753     HRESULT ReconnectEx
754         ( [in] IPin * ppin,
755           [in, unique] const AM_MEDIA_TYPE *pmt
756         );
757
758     HRESULT RenderEx( [in] IPin *pPinOut,
759                       [in] DWORD dwFlags,
760                       [in, out] DWORD *pvContext
761                     );
762 }
763
764 [
765     object,
766     local,
767     uuid(56a868bf-0ad4-11ce-b03a-0020af0ba770),
768     pointer_default(unique)
769 ]
770 interface IStreamBuilder : IUnknown
771 {
772     HRESULT Render
773         ( [in] IPin * ppinOut,
774           [in] IGraphBuilder * pGraph
775         );
776
777     HRESULT Backout
778         ( [in] IPin * ppinOut,
779           [in] IGraphBuilder * pGraph
780         );
781 }
782
783
784 /*****************************************************************************
785  * IAMStreamConfig interface
786  */
787 [
788     object,
789     uuid(c6e13340-30ac-11d0-a18c-00a0c9118956),
790     pointer_default(unique)
791 ]
792 interface IAMStreamConfig : IUnknown
793 {
794     HRESULT SetFormat( [in] AM_MEDIA_TYPE *pmt);
795     HRESULT GetFormat( [in] AM_MEDIA_TYPE **pmt);
796     HRESULT GetNumberOfCapabilities( [out] int *piCount, [out] int *piSize);
797     HRESULT GetStreamCaps( [in] int iIndex, [out] AM_MEDIA_TYPE **pmt,
798                           [out] BYTE *pSCC);
799 }
800
801
802 typedef enum tagVideoProcAmpProperty
803 {
804     VideoProcAmp_Brightness,
805     VideoProcAmp_Contrast,
806     VideoProcAmp_Hue,
807     VideoProcAmp_Saturation,
808     VideoProcAmp_Sharpness,
809     VideoProcAmp_Gamma,
810     VideoProcAmp_ColorEnable,
811     VideoProcAmp_WhiteBalance,
812     VideoProcAmp_BacklightCompensation,
813     VideoProcAmp_Gain
814 } VideoProcAmpProperty;
815
816 typedef enum tagVideoProcAmpFlags
817 {
818     VideoProcAmp_Flags_Auto   = 0x0001,
819     VideoProcAmp_Flags_Manual = 0x0002,
820 } VideoProcAmpFlags;
821
822 /*****************************************************************************
823  * IAMVideoProcAmp interface
824  */
825 [
826     object,
827     uuid(c6e13360-30ac-11d0-a18c-00a0c9118956),
828     pointer_default(unique)
829 ]
830 interface IAMVideoProcAmp : IUnknown
831 {
832     HRESULT GetRange( [in] LONG Property, [out] LONG *pMin, [out] LONG *pMax,
833                      [out] LONG *pSteppingDelta, [out] LONG *pDefault,
834                      [out] LONG *pCapsFlags);
835     HRESULT Set( [in] LONG Property, [in] LONG lValue, [in] LONG Flags);
836     HRESULT Get( [in] LONG Property, [out] LONG *lValue, [out] LONG *Flags);
837 }
838
839
840 [
841         object,
842         uuid(56a868aa-0ad4-11ce-b03a-0020af0ba770),
843         pointer_default(unique)
844 ]
845 interface IAsyncReader : IUnknown
846 {
847     HRESULT RequestAllocator(
848                 [in]  IMemAllocator* pPreferred,
849                 [in]  ALLOCATOR_PROPERTIES* pProps,
850                 [out] IMemAllocator ** ppActual);
851
852     HRESULT Request(
853                 [in] IMediaSample* pSample,
854                 [in] DWORD_PTR dwUser);
855
856     HRESULT WaitForNext(
857                 [in]  DWORD dwTimeout,
858                 [out] IMediaSample** ppSample,
859                 [out] DWORD_PTR * pdwUser);
860
861     HRESULT SyncReadAligned(
862                 [in] IMediaSample* pSample);
863
864     HRESULT SyncRead(
865                 [in]  LONGLONG llPosition,
866                 [in]  LONG lLength,
867                 [out, size_is(lLength)]
868                       BYTE* pBuffer);
869
870     HRESULT Length(
871                 [out] LONGLONG* pTotal,
872                 [out] LONGLONG* pAvailable);
873
874     HRESULT BeginFlush(void);
875
876     HRESULT EndFlush(void);
877 }
878
879
880 [
881     object,
882     uuid(56a868ab-0ad4-11ce-b03a-0020af0ba770),
883     pointer_default(unique)
884 ]
885 interface IGraphVersion : IUnknown
886 {
887     HRESULT QueryVersion(LONG* pVersion);
888 }
889
890 [
891     object,
892     uuid(56a868ad-0ad4-11ce-b03a-0020af0ba770),
893     pointer_default(unique)
894 ]
895 interface IResourceConsumer : IUnknown
896 {
897     HRESULT AcquireResource(
898         [in] LONG idResource);
899
900     HRESULT ReleaseResource(
901         [in] LONG idResource);
902 }
903
904
905 [
906     object,
907     uuid(56a868ac-0ad4-11ce-b03a-0020af0ba770),
908     pointer_default(unique)
909 ]
910 interface IResourceManager : IUnknown
911 {
912     HRESULT Register(
913         [in] LPCWSTR pName,
914         [in] LONG   cResource,
915         [out] LONG* plToken
916         );
917
918     HRESULT RegisterGroup(
919         [in] LPCWSTR pName,
920         [in] LONG cResource,
921         [in, size_is(cResource)]
922              LONG* palTokens,
923         [out] LONG* plToken
924         );
925
926     HRESULT RequestResource(
927         [in] LONG idResource,
928         [in] IUnknown* pFocusObject,
929         [in] IResourceConsumer* pConsumer
930         );
931
932     HRESULT NotifyAcquire(
933         [in] LONG idResource,
934         [in] IResourceConsumer* pConsumer,
935         [in] HRESULT hr);
936
937     HRESULT NotifyRelease(
938         [in] LONG idResource,
939         [in] IResourceConsumer* pConsumer,
940         [in] BOOL bStillWant);
941
942     HRESULT CancelRequest(
943         [in] LONG idResource,
944         [in] IResourceConsumer* pConsumer);
945
946     HRESULT SetFocus(
947         [in] IUnknown* pFocusObject);
948
949     HRESULT ReleaseFocus(
950         [in] IUnknown* pFocusObject);
951
952 }
953
954 cpp_quote("#ifndef _IKsPropertySet_")
955 cpp_quote("#define _IKsPropertySet_")
956 cpp_quote("#define KSPROPERTY_SUPPORT_GET  1")
957 cpp_quote("#define KSPROPERTY_SUPPORT_SET  2")
958
959 [
960     object,
961     uuid(31efac30-515c-11d0-a9aa-00aa0061be93),
962     pointer_default(unique),
963     local
964 ]
965 interface IKsPropertySet : IUnknown
966 {
967     HRESULT Set( [in] REFGUID guidPropSet,
968                  [in] DWORD dwPropID,
969                  [in, size_is(cbInstanceData)] LPVOID pInstanceData,
970                  [in] DWORD cbInstanceData,
971                  [in, size_is(cbPropData)] LPVOID pPropData,
972                  [in] DWORD cbPropData );
973
974     HRESULT Get( [in] REFGUID guidPropSet,
975                  [in] DWORD dwPropID,
976                  [in, size_is(cbInstanceData)] LPVOID pInstanceData,
977                  [in] DWORD cbInstanceData,
978                  [out, size_is(cbPropData)] LPVOID pPropData,
979                  [in] DWORD cbPropData,
980                  [out] DWORD *pcbReturned );
981
982     HRESULT QuerySupported( [in] REFGUID guidPropSet,
983                             [in] DWORD dwPropID,
984                             [out] DWORD *pTypeSupport);
985 }
986 cpp_quote("#endif /* _IKsPropertySet_ */")
987
988 [
989     object,
990     uuid(36b73883-c2c8-11cf-8b46-00805f6cef60),
991     pointer_default(unique)
992 ]
993 interface ISeekingPassThru : IUnknown
994 {
995     HRESULT Init( [in] BOOL bSupportRendering, [in] IPin *pPin);
996 }
997
998 enum _AM_FILTER_MISC_FLAGS
999 {
1000     AM_FILTER_MISC_FLAGS_IS_RENDERER = 0x1,
1001     AM_FILTER_MISC_FLAGS_IS_SOURCE = 0x2
1002 };
1003
1004 [
1005     local,
1006     object,
1007     uuid(2dd74950-a890-11d1-abe8-00a0c905f375),
1008     pointer_default(unique)
1009 ]
1010 interface IAMFilterMiscFlags : IUnknown
1011 {
1012     ULONG GetMiscFlags();
1013 };
1014
1015 [
1016     local,
1017     object,
1018     uuid(4995f511-9ddb-4f12-bd3b-f04611807b79),
1019     pointer_default(unique)
1020 ]
1021 interface IAMGraphBuilderCallback : IUnknown
1022 {
1023     HRESULT SelectedFilter(
1024         [in] IMoniker *pMon);
1025
1026     HRESULT CreatedFilter(
1027         [in] IBaseFilter *pFil);
1028 };