qcap: Use libv4l1.h when available, instead of linux/videodev.h which is deprecated...
[wine] / include / axcore.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 #define CHARS_IN_GUID 39
20 cpp_quote("#define CHARS_IN_GUID 39")
21
22 /* GetTimeFormat is defined in winnls.h as
23  * either the W or A suffixed version */
24 cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
25 cpp_quote("#undef GetTimeFormat")
26 cpp_quote("#endif")
27
28 typedef struct _AMMediaType
29 {
30     GUID       majortype;
31     GUID       subtype;
32     BOOL       bFixedSizeSamples;
33     BOOL       bTemporalCompression;
34     ULONG      lSampleSize;
35     GUID       formattype;
36     IUnknown * pUnk;
37     ULONG      cbFormat;
38     [size_is(cbFormat)] BYTE * pbFormat;
39 } AM_MEDIA_TYPE;
40
41 typedef enum _PinDirection
42 {
43     PINDIR_INPUT,
44     PINDIR_OUTPUT
45 } PIN_DIRECTION;
46
47 #define MAX_PIN_NAME    128
48 #define MAX_FILTER_NAME 128
49 cpp_quote("#define MAX_PIN_NAME    128")
50 cpp_quote("#define MAX_FILTER_NAME 128")
51
52 cpp_quote("#ifndef REFERENCE_TIME_DEFINED")
53 cpp_quote("#define REFERENCE_TIME_DEFINED")
54 typedef LONGLONG REFERENCE_TIME;
55 cpp_quote("#endif")
56
57 cpp_quote("#ifndef REFTIME_DEFINED")
58 cpp_quote("#define REFTIME_DEFINED")
59 typedef DOUBLE REFTIME;
60 cpp_quote("#endif")
61
62 typedef DWORD_PTR HSEMAPHORE;
63 typedef DWORD_PTR HEVENT;
64
65 typedef struct _AllocatorProperties
66 {
67     long cBuffers;
68     long cbBuffer;
69     long cbAlign;
70     long cbPrefix;
71 } ALLOCATOR_PROPERTIES;
72
73 interface IAMovieSetup;
74 interface IEnumFilters;
75 interface IEnumMediaTypes;
76 interface IEnumPins;
77 interface IBaseFilter;
78 interface IFilterGraph;
79 interface IMediaFilter;
80 interface IMediaSample;
81 interface IMemAllocator;
82 interface IMemAllocatorCallbackTemp;
83 interface IMemAllocatorNotifyCallbackTemp;
84 interface IMemInputPin;
85 interface IPin;
86 interface IReferenceClock;
87
88 [
89 object,
90 uuid(56a86891-0ad4-11ce-b03a-0020af0ba770),
91 pointer_default(unique)
92 ]
93 interface IPin : IUnknown
94 {
95     typedef struct _PinInfo
96     {
97         IBaseFilter *pFilter;
98         PIN_DIRECTION dir;
99         WCHAR achName[MAX_PIN_NAME];
100     } PIN_INFO;
101
102     HRESULT Connect(
103         [in] IPin * pReceivePin,
104         [in] const AM_MEDIA_TYPE * pmt);
105
106     HRESULT ReceiveConnection(
107         [in] IPin * pConnector,
108         [in] const AM_MEDIA_TYPE *pmt);
109
110     HRESULT Disconnect(void);
111
112     HRESULT ConnectedTo(
113         [out] IPin **pPin);
114
115     HRESULT ConnectionMediaType(
116         [out] AM_MEDIA_TYPE *pmt);
117
118     HRESULT QueryPinInfo(
119         [out] PIN_INFO * pInfo);
120
121     HRESULT QueryDirection(
122         [out] PIN_DIRECTION *pPinDir);
123
124     HRESULT QueryId(
125         [out] LPWSTR * Id);
126
127     HRESULT QueryAccept(
128         [in] const AM_MEDIA_TYPE *pmt);
129
130     HRESULT EnumMediaTypes(
131         [out] IEnumMediaTypes **ppEnum);
132
133     HRESULT QueryInternalConnections(
134         [out] IPin* *apPin,
135         [in, out] ULONG *nPin);
136
137     HRESULT EndOfStream(void);
138
139     HRESULT BeginFlush(void);
140
141     HRESULT EndFlush(void);
142     HRESULT NewSegment(
143         [in] REFERENCE_TIME tStart,
144         [in] REFERENCE_TIME tStop,
145         [in] double dRate);
146 }
147
148 typedef IPin *PPIN;
149
150 [
151 object,
152 uuid(56a86892-0ad4-11ce-b03a-0020af0ba770),
153 pointer_default(unique)
154 ]
155 interface IEnumPins : IUnknown
156 {
157
158     HRESULT Next(
159         [in] ULONG cPins,
160         [out, size_is(cPins)] IPin ** ppPins,
161         [out] ULONG * pcFetched);
162
163     HRESULT Skip(
164         [in] ULONG cPins);
165
166     HRESULT Reset(void);
167
168     HRESULT Clone(
169         [out] IEnumPins **ppEnum);
170 }
171
172 typedef IEnumPins *PENUMPINS;
173
174 [
175 object,
176 uuid(89c31040-846b-11ce-97d3-00aa0055595a),
177 pointer_default(unique)
178 ]
179 interface IEnumMediaTypes : IUnknown
180 {
181     HRESULT Next(
182         [in] ULONG cMediaTypes,
183         [out, size_is(cMediaTypes)]
184              AM_MEDIA_TYPE ** ppMediaTypes,
185         [out] ULONG * pcFetched
186     );
187
188     HRESULT Skip(
189         [in] ULONG cMediaTypes);
190
191     HRESULT Reset(void);
192
193     HRESULT Clone(
194         [out] IEnumMediaTypes **ppEnum
195     );
196 }
197
198 typedef IEnumMediaTypes *PENUMMEDIATYPES;
199
200 [
201 object,
202 uuid(56a8689f-0ad4-11ce-b03a-0020af0ba770),
203 pointer_default(unique)
204 ]
205 interface IFilterGraph : IUnknown
206 {
207     HRESULT AddFilter(
208         [in] IBaseFilter * pFilter,
209         [in, string] LPCWSTR pName);
210
211     HRESULT RemoveFilter(
212         [in] IBaseFilter * pFilter);
213
214     HRESULT EnumFilters(
215         [out] IEnumFilters **ppEnum);
216
217     HRESULT FindFilterByName(
218         [in, string] LPCWSTR pName,
219         [out] IBaseFilter ** ppFilter);
220
221     HRESULT ConnectDirect(
222         [in] IPin * ppinOut,
223         [in] IPin * ppinIn,
224         [in, unique] const AM_MEDIA_TYPE* pmt);
225
226     HRESULT Reconnect(
227         [in] IPin * ppin);
228
229     HRESULT Disconnect(
230         [in] IPin * ppin);
231
232     HRESULT SetDefaultSyncSource(void);
233 }
234
235 typedef IFilterGraph *PFILTERGRAPH;
236
237 [
238 object,
239 uuid(56a86893-0ad4-11ce-b03a-0020af0ba770),
240 pointer_default(unique)
241 ]
242 interface IEnumFilters : IUnknown
243 {
244     HRESULT Next(
245         [in]  ULONG cFilters,
246         [out] IBaseFilter ** ppFilter,
247         [out] ULONG * pcFetched);
248
249
250     HRESULT Skip(
251         [in] ULONG cFilters);
252
253
254     HRESULT Reset(void);
255
256
257     HRESULT Clone(
258         [out] IEnumFilters **ppEnum);
259 }
260
261 typedef IEnumFilters *PENUMFILTERS;
262
263 [
264 object,
265 uuid(56a86899-0ad4-11ce-b03a-0020af0ba770),
266 pointer_default(unique)
267 ]
268 interface IMediaFilter : IPersist
269 {
270     typedef enum _FilterState
271     {
272         State_Stopped,
273         State_Paused,
274         State_Running
275     } FILTER_STATE;
276
277     HRESULT Stop(void);
278     HRESULT Pause(void);
279
280     HRESULT Run(REFERENCE_TIME tStart);
281
282     HRESULT GetState(
283         [in] DWORD dwMilliSecsTimeout,
284         [out] FILTER_STATE *State);
285
286     HRESULT SetSyncSource(
287         [in] IReferenceClock * pClock);
288
289     HRESULT GetSyncSource(
290         [out] IReferenceClock ** pClock);
291 }
292
293 typedef IMediaFilter *PMEDIAFILTER;
294
295 [
296 object,
297 uuid(56a86895-0ad4-11ce-b03a-0020af0ba770),
298 pointer_default(unique)
299 ]
300 interface IBaseFilter : IMediaFilter
301 {
302     typedef struct _FilterInfo
303     {
304         WCHAR achName[MAX_FILTER_NAME];
305         IFilterGraph * pGraph;
306     } FILTER_INFO;
307
308     HRESULT EnumPins(
309         [out] IEnumPins ** ppEnum);
310
311     HRESULT FindPin(
312         [in, string] LPCWSTR Id,
313         [out] IPin ** ppPin);
314
315     HRESULT QueryFilterInfo(
316         [out] FILTER_INFO * pInfo);
317
318     HRESULT JoinFilterGraph(
319         [in] IFilterGraph * pGraph,
320         [in, string] LPCWSTR pName);
321
322     HRESULT QueryVendorInfo(
323         [out, string] LPWSTR* pVendorInfo);
324 }
325
326 typedef IBaseFilter *PFILTER;
327
328 [
329 object,
330 uuid(56a86897-0ad4-11ce-b03a-0020af0ba770),
331 pointer_default(unique)
332 ]
333 interface IReferenceClock : IUnknown
334 {
335     HRESULT GetTime(
336         [out] REFERENCE_TIME *pTime);
337
338     HRESULT AdviseTime(
339         [in] REFERENCE_TIME baseTime,
340         [in] REFERENCE_TIME streamTime,
341         [in] HEVENT hEvent,
342         [out] DWORD_PTR * pdwAdviseCookie);
343
344     HRESULT AdvisePeriodic(
345         [in] REFERENCE_TIME startTime,
346         [in] REFERENCE_TIME periodTime,
347         [in] HSEMAPHORE hSemaphore,
348         [out] DWORD_PTR * pdwAdviseCookie);
349
350     HRESULT Unadvise(
351         [in] DWORD_PTR dwAdviseCookie);
352 }
353
354 typedef IReferenceClock *PREFERENCECLOCK;
355
356 /*
357 [
358 object,
359 uuid(36b73885-c2c8-11cf-8b46-00805f6cef60),
360 pointer_default(unique)
361 ]
362 interface IReferenceClock2 : IReferenceClock
363 {
364 }
365
366 typedef IReferenceClock2 *PREFERENCECLOCK2;
367
368 */
369
370 [
371 local,
372 object,
373 uuid(56a8689a-0ad4-11ce-b03a-0020af0ba770),
374 pointer_default(unique)
375 ]
376 interface IMediaSample : IUnknown
377 {
378     HRESULT GetPointer([out] BYTE ** ppBuffer);
379
380     long GetSize(void);
381
382     HRESULT GetTime(
383         [out] REFERENCE_TIME * pTimeStart,
384         [out] REFERENCE_TIME * pTimeEnd);
385
386     HRESULT SetTime(
387         [in] REFERENCE_TIME * pTimeStart,
388         [in] REFERENCE_TIME * pTimeEnd);
389
390     HRESULT IsSyncPoint(void);
391
392     HRESULT SetSyncPoint(BOOL bIsSyncPoint);
393
394     HRESULT IsPreroll(void);
395
396     HRESULT SetPreroll(BOOL bIsPreroll);
397
398     LONG GetActualDataLength(void);
399
400     HRESULT SetActualDataLength(LONG length);
401
402     HRESULT GetMediaType(AM_MEDIA_TYPE **ppMediaType);
403
404     HRESULT SetMediaType(AM_MEDIA_TYPE *pMediaType);
405
406     HRESULT IsDiscontinuity(void);
407
408     HRESULT SetDiscontinuity(BOOL bDiscontinuity);
409
410     HRESULT GetMediaTime(
411         [out] LONGLONG * pTimeStart,
412         [out] LONGLONG * pTimeEnd);
413
414     HRESULT SetMediaTime(
415         [in] LONGLONG * pTimeStart,
416         [in] LONGLONG * pTimeEnd);
417 }
418
419 typedef IMediaSample *PMEDIASAMPLE;
420
421 enum tagAM_SAMPLE_PROPERTY_FLAGS
422 {
423        AM_SAMPLE_SPLICEPOINT        = 0x01,
424        AM_SAMPLE_PREROLL            = 0x02,
425        AM_SAMPLE_DATADISCONTINUITY  = 0x04,
426        AM_SAMPLE_TYPECHANGED        = 0x08,
427        AM_SAMPLE_TIMEVALID          = 0x10,
428        AM_SAMPLE_TIMEDISCONTINUITY  = 0x40,
429        AM_SAMPLE_FLUSH_ON_PAUSE     = 0x80,
430        AM_SAMPLE_STOPVALID          = 0x100,
431        AM_SAMPLE_ENDOFSTREAM        = 0x200,
432        AM_STREAM_MEDIA              = 0,
433        AM_STREAM_CONTROL            = 1
434 };
435
436 typedef struct tagAM_SAMPLE2_PROPERTIES
437 {
438     DWORD    cbData;
439     DWORD    dwTypeSpecificFlags;
440     DWORD    dwSampleFlags;
441     LONG     lActual;
442     REFERENCE_TIME tStart;
443     REFERENCE_TIME tStop;
444     DWORD    dwStreamId;
445     AM_MEDIA_TYPE *pMediaType;
446     BYTE    *pbBuffer;
447     LONG     cbBuffer;
448 } AM_SAMPLE2_PROPERTIES;
449
450 [
451         local,
452         object,
453         uuid(36b73884-c2c8-11cf-8b46-00805f6cef60),
454         pointer_default(unique)
455 ]
456 interface IMediaSample2 : IMediaSample
457 {
458     HRESULT GetProperties(
459         [in] DWORD cbProperties,
460         [out, size_is(cbProperties)] BYTE * pbProperties
461     );
462
463     HRESULT SetProperties(
464         [in] DWORD cbProperties,
465         [in, size_is(cbProperties)] const BYTE * pbProperties
466     );
467 }
468
469 typedef IMediaSample2 *PMEDIASAMPLE2;
470
471 #define AM_GBF_PREVFRAMESKIPPED 1
472 #define AM_GBF_NOTASYNCPOINT    2
473 cpp_quote("#define AM_GBF_PREVFRAMESKIPPED 1")
474 cpp_quote("#define AM_GBF_NOTASYNCPOINT 2")
475
476 cpp_quote("#define AM_GBF_NOWAIT 4")
477 cpp_quote("#define AM_GBF_NODDSURFACELOCK 8")
478
479 [
480 object,
481 uuid(56a8689c-0ad4-11ce-b03a-0020af0ba770),
482 pointer_default(unique)
483 ]
484 interface IMemAllocator : IUnknown
485 {
486     HRESULT SetProperties(
487         [in] ALLOCATOR_PROPERTIES* pRequest,
488         [out] ALLOCATOR_PROPERTIES* pActual);
489
490     HRESULT GetProperties(
491         [out] ALLOCATOR_PROPERTIES* pProps);
492
493     HRESULT Commit(void);
494
495     HRESULT Decommit(void);
496
497     HRESULT GetBuffer(
498         [out] IMediaSample **ppBuffer,
499         [in] REFERENCE_TIME * pStartTime,
500         [in] REFERENCE_TIME * pEndTime,
501         [in] DWORD dwFlags);
502
503     HRESULT ReleaseBuffer(
504         [in] IMediaSample *pBuffer);
505 }
506
507 typedef IMemAllocator *PMEMALLOCATOR;
508
509 [
510 object,
511 uuid(379a0cf0-c1de-11d2-abf5-00a0c905f375),
512 pointer_default(unique)
513 ]
514 interface IMemAllocatorCallbackTemp : IMemAllocator
515 {
516     HRESULT SetNotify(
517         [in] IMemAllocatorNotifyCallbackTemp *pNotify);
518
519     HRESULT GetFreeCount(
520         [out] LONG *plBuffersFree);
521 }
522
523 [
524 object,
525 uuid(92980b30-c1de-11d2-abf5-00a0c905f375),
526 pointer_default(unique)
527 ]
528 interface IMemAllocatorNotifyCallbackTemp : IUnknown
529 {
530     HRESULT NotifyRelease();
531 }
532
533 [
534 object,
535 uuid(56a8689d-0ad4-11ce-b03a-0020af0ba770),
536 pointer_default(unique)
537 ]
538 interface IMemInputPin : IUnknown
539 {
540     HRESULT GetAllocator(
541         [out] IMemAllocator ** ppAllocator);
542
543     HRESULT NotifyAllocator(
544         [in] IMemAllocator * pAllocator,
545         [in] BOOL bReadOnly);
546
547     HRESULT GetAllocatorRequirements( [out] ALLOCATOR_PROPERTIES*pProps );
548
549     HRESULT Receive(
550         [in] IMediaSample * pSample);
551
552     HRESULT ReceiveMultiple(
553         [in, size_is(nSamples)] IMediaSample **pSamples,
554         [in] long nSamples,
555         [out] long *nSamplesProcessed);
556
557     HRESULT ReceiveCanBlock();
558 }
559
560 typedef IMemInputPin *PMEMINPUTPIN;
561
562 [
563 object,
564 uuid(a3d8cec0-7e5a-11cf-bbc5-00805f6cef20),
565 pointer_default(unique)
566 ]
567 interface IAMovieSetup : IUnknown
568 {
569     HRESULT Register( );
570     HRESULT Unregister( );
571 }
572
573 typedef IAMovieSetup *PAMOVIESETUP;
574
575 typedef enum AM_SEEKING_SeekingFlags
576 {
577     AM_SEEKING_NoPositioning            = 0x00,
578     AM_SEEKING_AbsolutePositioning      = 0x01,
579     AM_SEEKING_RelativePositioning      = 0x02,
580     AM_SEEKING_IncrementalPositioning   = 0x03,
581     AM_SEEKING_PositioningBitsMask      = 0x03,
582     AM_SEEKING_SeekToKeyFrame           = 0x04,
583     AM_SEEKING_ReturnTime               = 0x08,
584     AM_SEEKING_Segment                  = 0x10,
585     AM_SEEKING_NoFlush                  = 0x20
586 } AM_SEEKING_SEEKING_FLAGS;
587
588 typedef enum AM_SEEKING_SeekingCapabilities
589 {
590     AM_SEEKING_CanSeekAbsolute     = 0x001,
591     AM_SEEKING_CanSeekForwards     = 0x002,
592     AM_SEEKING_CanSeekBackwards    = 0x004,
593     AM_SEEKING_CanGetCurrentPos    = 0x008,
594     AM_SEEKING_CanGetStopPos       = 0x010,
595     AM_SEEKING_CanGetDuration      = 0x020,
596     AM_SEEKING_CanPlayBackwards    = 0x040,
597     AM_SEEKING_CanDoSegments       = 0x080,
598     AM_SEEKING_Source              = 0x100
599 } AM_SEEKING_SEEKING_CAPABILITIES;
600
601 [
602 object,
603 uuid(36b73880-c2c8-11cf-8b46-00805f6cef60),
604 pointer_default(unique)
605 ]
606 interface IMediaSeeking : IUnknown
607 {
608     HRESULT GetCapabilities( [out] DWORD * pCapabilities );
609
610     HRESULT CheckCapabilities( [in,out] DWORD * pCapabilities );
611
612     HRESULT IsFormatSupported([in] const GUID * pFormat);
613
614     HRESULT QueryPreferredFormat([out] GUID * pFormat);
615
616     HRESULT GetTimeFormat([out] GUID *pFormat);
617
618     HRESULT IsUsingTimeFormat([in] const GUID * pFormat);
619
620     HRESULT SetTimeFormat([in] const GUID * pFormat);
621
622     HRESULT GetDuration([out] LONGLONG *pDuration);
623
624     HRESULT GetStopPosition([out] LONGLONG *pStop);
625
626     HRESULT GetCurrentPosition([out] LONGLONG *pCurrent);
627
628     HRESULT ConvertTimeFormat([out] LONGLONG * pTarget, [in] const GUID * pTargetFormat,
629                               [in]  LONGLONG    Source, [in] const GUID * pSourceFormat );
630
631     HRESULT SetPositions(
632         [in,out] LONGLONG * pCurrent,
633         [in] DWORD dwCurrentFlags,
634         [in,out] LONGLONG * pStop,
635         [in] DWORD dwStopFlags);
636
637     HRESULT GetPositions(
638         [out] LONGLONG * pCurrent,
639         [out] LONGLONG * pStop);
640
641     HRESULT GetAvailable(
642         [out] LONGLONG * pEarliest,
643         [out] LONGLONG * pLatest);
644
645     HRESULT SetRate([in]  double dRate);
646
647     HRESULT GetRate([out] double * pdRate);
648
649     HRESULT GetPreroll([out] LONGLONG * pllPreroll);
650 }
651
652 typedef IMediaSeeking *PMEDIASEEKING;
653
654 enum tagAM_MEDIAEVENT_FLAGS
655 {
656     AM_MEDIAEVENT_NONOTIFY = 0x01
657 };