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