Add explanatory comments to the #endif part of multiple inclusion guards.
[mplayer/greg.git] / stream / tvi_dshow.h
blobee75c11d40d0fd75bb6535010a1f6513446dfbe3
1 #ifndef TVI_DSHOW_H_
2 #define TVI_DSHOW_H_
4 /// \defgroup tvi_dshow TV driver (Directshow)
6 #define INITGUID
7 #include <inttypes.h>
8 //#include <ole2.h>
9 #include <vfw.h>
10 #include "loader/dshow/mediatype.h"
11 #include "loader/dshow/guids.h"
13 #define wtoa(strW,strA,lenA) WideCharToMultiByte(0,0,strW,-1,strA,lenA,NULL,NULL)
14 #define atow(strA,strW,lenW) MultiByteToWideChar(0,0,strA,strlen(strA),strW,lenW)
16 typedef struct DISPPARAMS *LPDISPPARAMS;
17 typedef struct IFileSinkFilter *LPFILESINKFILTER;
18 typedef struct IAMCopyCaptureFileProgress *LPAMCOPYCAPTUREFILEPROGRESS;
19 typedef struct IErrorLog *LPERRORLOG;
20 typedef struct IAMTunerNotification *LPAMTUNERNOTIFICATION;
21 typedef struct IFilterGraph *LPFILTERGRAPH;
22 typedef struct IBaseFilter *LPBASEFILTER;
23 typedef struct IPin *LPPIN;
24 typedef struct IEnumPins *LPENUMPINS;
25 typedef struct IEnumFilters *LPENUMFILTERS;
26 typedef struct IEnumMediaTypes *LPENUMMEDIATYPES;
27 typedef struct IReferenceClock *LPREFERENCECLOCK;
28 typedef struct IMediaSample *LPMEDIASAMPLE;
29 typedef struct IVideoWindow *LPVIDEOWINDOW;
31 typedef struct
33 long cBuffers;
34 long cbBuffer;
35 long cbAlign;
36 long cbPrefix;
37 }ALLOCATOR_PROPERTIES;
39 typedef
40 enum tagTunerInputType { TunerInputCable = 0,
41 TunerInputAntenna = TunerInputCable + 1
42 } TunerInputType;
43 typedef enum tagAMTunerModeType {
44 AMTUNER_MODE_DEFAULT = 0x0000,
45 AMTUNER_MODE_TV = 0x0001,
46 AMTUNER_MODE_FM_RADIO = 0x0002,
47 AMTUNER_MODE_AM_RADIO = 0x0004,
48 AMTUNER_MODE_DSS = 0x0008
49 } AMTunerModeType;
50 enum tagAMTunerSubChannel { AMTUNER_SUBCHAN_NO_TUNE = -2,
51 AMTUNER_SUBCHAN_DEFAULT = -1
52 } AMTunerSubChannel;
53 typedef enum tagVideoProcAmpProperty {
54 VideoProcAmp_Brightness,
55 VideoProcAmp_Contrast,
56 VideoProcAmp_Hue,
57 VideoProcAmp_Saturation,
58 VideoProcAmp_Sharpness,
59 VideoProcAmp_Gamma,
60 VideoProcAmp_ColorEnable,
61 VideoProcAmp_WhiteBalance,
62 VideoProcAmp_BacklightCompensation,
63 VideoProcAmp_Gain
64 } VideoProcAmpProperty;
66 typedef long OAFilterState;
67 typedef
68 enum tagAnalogVideoStandard { AnalogVideo_None = 0,
69 AnalogVideo_NTSC_M = 0x1,
70 AnalogVideo_NTSC_M_J = 0x2,
71 AnalogVideo_NTSC_433 = 0x4,
72 AnalogVideo_PAL_B = 0x10,
73 AnalogVideo_PAL_D = 0x20,
74 AnalogVideo_PAL_G = 0x40,
75 AnalogVideo_PAL_H = 0x80,
76 AnalogVideo_PAL_I = 0x100,
77 AnalogVideo_PAL_M = 0x200,
78 AnalogVideo_PAL_N = 0x400,
79 AnalogVideo_PAL_60 = 0x800,
80 AnalogVideo_SECAM_B = 0x1000,
81 AnalogVideo_SECAM_D = 0x2000,
82 AnalogVideo_SECAM_G = 0x4000,
83 AnalogVideo_SECAM_H = 0x8000,
84 AnalogVideo_SECAM_K = 0x10000,
85 AnalogVideo_SECAM_K1 = 0x20000,
86 AnalogVideo_SECAM_L = 0x40000,
87 AnalogVideo_SECAM_L1 = 0x80000
88 } AnalogVideoStandard;
91 typedef LONG_PTR OAHWND;
92 typedef enum tagPhysicalConnectorType { PhysConn_Video_Tuner = 1,
93 PhysConn_Video_Composite = PhysConn_Video_Tuner + 1,
94 PhysConn_Video_SVideo = PhysConn_Video_Composite + 1,
95 PhysConn_Video_RGB = PhysConn_Video_SVideo + 1,
96 PhysConn_Video_YRYBY = PhysConn_Video_RGB + 1,
97 PhysConn_Video_SerialDigital = PhysConn_Video_YRYBY + 1,
98 PhysConn_Video_ParallelDigital = PhysConn_Video_SerialDigital + 1,
99 PhysConn_Video_SCSI = PhysConn_Video_ParallelDigital + 1,
100 PhysConn_Video_AUX = PhysConn_Video_SCSI + 1,
101 PhysConn_Video_1394 = PhysConn_Video_AUX + 1,
102 PhysConn_Video_USB = PhysConn_Video_1394 + 1,
103 PhysConn_Video_VideoDecoder = PhysConn_Video_USB + 1,
104 PhysConn_Video_VideoEncoder = PhysConn_Video_VideoDecoder + 1,
105 PhysConn_Video_SCART = PhysConn_Video_VideoEncoder + 1,
106 PhysConn_Video_Black = PhysConn_Video_SCART + 1,
107 PhysConn_Audio_Tuner = 0x1000,
108 PhysConn_Audio_Line = PhysConn_Audio_Tuner + 1,
109 PhysConn_Audio_Mic = PhysConn_Audio_Line + 1,
110 PhysConn_Audio_AESDigital = PhysConn_Audio_Mic + 1,
111 PhysConn_Audio_SPDIFDigital = PhysConn_Audio_AESDigital + 1,
112 PhysConn_Audio_SCSI = PhysConn_Audio_SPDIFDigital + 1,
113 PhysConn_Audio_AUX = PhysConn_Audio_SCSI + 1,
114 PhysConn_Audio_1394 = PhysConn_Audio_AUX + 1,
115 PhysConn_Audio_USB = PhysConn_Audio_1394 + 1,
116 PhysConn_Audio_AudioDecoder = PhysConn_Audio_USB + 1
117 } PhysicalConnectorType;
119 typedef struct _VIDEO_STREAM_CONFIG_CAPS {
120 GUID guid; // will be MEDIATYPE_Video
121 ULONG VideoStandard; // logical OR of all AnalogVideoStandards
122 // supported
123 SIZE InputSize; // the inherent size of the incoming signal
124 // (every pixel unique)
125 SIZE MinCroppingSize; // smallest rcSrc cropping rect allowed
126 SIZE MaxCroppingSize; // largest rcSrc cropping rect allowed
127 int CropGranularityX; // granularity of cropping size
128 int CropGranularityY;
129 int CropAlignX; // alignment of cropping rect
130 int CropAlignY;
131 SIZE MinOutputSize; // smallest bitmap stream can produce
132 SIZE MaxOutputSize; // largest bitmap stream can produce
133 int OutputGranularityX; // granularity of output bitmap size
134 int OutputGranularityY;
135 int StretchTapsX; // 0, no stretch, 1 pix dup, 2 interp, ...
136 int StretchTapsY; // Describes quality of hardware scaler
137 int ShrinkTapsX; //
138 int ShrinkTapsY; //
139 LONGLONG MinFrameInterval; // 100 nS units
140 LONGLONG MaxFrameInterval;
141 LONG MinBitsPerSecond;
142 LONG MaxBitsPerSecond;
143 } VIDEO_STREAM_CONFIG_CAPS, *PVIDEO_STREAM_CONFIG_CAPS;
145 typedef struct _AUDIO_STREAM_CONFIG_CAPS {
146 GUID guid;
147 ULONG MinimumChannels;
148 ULONG MaximumChannels;
149 ULONG ChannelsGranularity;
150 ULONG MinimumBitsPerSample;
151 ULONG MaximumBitsPerSample;
152 ULONG BitsPerSampleGranularity;
153 ULONG MinimumSampleFrequency;
154 ULONG MaximumSampleFrequency;
155 ULONG SampleFrequencyGranularity;
156 } AUDIO_STREAM_CONFIG_CAPS;
158 typedef enum tagVideoProcAmpFlags {
159 VideoProcAmp_Flags_Auto = 0x0001,
160 VideoProcAmp_Flags_Manual = 0x0002
161 } VideoProcAmpFlags;
162 typedef enum {
163 PINDIR_INPUT = 0,
164 PINDIR_OUTPUT
165 } PIN_DIRECTION;
167 #define KSPROPERTY_SUPPORT_GET 1
168 #define KSPROPERTY_SUPPORT_SET 2
169 typedef struct {
170 GUID Set;
171 ULONG Id;
172 ULONG Flags;
173 } KSIDENTIFIER;
175 typedef KSIDENTIFIER KSPROPERTY;
178 typedef struct {
179 KSPROPERTY Property;
180 ULONG Mode; // IN: KSPROPERTY_TUNER_MODE
181 ULONG StandardsSupported; // KS_AnalogVideo_* (if TV or DSS)
182 ULONG MinFrequency; // Hz
183 ULONG MaxFrequency; // Hz
184 ULONG TuningGranularity; // Hz
185 ULONG NumberOfInputs; // count of inputs
186 ULONG SettlingTime; // milliSeconds
187 ULONG Strategy; // KS_TUNER_STRATEGY
188 } KSPROPERTY_TUNER_MODE_CAPS_S, *PKSPROPERTY_TUNER_MODE_CAPS_S;
190 typedef struct {
191 KSPROPERTY Property;
192 ULONG Mode; // IN: KSPROPERTY_TUNER_MODE
193 } KSPROPERTY_TUNER_MODE_S, *PKSPROPERTY_TUNER_MODE_S;
195 typedef struct {
196 KSPROPERTY Property;
197 ULONG Frequency; // Hz
198 ULONG LastFrequency; // Hz (last known good)
199 ULONG TuningFlags; // KS_TUNER_TUNING_FLAGS
200 ULONG VideoSubChannel; // DSS
201 ULONG AudioSubChannel; // DSS
202 ULONG Channel; // VBI decoders
203 ULONG Country; // VBI decoders
204 } KSPROPERTY_TUNER_FREQUENCY_S, *PKSPROPERTY_TUNER_FREQUENCY_S;
205 typedef struct {
206 KSPROPERTY Property;
207 ULONG CurrentFrequency;
208 ULONG PLLOffset;
209 ULONG SignalStrength;
210 ULONG Busy;
211 } KSPROPERTY_TUNER_STATUS_S, *PKSPROPERTY_TUNER_STATUS_S;
212 typedef enum {
213 KS_TUNER_TUNING_EXACT = 1, // No fine tuning
214 KS_TUNER_TUNING_FINE, // Fine grained search
215 KS_TUNER_TUNING_COARSE, // Coarse search
216 } KS_TUNER_TUNING_FLAGS;
218 typedef enum {
219 KSPROPERTY_TUNER_CAPS, // R -overall device capabilities
220 KSPROPERTY_TUNER_MODE_CAPS, // R -capabilities in this mode
221 KSPROPERTY_TUNER_MODE, // RW -set a mode (TV, FM, AM, DSS)
222 KSPROPERTY_TUNER_STANDARD, // R -get TV standard (only if TV mode)
223 KSPROPERTY_TUNER_FREQUENCY, // RW -set/get frequency
224 KSPROPERTY_TUNER_INPUT, // RW -select an input
225 KSPROPERTY_TUNER_STATUS, // R -tuning status
226 KSPROPERTY_TUNER_IF_MEDIUM // R O-Medium for IF or Transport Pin
227 } KSPROPERTY_TUNER;
228 typedef enum {
229 KS_TUNER_STRATEGY_PLL = 0X01, // Tune by PLL offset
230 KS_TUNER_STRATEGY_SIGNAL_STRENGTH = 0X02, // Tune by signal strength
231 KS_TUNER_STRATEGY_DRIVER_TUNES = 0X04, // Driver does fine tuning
232 } KS_TUNER_STRATEGY;
233 typedef enum tagTVAudioMode {
234 AMTVAUDIO_MODE_MONO = 0x0001,
235 AMTVAUDIO_MODE_STEREO = 0x0002,
236 AMTVAUDIO_MODE_LANG_A = 0x0010,
237 AMTVAUDIO_MODE_LANG_B = 0x0020,
238 AMTVAUDIO_MODE_LANG_C = 0x0040,
239 } TVAudioMode;
241 typedef struct _FilterInfo {
242 WCHAR achName[128];
243 LPFILTERGRAPH pGraph;
244 } FILTER_INFO;
246 typedef struct _PinInfo {
247 LPBASEFILTER pFilter;
248 PIN_DIRECTION dir;
249 unsigned short achName[128];
250 } PIN_INFO;
251 //-----------------------------------
254 #undef INTERFACE
255 #define INTERFACE IPin
256 DECLARE_INTERFACE(IPin)
258 STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
259 STDMETHOD_(long, AddRef) (THIS);
260 STDMETHOD_(long, Release) (THIS);
261 STDMETHOD(Connect) (THIS_ IPin *, AM_MEDIA_TYPE *);
262 STDMETHOD(ReceiveConnection) (THIS_ IPin *, const AM_MEDIA_TYPE *);
263 STDMETHOD(Disconnect) (THIS);
264 STDMETHOD(ConnectedTo) (THIS_ IPin **);
265 STDMETHOD(ConnectionMediaType) (THIS_ AM_MEDIA_TYPE * pmt);
266 STDMETHOD(QueryPinInfo) (THIS_ PIN_INFO *);
267 STDMETHOD(QueryDirection) (THIS_ PIN_DIRECTION *);
268 STDMETHOD(QueryId) (THIS_ unsigned short **);
269 STDMETHOD(QueryAccept) (THIS_ const AM_MEDIA_TYPE *);
270 STDMETHOD(EnumMediaTypes) (THIS_ LPENUMMEDIATYPES *);
271 STDMETHOD(QueryInternalConnections) (THIS_ IPin **, unsigned long *);
272 STDMETHOD(EndOfStream) (THIS);
273 STDMETHOD(BeginFlush) (THIS);
274 STDMETHOD(EndFlush) (THIS);
275 STDMETHOD(NewSegment) (THIS_ REFERENCE_TIME, REFERENCE_TIME, double);
278 #undef INTERFACE
279 #define INTERFACE IBaseFilter
280 DECLARE_INTERFACE(IBaseFilter)
282 STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
283 STDMETHOD_(long, AddRef) (THIS);
284 STDMETHOD_(long, Release) (THIS);
285 STDMETHOD(GetClassID) (THIS_ CLSID * pClassID);
286 STDMETHOD(Stop) (THIS);
287 STDMETHOD(Pause) (THIS);
288 STDMETHOD(Run) (THIS_ REFERENCE_TIME tStart);
289 STDMETHOD(GetState) (THIS_ unsigned long, void *);
290 STDMETHOD(SetSyncSource) (THIS_ LPREFERENCECLOCK);
291 STDMETHOD(GetSyncSource) (THIS_ LPREFERENCECLOCK *);
292 STDMETHOD(EnumPins) (THIS_ LPENUMPINS *);
293 STDMETHOD(FindPin) (THIS_ const unsigned short *, LPPIN *);
294 STDMETHOD(QueryFilterInfo) (THIS_ void *);
295 STDMETHOD(JoinFilterGraph) (THIS_ LPFILTERGRAPH,
296 const unsigned short *);
297 STDMETHOD(QueryVendorInfo) (THIS_ unsigned short **);
300 #undef INTERFACE
301 #define INTERFACE IAMTVTuner
302 DECLARE_INTERFACE(IAMTVTuner)
304 STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
305 STDMETHOD_(long, AddRef) (THIS);
306 STDMETHOD_(long, Release) (THIS);
307 STDMETHOD(put_Channel) (THIS_ long, long, long);
308 STDMETHOD(get_Channel) (THIS_ long *, long *, long *);
309 STDMETHOD(ChannelMinMax) (THIS_ long *, long *);
310 STDMETHOD(put_CountryCode) (THIS_ long);
311 STDMETHOD(get_CountryCode) (THIS_ long *);
312 STDMETHOD(put_TuningSpace) (THIS_ long);
313 STDMETHOD(get_TuningSpace) (THIS_ long *);
314 STDMETHOD(Logon) (THIS_ HANDLE);
315 STDMETHOD(Logout) (IAMTVTuner *);
316 STDMETHOD(SignalPresen) (THIS_ long *);
317 STDMETHOD(put_Mode) (THIS_ AMTunerModeType);
318 STDMETHOD(get_Mode) (THIS_ AMTunerModeType *);
319 STDMETHOD(GetAvailableModes) (THIS_ long *);
320 STDMETHOD(RegisterNotificationCallBack) (THIS_ LPAMTUNERNOTIFICATION,
321 long);
322 STDMETHOD(UnRegisterNotificationCallBack) (THIS_
323 LPAMTUNERNOTIFICATION);
324 STDMETHOD(get_AvailableTVFormats) (THIS_ long *);
325 STDMETHOD(get_TVFormat) (THIS_ long *);
326 STDMETHOD(AutoTune) (THIS_ long, long *);
327 STDMETHOD(StoreAutoTune) (IAMTVTuner *);
328 STDMETHOD(get_NumInputConnections) (THIS_ long *);
329 STDMETHOD(put_InputType) (THIS_ long, TunerInputType);
330 STDMETHOD(get_InputType) (THIS_ long, TunerInputType *);
331 STDMETHOD(put_ConnectInput) (THIS_ long);
332 STDMETHOD(get_ConnectInput) (THIS_ long *);
333 STDMETHOD(get_VideoFrequency) (THIS_ long *);
334 STDMETHOD(get_AudioFrequency) (THIS_ long *);
337 #undef INTERFACE
338 #define INTERFACE IMediaControl
339 DECLARE_INTERFACE(IMediaControl)
341 STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
342 STDMETHOD_(long, AddRef) (THIS);
343 STDMETHOD_(long, Release) (THIS);
344 STDMETHOD(GetTypeInfoCount) (THIS_ UINT *);
345 STDMETHOD(GetTypeInfo) (THIS_ UINT, LCID, LPTYPEINFO *);
346 STDMETHOD(GetIDsOfNames) (THIS_ REFIID, LPOLESTR *, UINT, LCID,
347 DISPID *);
348 STDMETHOD(Invoke) (THIS_ DISPID, REFIID, LCID, WORD, LPDISPPARAMS,
349 VARIANT *, EXCEPINFO *, UINT *);
350 STDMETHOD(Run) (THIS);
351 STDMETHOD(Pause) (THIS);
352 STDMETHOD(Stop) (THIS);
353 STDMETHOD(GetState) (THIS_ LONG, OAFilterState *);
354 STDMETHOD(RenderFile) (THIS_ BSTR);
355 STDMETHOD(AddSourceFilter) (THIS_ BSTR, LPDISPATCH *);
356 STDMETHOD(get_FilterCollection) (THIS_ LPDISPATCH *);
357 STDMETHOD(get_RegFilterCollection) (THIS_ LPDISPATCH *);
358 STDMETHOD(StopWhenReady) (IMediaControl *);
361 #undef INTERFACE
362 #define INTERFACE IGraphBuilder
363 DECLARE_INTERFACE(IGraphBuilder)
365 STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
366 STDMETHOD_(long, AddRef) (THIS);
367 STDMETHOD_(long, Release) (THIS);
368 STDMETHOD(AddFilter) (THIS_ IBaseFilter *, LPCWSTR);
369 STDMETHOD(RemoveFilter) (THIS_ IBaseFilter *);
370 STDMETHOD(EnumFilters) (THIS_ LPENUMFILTERS *);
371 STDMETHOD(FindFilterByName) (THIS_ LPCWSTR, IBaseFilter **);
372 STDMETHOD(ConnectDirect) (THIS_ IPin *, IPin *, const AM_MEDIA_TYPE *);
373 STDMETHOD(Reconnect) (THIS_ IPin *);
374 STDMETHOD(Disconnect) (THIS_ IPin *);
375 STDMETHOD(SetDefaultSyncSource) (IGraphBuilder *);
376 STDMETHOD(Connect) (THIS_ IPin *, IPin *);
377 STDMETHOD(Render) (THIS_ IPin *);
378 STDMETHOD(RenderFile) (THIS_ LPCWSTR, LPCWSTR);
379 STDMETHOD(AddSourceFilter) (THIS_ LPCWSTR, LPCWSTR, IBaseFilter **);
380 STDMETHOD(SetLogFile) (THIS_ DWORD_PTR);
381 STDMETHOD(Abort) (IGraphBuilder *);
382 STDMETHOD(ShouldOperationContinue) (IGraphBuilder *);
386 #undef INTERFACE
387 #define INTERFACE ICaptureGraphBuilder2
388 DECLARE_INTERFACE(ICaptureGraphBuilder2)
390 STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
391 STDMETHOD_(long, AddRef) (THIS);
392 STDMETHOD_(long, Release) (THIS);
393 STDMETHOD(SetFiltergraph) (THIS_ IGraphBuilder *);
394 STDMETHOD(GetFiltergraph) (THIS_ IGraphBuilder **);
395 STDMETHOD(SetOutputFileName) (THIS_ const GUID *, LPCOLESTR,
396 IBaseFilter **, LPFILESINKFILTER *);
397 STDMETHOD(FindInterface) (THIS_ const GUID *, const GUID *,
398 IBaseFilter *, REFIID, void **);
399 STDMETHOD(RenderStream) (THIS_ const GUID *, const GUID *, IUnknown *,
400 IBaseFilter *, IBaseFilter *);
401 STDMETHOD(ControlStream) (THIS_ const GUID *, const GUID *,
402 IBaseFilter *, REFERENCE_TIME *,
403 REFERENCE_TIME *, WORD, WORD);
404 STDMETHOD(AllocCapFile) (THIS_ LPCOLESTR, DWORDLONG);
405 STDMETHOD(CopyCaptureFile) (THIS_ LPOLESTR, LPOLESTR, int,
406 LPAMCOPYCAPTUREFILEPROGRESS);
407 STDMETHOD(FindPin) (THIS_ IUnknown *, PIN_DIRECTION, const GUID *,
408 const GUID *, BOOL, int, IPin **);
411 #undef INTERFACE
412 #define INTERFACE ICreateDevEnum
413 DECLARE_INTERFACE(ICreateDevEnum)
415 STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
416 STDMETHOD_(long, AddRef) (THIS);
417 STDMETHOD_(long, Release) (THIS);
418 STDMETHOD(CreateClassEnumerator) (THIS_ REFCLSID, IEnumMoniker **,
419 DWORD);
422 #undef INTERFACE
423 #define INTERFACE IAMCrossbar
424 DECLARE_INTERFACE(IAMCrossbar)
426 STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
427 STDMETHOD_(long, AddRef) (THIS);
428 STDMETHOD_(long, Release) (THIS);
429 STDMETHOD(get_PinCounts) (THIS_ long *, long *);
430 STDMETHOD(CanRoute) (THIS_ long, long);
431 STDMETHOD(Route) (THIS_ long, long);
432 STDMETHOD(get_IsRoutedTo) (THIS_ long, long *);
433 STDMETHOD(get_CrossbarPinInfo) (THIS_ BOOL, long, long *, long *);
436 #undef INTERFACE
437 #define INTERFACE IPropertyBag
438 DECLARE_INTERFACE(IPropertyBag)
440 STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
441 STDMETHOD_(long, AddRef) (THIS);
442 STDMETHOD_(long, Release) (THIS);
443 STDMETHOD(Read) (THIS_ LPCOLESTR, LPVARIANT, LPERRORLOG);
444 STDMETHOD(Write) (THIS_ LPCOLESTR, LPVARIANT);
447 #undef INTERFACE
448 #define INTERFACE IAMStreamConfig
449 DECLARE_INTERFACE(IAMStreamConfig)
451 STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
452 STDMETHOD_(long, AddRef) (THIS);
453 STDMETHOD_(long, Release) (THIS);
454 HRESULT(STDMETHODCALLTYPE * SetFormat) (THIS_ AM_MEDIA_TYPE *);
455 HRESULT(STDMETHODCALLTYPE * GetFormat) (THIS_ AM_MEDIA_TYPE **);
456 HRESULT(STDMETHODCALLTYPE * GetNumberOfCapabilities) (THIS_ int *,int *);
457 HRESULT(STDMETHODCALLTYPE * GetStreamCaps) (THIS_ int,AM_MEDIA_TYPE **, BYTE *);
460 #undef INTERFACE
461 #define INTERFACE IAMVideoProcAmp
462 DECLARE_INTERFACE(IAMVideoProcAmp)
464 STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
465 STDMETHOD_(long, AddRef) (THIS);
466 STDMETHOD_(long, Release) (THIS);
467 STDMETHOD(GetRange) (THIS_ long, long *, long *, long *, long *,long *);
468 STDMETHOD(Set) (THIS_ long, long, long);
469 STDMETHOD(Get) (THIS_ long, long *, long *);
472 #undef INTERFACE
473 #define INTERFACE IKsPropertySet
474 DECLARE_INTERFACE(IKsPropertySet)
476 STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
477 STDMETHOD_(long, AddRef) (THIS);
478 STDMETHOD_(long, Release) (THIS);
479 HRESULT(STDMETHODCALLTYPE * Set) (THIS_ REFGUID, DWORD, LPVOID, DWORD,LPVOID, DWORD);
480 HRESULT(STDMETHODCALLTYPE * Get) (THIS_ REFGUID, DWORD, LPVOID, DWORD,LPVOID, DWORD, DWORD *);
481 HRESULT(STDMETHODCALLTYPE * QuerySupported) (THIS_ REFGUID, DWORD,DWORD *);
484 #undef INTERFACE
485 #define INTERFACE IAMAnalogVideoDecoder
486 DECLARE_INTERFACE(IAMAnalogVideoDecoder)
488 STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
489 STDMETHOD_(long, AddRef) (THIS);
490 STDMETHOD_(long, Release) (THIS);
491 STDMETHOD(get_AvailableTVFormats) (THIS_ long *);
492 STDMETHOD(put_TVFormat) (THIS_ long);
493 STDMETHOD(get_TVFormat) (THIS_ long *);
494 STDMETHOD(get_HorizontalLocked) (THIS_ long *);
495 STDMETHOD(put_VCRHorizontalLocking) (THIS_ long);
496 STDMETHOD(get_VCRHorizontalLocking) (THIS_ long *);
497 STDMETHOD(get_NumberOfLines) (THIS_ long *);
498 STDMETHOD(put_OutputEnable) (THIS_ long);
499 STDMETHOD(get_OutputEnable) (THIS_ long *);
502 #undef INTERFACE
503 #define INTERFACE IAMTVAudio
504 DECLARE_INTERFACE(IAMTVAudio)
506 STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
507 STDMETHOD_(long, AddRef) (THIS);
508 STDMETHOD_(long, Release) (THIS);
509 STDMETHOD(GetHardwareSupportedTVAudioModes) (THIS_ long *);
510 STDMETHOD(GetAvailableTVAudioModes) (THIS_ long *);
511 STDMETHOD(get_TVAudioMode) (THIS_ long *);
512 STDMETHOD(put_TVAudioMode) (THIS_ long);
513 STDMETHOD(RegisterNotificationCallBack) (THIS_ LPAMTUNERNOTIFICATION,
514 long);
515 STDMETHOD(UnRegisterNotificationCallBack) (THIS_
516 LPAMTUNERNOTIFICATION);
520 #undef INTERFACE
521 #define INTERFACE ISampleGrabberCB
522 DECLARE_INTERFACE(ISampleGrabberCB)
524 STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
525 STDMETHOD_(long, AddRef) (THIS);
526 STDMETHOD_(long, Release) (THIS);
527 STDMETHOD(SampleCB) (THIS_ double, LPMEDIASAMPLE);
528 STDMETHOD(BufferCB) (THIS_ double, BYTE *, long);
531 #undef INTERFACE
532 #define INTERFACE ISampleGrabber
533 DECLARE_INTERFACE(ISampleGrabber)
535 STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
536 STDMETHOD_(long, AddRef) (THIS);
537 STDMETHOD_(long, Release) (THIS);
538 STDMETHOD(SetOneShot) (THIS_ BOOL);
539 STDMETHOD(SetMediaType) (THIS_ const AM_MEDIA_TYPE *);
540 STDMETHOD(GetConnectedMediaType) (THIS_ AM_MEDIA_TYPE *);
541 STDMETHOD(SetBufferSamples) (THIS_ BOOL);
542 STDMETHOD(GetCurrentBuffer) (THIS_ long *, long *);
543 STDMETHOD(GetCurrentSample) (THIS_ LPMEDIASAMPLE *);
544 STDMETHOD(SetCallback) (THIS_ ISampleGrabberCB *, long);
547 #undef INTERFACE
548 #define INTERFACE IFilterGraph
549 DECLARE_INTERFACE(IFilterGraph)
551 STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
552 STDMETHOD_(long, AddRef) (THIS);
553 STDMETHOD_(long, Release) (THIS);
554 STDMETHOD(AddFilter) (THIS_ LPBASEFILTER, LPCWSTR);
555 STDMETHOD(RemoveFilter) (THIS_ LPBASEFILTER);
556 STDMETHOD(EnumFilters) (THIS_ LPENUMFILTERS *);
557 STDMETHOD(FindFilterByName) (THIS_ LPCWSTR, LPBASEFILTER *);
558 STDMETHOD(ConnectDirect) (THIS_ IPin *, IPin *, const AM_MEDIA_TYPE *);
559 STDMETHOD(Reconnect) (THIS_ LPPIN);
560 STDMETHOD(Disconnect) (THIS_ LPPIN);
561 STDMETHOD(SetDefaultSyncSource) (THIS);
564 #undef INTERFACE
565 #define INTERFACE IAMAudioInputMixer
566 DECLARE_INTERFACE(IAMAudioInputMixer)
568 STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
569 STDMETHOD_(long, AddRef) (THIS);
570 STDMETHOD_(long, Release) (THIS);
571 STDMETHOD(put_Enable) (THIS_ BOOL);
572 STDMETHOD(get_Enable) (THIS_ BOOL *);
573 STDMETHOD(put_Mono) (THIS_ BOOL);
574 STDMETHOD(get_Mono) (THIS_ BOOL *);
575 STDMETHOD(put_MixLevel) (THIS_ double);
576 STDMETHOD(get_MixLevel) (THIS_ double *);
577 STDMETHOD(put_Pan) (THIS_ double);
578 STDMETHOD(get_Pan) (THIS_ double *);
579 STDMETHOD(put_Loudness) (THIS_ BOOL);
580 STDMETHOD(get_Loudness) (THIS_ BOOL *);
581 STDMETHOD(put_Treble) (THIS_ double);
582 STDMETHOD(get_Treble) (THIS_ double *);
583 STDMETHOD(get_TrebleRange) (THIS_ double *);
584 STDMETHOD(put_Bass) (THIS_ double);
585 STDMETHOD(get_Bass) (THIS_ double *);
586 STDMETHOD(get_BassRange) (THIS_ double *);
590 #undef INTERFACE
591 #define INTERFACE IMediaSample
592 DECLARE_INTERFACE(IMediaSample)
594 STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
595 STDMETHOD_(long, AddRef) (THIS);
596 STDMETHOD_(long, Release) (THIS);
597 STDMETHOD(GetPointer )(THIS_ unsigned char** );
598 STDMETHOD_(LONG,GetSize )(THIS);
599 STDMETHOD(GetTime )(THIS_ REFERENCE_TIME* ,REFERENCE_TIME* );
600 STDMETHOD(SetTime )(THIS_ REFERENCE_TIME* ,REFERENCE_TIME* );
601 STDMETHOD(IsSyncPoint )(THIS);
602 STDMETHOD(SetSyncPoint )(THIS_ long );
603 STDMETHOD(IsPreroll )(THIS);
604 STDMETHOD(SetPreroll )(THIS_ long );
605 STDMETHOD_(LONG,GetActualDataLength)(THIS);
606 STDMETHOD(SetActualDataLength )(THIS_ long );
607 STDMETHOD(GetMediaType )(THIS_ AM_MEDIA_TYPE** );
608 STDMETHOD(SetMediaType )(THIS_ AM_MEDIA_TYPE* );
609 STDMETHOD(IsDiscontinuity )(THIS);
610 STDMETHOD(SetDiscontinuity )(THIS_ long );
611 STDMETHOD(GetMediaTime )(THIS_ long long* ,long long* );
612 STDMETHOD(SetMediaTime )(THIS_ long long* ,long long* );
616 #undef INTERFACE
617 #define INTERFACE IAMBufferNegotiation
618 DECLARE_INTERFACE(IAMBufferNegotiation)
620 STDMETHOD(QueryInterface )(THIS_ REFIID ,void **);
621 STDMETHOD_(ULONG,AddRef )(THIS);
622 STDMETHOD_(ULONG,Release )(THIS);
623 STDMETHOD(SuggestAllocatorProperties )(THIS_ const ALLOCATOR_PROPERTIES *);
624 STDMETHOD(GetAllocatorProperties )(THIS_ ALLOCATOR_PROPERTIES *);
628 #undef INTERFACE
629 #define INTERFACE IVideoWindow
630 DECLARE_INTERFACE(IVideoWindow)
632 STDMETHOD(QueryInterface )(THIS_ REFIID ,void **);
633 STDMETHOD_(ULONG,AddRef )(THIS);
634 STDMETHOD_(ULONG,Release )(THIS);
635 STDMETHOD(GetTypeInfoCount) (THIS_ UINT * );
636 STDMETHOD(GetTypeInfo) (THIS_ UINT ,LCID , ITypeInfo ** );
637 STDMETHOD(GetIDsOfNames) (THIS_ REFIID ,LPOLESTR * , UINT ,LCID , DISPID * );
638 STDMETHOD(Invoke) (THIS_ DISPID ,REFIID , LCID , WORD ,void *, VARIANT * ,EXCEPINFO * , UINT * );
639 STDMETHOD(put_Caption) (THIS_ BSTR );
640 STDMETHOD(get_Caption) (THIS_ BSTR * );
641 STDMETHOD(put_WindowStyle) (THIS_ long );
642 STDMETHOD(get_WindowStyle) (THIS_ long *);
643 STDMETHOD(put_WindowStyleEx) (THIS_ long );
644 STDMETHOD(get_WindowStyleEx) (THIS_ long *);
645 STDMETHOD(put_AutoShow) (THIS_ long );
646 STDMETHOD(get_AutoShow) (THIS_ long *);
647 STDMETHOD(put_WindowState) (THIS_ long );
648 STDMETHOD(get_WindowState) (THIS_ long *);
649 STDMETHOD(put_BackgroundPalette) (THIS_ long );
650 STDMETHOD(get_BackgroundPalette) (THIS_ long *);
651 STDMETHOD(put_Visible) (THIS_ long );
652 STDMETHOD(get_Visible) (THIS_ long *);
653 STDMETHOD(put_Left) (THIS_ long );
654 STDMETHOD(get_Left) (THIS_ long *);
655 STDMETHOD(put_Width) (THIS_ long );
656 STDMETHOD(get_Width) (THIS_ long *);
657 STDMETHOD(put_Top) (THIS_ long );
658 STDMETHOD(get_Top) (THIS_ long *);
659 STDMETHOD(put_Height) (THIS_ long );
660 STDMETHOD(get_Height) (THIS_ long *);
661 STDMETHOD(put_Owner) (THIS_ OAHWND );
662 STDMETHOD(get_Owner) (THIS_ OAHWND * );
663 STDMETHOD(put_MessageDrain) (THIS_ OAHWND );
664 STDMETHOD(get_MessageDrain) (THIS_ OAHWND * );
665 STDMETHOD(get_BorderColor) (THIS_ long *);
666 STDMETHOD(put_BorderColor) (THIS_ long );
667 STDMETHOD(get_FullScreenMode) (THIS_ long *);
668 STDMETHOD(put_FullScreenMode) (THIS_ long );
669 STDMETHOD(SetWindowForeground) (THIS_ long );
670 STDMETHOD(NotifyOwnerMessage) (THIS_ OAHWND ,long , LONG_PTR ,LONG_PTR );
671 STDMETHOD(SetWindowPosition) (THIS_ long ,long , long ,long );
672 STDMETHOD(GetWindowPosition) (THIS_ long *,long *, long *,long *);
673 STDMETHOD(GetMinIdealImageSize) (THIS_ long *, long *);
674 STDMETHOD(GetMaxIdealImageSize) (THIS_ long *, long *);
675 STDMETHOD(GetRestorePosition) (THIS_ long *,long *, long *,long *);
676 STDMETHOD(HideCursor) (THIS_ long );
677 STDMETHOD(IsCursorHidden) (THIS_ long *);
680 DECLARE_ENUMERATOR_(IEnumFilters, LPBASEFILTER);
681 DECLARE_ENUMERATOR_(IEnumPins, LPPIN);
682 DECLARE_ENUMERATOR_(IEnumMediaTypes, AM_MEDIA_TYPE *);
684 #define OLE_CALL(p,method) (p)->lpVtbl->method(p)
685 #ifdef __GNUC__
686 #define OLE_CALL_ARGS(p, method, a1, args...) (p)->lpVtbl->method(p, a1, ##args)
687 #else
688 #define OLE_CALL_ARGS(p, method, ...) (p)->lpVtbl->method(p, __VA_ARGS__)
689 #endif
690 #define OLE_RELEASE_SAFE(p) if(p){ OLE_CALL((IUnknown*)p,Release); p=NULL;}
691 #define OLE_QUERYINTERFACE(p,iface,ptr) OLE_CALL_ARGS((IUnknown*)p,QueryInterface,&iface,(void*)&ptr)
693 #endif // TVI_DSHOW_H_