2 * Copyright (C) 2002 Robert Shearman
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.
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.
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
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;
34 interface IAMOpenProgress;
35 interface IAMOverlayFX;
36 interface IAMPhysicalPinInfo;
37 interface IAMPushSource;
38 interface IAMStreamConfig;
39 interface IAMTimecodeDisplay;
40 interface IAMTimecodeGenerator;
41 interface IAMTimecodeReader;
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;
68 interface IOverlayNotify;
69 interface IOverlayNotify2;
70 interface IQualityControl;
71 interface ISeekingPassThru;
81 uuid(56a868a4-0ad4-11ce-b03a-0020af0ba770),
82 pointer_default(unique)
84 interface IEnumRegFilters : IUnknown
87 ( [in] ULONG cFilters,
88 [out] REGFILTER ** apRegFilter,
89 [out] ULONG * pcFetched
99 [out] IEnumRegFilters **ppEnum
104 typedef IEnumRegFilters *PENUMREGFILTERS;
108 uuid(56a868a3-0ad4-11ce-b03a-0020af0ba770),
109 pointer_default(unique)
111 interface IFilterMapper : IUnknown
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
121 HRESULT RegisterFilter
127 HRESULT RegisterFilterInstance
141 [in] CLSID ConnectsToFilter,
142 [in] LPCWSTR ConnectsToPin
145 HRESULT RegisterPinType
146 ( [in] CLSID clsFilter,
147 [in] LPCWSTR strName,
148 [in] CLSID clsMajorType,
149 [in] CLSID clsSubType
153 HRESULT UnregisterFilter
158 HRESULT UnregisterFilterInstance
163 HRESULT UnregisterPin
168 HRESULT EnumMatchingFilters
169 ( [out] IEnumRegFilters **ppEnum,
171 [in] BOOL bInputNeeded,
175 [in] BOOL bOututNeeded,
176 [in] CLSID clsOutMaj,
184 const CLSID * clsMajorType;
185 const CLSID * clsMinorType;
195 const CLSID * clsConnectsToFilter;
196 const WCHAR * strConnectsToPin;
198 const REGPINTYPES * lpMediaType;
210 REG_PINFLAG_B_ZERO = 0x1,
211 REG_PINFLAG_B_RENDERER = 0x2,
212 REG_PINFLAG_B_MANY = 0x4,
213 REG_PINFLAG_B_OUTPUT = 0x8
222 [size_is(nMediaTypes)] const REGPINTYPES * lpMediaType;
224 [size_is(nMediums)] const REGPINMEDIUM *lpMedium;
225 const CLSID *clsPinCategory;
232 [switch_is(dwVersion)] [switch_type(DWORD)] union
238 [size_is(cPins)] const REGFILTERPINS *rgPins;
245 [size_is(cPins2)] const REGFILTERPINS2 *rgPins2;
257 uuid(b79bb0b0-33c1-11d1-abe1-00a0c905f375),
258 pointer_default(unique)
260 interface IFilterMapper2 : IUnknown
262 HRESULT CreateCategory
263 ( [in] REFCLSID clsidCategory,
264 [in] DWORD dwCategoryMerit,
265 [in] LPCWSTR Description
268 HRESULT UnregisterFilter
269 ( [in] const CLSID *pclsidCategory,
270 [in] LPCOLESTR szInstance,
274 HRESULT RegisterFilter
275 ( [in] REFCLSID clsidFilter,
277 [in, out] IMoniker **ppMoniker,
278 [in] const CLSID *pclsidCategory,
279 [in] LPCOLESTR szInstance,
280 [in] const REGFILTER2 *prf2
283 HRESULT EnumMatchingFilters
284 ( [out] IEnumMoniker **ppEnum,
286 [in] BOOL bExactMatch,
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,
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
304 uuid(b79bb0b1-33c1-11d1-abe1-00a0c905f375),
305 pointer_default(unique)
307 interface IFilterMapper3 : IFilterMapper2
309 HRESULT GetICreateDevEnum( [out] ICreateDevEnum **ppEnum );
312 typedef enum tagQualityMessageType
316 } QualityMessageType;
318 typedef struct tagQuality
320 QualityMessageType Type;
323 REFERENCE_TIME TimeStamp;
326 typedef IQualityControl *PQUALITYCONTROL;
330 uuid(56a868a5-0ad4-11ce-b03a-0020af0ba770),
331 pointer_default(unique)
333 interface IQualityControl : IUnknown
336 ( [in] IBaseFilter * pSelf,
341 ( [in] IQualityControl * piqc
352 typedef struct tagCOLORKEY
356 COLORREF LowColorValue;
357 COLORREF HighColorValue;
363 ADVISE_CLIPPING = 0x1,
364 ADVISE_PALETTE = 0x2,
365 ADVISE_COLORKEY = 0x4,
366 ADVISE_POSITION = 0x8,
367 ADVISE_DISPLAY_CHANGE = 0x10
370 const DWORD ADVISE_ALL = ADVISE_CLIPPING |
375 const DWORD ADVISE_ALL2 = ADVISE_ALL |
376 ADVISE_DISPLAY_CHANGE;
378 cpp_quote("#ifndef _WINGDI_")
380 /* already defined in wingdi.h, but needed for WIDL */
382 typedef struct _RGNDATAHEADER
391 typedef struct _RGNDATA
397 cpp_quote("#endif /* _WINGDI_ */")
402 uuid(56a868a0-0ad4-11ce-b03a-0020af0ba770),
403 pointer_default(unique)
405 interface IOverlayNotify : IUnknown
407 HRESULT OnPaletteChange(
409 [in] const PALETTEENTRY *pPalette);
411 HRESULT OnClipChange(
412 [in] const RECT *pSourceRect,
413 [in] const RECT *pDestinationRect,
414 [in] const RGNDATA *pRgnData);
416 HRESULT OnColorKeyChange([in] const COLORKEY *pColorKey);
418 HRESULT OnPositionChange([in] const RECT *pSourceRect,
419 [in] const RECT *pDestinationRect);
422 typedef IOverlayNotify *POVERLAYNOTIFY;
425 typedef HANDLE HMONITOR;
426 cpp_quote("#endif /* 0 */")
431 uuid(680EFA10-D535-11D1-87C8-00A0C9223196),
432 pointer_default(unique)
434 interface IOverlayNotify2 : IOverlayNotify
436 HRESULT OnDisplayChange(
440 typedef IOverlayNotify2 *POVERLAYNOTIFY2;
445 uuid(56a868a1-0ad4-11ce-b03a-0020af0ba770),
446 pointer_default(unique)
448 interface IOverlay : IUnknown
451 [out] DWORD *pdwColors,
452 [out] PALETTEENTRY **ppPalette);
456 [in] PALETTEENTRY *pPalette);
458 HRESULT GetDefaultColorKey([out] COLORKEY *pColorKey);
460 HRESULT GetColorKey([out] COLORKEY *pColorKey);
462 HRESULT SetColorKey([in,out] COLORKEY *pColorKey);
464 HRESULT GetWindowHandle([out] HWND *pHwnd);
466 HRESULT GetClipList([out] RECT *pSourceRect,
467 [out] RECT *pDestinationRect,
468 [out] RGNDATA **ppRgnData);
470 HRESULT GetVideoPosition([out] RECT *pSourceRect,
471 [out] RECT *pDestinationRect);
474 [in] IOverlayNotify *pOverlayNotify,
475 [in] DWORD dwInterests);
480 typedef IOverlay *POVERLAY;
484 uuid(56a868a2-0ad4-11ce-b03a-0020af0ba770),
485 pointer_default(unique)
487 interface IMediaEventSink : IUnknown
491 [in] LONG_PTR EventParam1,
492 [in] LONG_PTR EventParam2
496 typedef IMediaEventSink *PMEDIAEVENTSINK;
500 uuid(56a868a6-0ad4-11ce-b03a-0020af0ba770),
501 pointer_default(unique)
503 interface IFileSourceFilter : IUnknown
506 [in] LPCOLESTR pszFileName,
507 [in, unique] const AM_MEDIA_TYPE *pmt
511 [out] LPOLESTR *ppszFileName,
512 [out] AM_MEDIA_TYPE *pmt
516 typedef IFileSourceFilter *PFILTERFILESOURCE;
520 uuid(a2104830-7c70-11cf-8bce-00aa00a3f1a6),
521 pointer_default(unique)
523 interface IFileSinkFilter : IUnknown
526 [in] LPCOLESTR pszFileName,
527 [in, unique] const AM_MEDIA_TYPE *pmt
531 [out] LPOLESTR *ppszFileName,
532 [out] AM_MEDIA_TYPE *pmt
536 typedef IFileSinkFilter *PFILTERFILESINK;
540 uuid(00855B90-CE1B-11d0-BD4F-00A0C911CE86),
541 pointer_default(unique)
543 interface IFileSinkFilter2 : IFileSinkFilter
550 [out] DWORD *pdwFlags
554 typedef IFileSinkFilter2 *PFILESINKFILTER2;
558 AM_FILE_OVERWRITE = 0x00000001,
563 uuid(56a868a9-0ad4-11ce-b03a-0020af0ba770),
564 pointer_default(unique)
566 interface IGraphBuilder : IFilterGraph
569 ( [in] IPin * ppinOut,
574 ( [in] IPin * ppinOut
578 ( [in] LPCWSTR lpcwstrFile,
579 [in, unique] LPCWSTR lpcwstrPlayList
582 HRESULT AddSourceFilter
583 ( [in] LPCWSTR lpcwstrFileName,
584 [in, unique] LPCWSTR lpcwstrFilterName,
585 [out] IBaseFilter* *ppFilter
589 ( [in] DWORD_PTR hFile
594 HRESULT ShouldOperationContinue();
600 uuid(bf87b6e0-8c27-11d0-b3f0-00aa003761c5),
601 pointer_default(unique)
603 interface ICaptureGraphBuilder : IUnknown {
605 HRESULT SetFiltergraph(
606 [in] IGraphBuilder *pfg);
608 HRESULT GetFiltergraph(
609 [out] IGraphBuilder **ppfg);
611 HRESULT SetOutputFileName(
612 [in] const GUID *pType,
613 [in] LPCOLESTR lpstrFile,
614 [out] IBaseFilter **ppf,
615 [out] IFileSinkFilter **ppSink);
617 [local] HRESULT FindInterface(
618 [in, unique] const GUID *pCategory,
619 [in] IBaseFilter *pf,
623 [call_as(FindInterface)] HRESULT RemoteFindInterface(
624 [in, unique] const GUID *pCategory,
625 [in] IBaseFilter *pf,
627 [out] IUnknown **ppint);
629 HRESULT RenderStream(
630 [in] const GUID *pCategory,
631 [in] IUnknown *pSource,
632 [in] IBaseFilter *pfCompressor,
633 [in] IBaseFilter *pfRenderer);
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);
643 HRESULT AllocCapFile(
644 [in] LPCOLESTR lpstr,
645 [in] DWORDLONG dwlSize);
647 HRESULT CopyCaptureFile(
648 [in] LPOLESTR lpwstrOld,
649 [in] LPOLESTR lpwstrNew,
650 [in] int fAllowEscAbort,
651 [in] IAMCopyCaptureFileProgress *pCallback);
656 uuid(670d1d20-a068-11d0-b3f0-00aa003761c5),
657 pointer_default(unique)
659 interface IAMCopyCaptureFileProgress : IUnknown
667 uuid(93E5A4E0-2D50-11d2-ABFA-00A0C9C6E38D),
668 pointer_default(unique)
670 interface ICaptureGraphBuilder2 : IUnknown
672 HRESULT SetFiltergraph(
673 [in] IGraphBuilder *pfg);
675 HRESULT GetFiltergraph(
676 [out] IGraphBuilder **ppfg);
678 HRESULT SetOutputFileName(
679 [in] const GUID *pType,
680 [in] LPCOLESTR lpstrFile,
681 [out] IBaseFilter **ppf,
682 [out] IFileSinkFilter **ppSink);
684 [local] HRESULT FindInterface(
685 [in] const GUID *pCategory,
686 [in] const GUID *pType,
687 [in] IBaseFilter *pf,
691 [call_as(FindInterface)] HRESULT RemoteFindInterface(
692 [in] const GUID *pCategory,
693 [in] const GUID *pType,
694 [in] IBaseFilter *pf,
696 [out] IUnknown **ppint);
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);
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);
714 HRESULT AllocCapFile(
715 [in] LPCOLESTR lpstr,
716 [in] DWORDLONG dwlSize);
718 HRESULT CopyCaptureFile(
719 [in] LPOLESTR lpwstrOld,
720 [in] LPOLESTR lpwstrNew,
721 [in] int fAllowEscAbort,
722 [in] IAMCopyCaptureFileProgress *pCallback);
725 [in] IUnknown *pSource,
726 [in] PIN_DIRECTION pindir,
727 [in] const GUID *pCategory,
728 [in] const GUID *pType,
729 [in] BOOL fUnconnected,
734 enum _AM_RENSDEREXFLAGS
736 AM_RENDEREX_RENDERTOEXISTINGRENDERERS = 0x01
741 uuid(36b73882-c2c8-11cf-8b46-00805f6cef60),
742 pointer_default(unique)
744 interface IFilterGraph2: IGraphBuilder
746 HRESULT AddSourceFilterForMoniker(
747 [in] IMoniker *pMoniker,
749 [in, unique] LPCWSTR lpcwstrFilterName,
750 [out] IBaseFilter **ppFilter
755 [in, unique] const AM_MEDIA_TYPE *pmt
758 HRESULT RenderEx( [in] IPin *pPinOut,
760 [in, out] DWORD *pvContext
767 uuid(56a868bf-0ad4-11ce-b03a-0020af0ba770),
768 pointer_default(unique)
770 interface IStreamBuilder : IUnknown
773 ( [in] IPin * ppinOut,
774 [in] IGraphBuilder * pGraph
778 ( [in] IPin * ppinOut,
779 [in] IGraphBuilder * pGraph
784 /*****************************************************************************
785 * IAMStreamConfig interface
789 uuid(c6e13340-30ac-11d0-a18c-00a0c9118956),
790 pointer_default(unique)
792 interface IAMStreamConfig : IUnknown
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,
802 typedef enum tagVideoProcAmpProperty
804 VideoProcAmp_Brightness,
805 VideoProcAmp_Contrast,
807 VideoProcAmp_Saturation,
808 VideoProcAmp_Sharpness,
810 VideoProcAmp_ColorEnable,
811 VideoProcAmp_WhiteBalance,
812 VideoProcAmp_BacklightCompensation,
814 } VideoProcAmpProperty;
816 typedef enum tagVideoProcAmpFlags
818 VideoProcAmp_Flags_Auto = 0x0001,
819 VideoProcAmp_Flags_Manual = 0x0002,
822 /*****************************************************************************
823 * IAMVideoProcAmp interface
827 uuid(c6e13360-30ac-11d0-a18c-00a0c9118956),
828 pointer_default(unique)
830 interface IAMVideoProcAmp : IUnknown
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);
842 uuid(56a868aa-0ad4-11ce-b03a-0020af0ba770),
843 pointer_default(unique)
845 interface IAsyncReader : IUnknown
847 HRESULT RequestAllocator(
848 [in] IMemAllocator* pPreferred,
849 [in] ALLOCATOR_PROPERTIES* pProps,
850 [out] IMemAllocator ** ppActual);
853 [in] IMediaSample* pSample,
854 [in] DWORD_PTR dwUser);
857 [in] DWORD dwTimeout,
858 [out] IMediaSample** ppSample,
859 [out] DWORD_PTR * pdwUser);
861 HRESULT SyncReadAligned(
862 [in] IMediaSample* pSample);
865 [in] LONGLONG llPosition,
867 [out, size_is(lLength)]
871 [out] LONGLONG* pTotal,
872 [out] LONGLONG* pAvailable);
874 HRESULT BeginFlush(void);
876 HRESULT EndFlush(void);
882 uuid(56a868ab-0ad4-11ce-b03a-0020af0ba770),
883 pointer_default(unique)
885 interface IGraphVersion : IUnknown
887 HRESULT QueryVersion(LONG* pVersion);
892 uuid(56a868ad-0ad4-11ce-b03a-0020af0ba770),
893 pointer_default(unique)
895 interface IResourceConsumer : IUnknown
897 HRESULT AcquireResource(
898 [in] LONG idResource);
900 HRESULT ReleaseResource(
901 [in] LONG idResource);
907 uuid(56a868ac-0ad4-11ce-b03a-0020af0ba770),
908 pointer_default(unique)
910 interface IResourceManager : IUnknown
918 HRESULT RegisterGroup(
921 [in, size_is(cResource)]
926 HRESULT RequestResource(
927 [in] LONG idResource,
928 [in] IUnknown* pFocusObject,
929 [in] IResourceConsumer* pConsumer
932 HRESULT NotifyAcquire(
933 [in] LONG idResource,
934 [in] IResourceConsumer* pConsumer,
937 HRESULT NotifyRelease(
938 [in] LONG idResource,
939 [in] IResourceConsumer* pConsumer,
940 [in] BOOL bStillWant);
942 HRESULT CancelRequest(
943 [in] LONG idResource,
944 [in] IResourceConsumer* pConsumer);
947 [in] IUnknown* pFocusObject);
949 HRESULT ReleaseFocus(
950 [in] IUnknown* pFocusObject);
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")
961 uuid(31efac30-515c-11d0-a9aa-00aa0061be93),
962 pointer_default(unique),
965 interface IKsPropertySet : IUnknown
967 HRESULT Set( [in] REFGUID guidPropSet,
969 [in, size_is(cbInstanceData)] LPVOID pInstanceData,
970 [in] DWORD cbInstanceData,
971 [in, size_is(cbPropData)] LPVOID pPropData,
972 [in] DWORD cbPropData );
974 HRESULT Get( [in] REFGUID guidPropSet,
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 );
982 HRESULT QuerySupported( [in] REFGUID guidPropSet,
984 [out] DWORD *pTypeSupport);
986 cpp_quote("#endif /* _IKsPropertySet_ */")
990 uuid(36b73883-c2c8-11cf-8b46-00805f6cef60),
991 pointer_default(unique)
993 interface ISeekingPassThru : IUnknown
995 HRESULT Init( [in] BOOL bSupportRendering, [in] IPin *pPin);
998 enum _AM_FILTER_MISC_FLAGS
1000 AM_FILTER_MISC_FLAGS_IS_RENDERER = 0x1,
1001 AM_FILTER_MISC_FLAGS_IS_SOURCE = 0x2
1007 uuid(2dd74950-a890-11d1-abe8-00a0c905f375),
1008 pointer_default(unique)
1010 interface IAMFilterMiscFlags : IUnknown
1012 ULONG GetMiscFlags();
1018 uuid(4995f511-9ddb-4f12-bd3b-f04611807b79),
1019 pointer_default(unique)
1021 interface IAMGraphBuilderCallback : IUnknown
1023 HRESULT SelectedFilter(
1024 [in] IMoniker *pMon);
1026 HRESULT CreatedFilter(
1027 [in] IBaseFilter *pFil);