po: Fix a formatting directive in the Dutch translation.
[wine/multimedia.git] / include / axcore.idl
blob66746d53949490efb993df5da0beac85180acc61
1 /*
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 #define CHARS_IN_GUID 39
20 cpp_quote("#define CHARS_IN_GUID 39")
22 /* GetTimeFormat is defined in winnls.h as
23 * either the W or A suffixed version */
24 cpp_quote("#undef GetTimeFormat")
26 typedef struct _AMMediaType
28 GUID majortype;
29 GUID subtype;
30 BOOL bFixedSizeSamples;
31 BOOL bTemporalCompression;
32 ULONG lSampleSize;
33 GUID formattype;
34 IUnknown * pUnk;
35 ULONG cbFormat;
36 [size_is(cbFormat)] BYTE * pbFormat;
37 } AM_MEDIA_TYPE;
39 typedef enum _PinDirection
41 PINDIR_INPUT,
42 PINDIR_OUTPUT
43 } PIN_DIRECTION;
45 #define MAX_PIN_NAME 128
46 #define MAX_FILTER_NAME 128
47 cpp_quote("#define MAX_PIN_NAME 128")
48 cpp_quote("#define MAX_FILTER_NAME 128")
50 cpp_quote("#ifndef REFERENCE_TIME_DEFINED")
51 cpp_quote("#define REFERENCE_TIME_DEFINED")
52 typedef LONGLONG REFERENCE_TIME;
53 cpp_quote("#endif")
55 cpp_quote("#ifndef REFTIME_DEFINED")
56 cpp_quote("#define REFTIME_DEFINED")
57 typedef DOUBLE REFTIME;
58 cpp_quote("#endif")
60 typedef DWORD_PTR HSEMAPHORE;
61 typedef DWORD_PTR HEVENT;
63 typedef struct _AllocatorProperties
65 long cBuffers;
66 long cbBuffer;
67 long cbAlign;
68 long cbPrefix;
69 } ALLOCATOR_PROPERTIES;
71 interface IAMovieSetup;
72 interface IEnumFilters;
73 interface IEnumMediaTypes;
74 interface IEnumPins;
75 interface IBaseFilter;
76 interface IFilterGraph;
77 interface IMediaFilter;
78 interface IMediaSample;
79 interface IMemAllocator;
80 interface IMemAllocatorCallbackTemp;
81 interface IMemAllocatorNotifyCallbackTemp;
82 interface IMemInputPin;
83 interface IPin;
84 interface IReferenceClock;
87 object,
88 uuid(56a86891-0ad4-11ce-b03a-0020af0ba770),
89 pointer_default(unique)
91 interface IPin : IUnknown
93 typedef struct _PinInfo
95 IBaseFilter *pFilter;
96 PIN_DIRECTION dir;
97 WCHAR achName[MAX_PIN_NAME];
98 } PIN_INFO;
100 HRESULT Connect(
101 [in] IPin * pReceivePin,
102 [in] const AM_MEDIA_TYPE * pmt);
104 HRESULT ReceiveConnection(
105 [in] IPin * pConnector,
106 [in] const AM_MEDIA_TYPE *pmt);
108 HRESULT Disconnect(void);
110 HRESULT ConnectedTo(
111 [out] IPin **pPin);
113 HRESULT ConnectionMediaType(
114 [out] AM_MEDIA_TYPE *pmt);
116 HRESULT QueryPinInfo(
117 [out] PIN_INFO * pInfo);
119 HRESULT QueryDirection(
120 [out] PIN_DIRECTION *pPinDir);
122 HRESULT QueryId(
123 [out] LPWSTR * Id);
125 HRESULT QueryAccept(
126 [in] const AM_MEDIA_TYPE *pmt);
128 HRESULT EnumMediaTypes(
129 [out] IEnumMediaTypes **ppEnum);
131 HRESULT QueryInternalConnections(
132 [out] IPin* *apPin,
133 [in, out] ULONG *nPin);
135 HRESULT EndOfStream(void);
137 HRESULT BeginFlush(void);
139 HRESULT EndFlush(void);
140 HRESULT NewSegment(
141 [in] REFERENCE_TIME tStart,
142 [in] REFERENCE_TIME tStop,
143 [in] double dRate);
146 typedef IPin *PPIN;
149 object,
150 uuid(56a86892-0ad4-11ce-b03a-0020af0ba770),
151 pointer_default(unique)
153 interface IEnumPins : IUnknown
156 HRESULT Next(
157 [in] ULONG cPins,
158 [out, size_is(cPins)] IPin ** ppPins,
159 [out] ULONG * pcFetched);
161 HRESULT Skip(
162 [in] ULONG cPins);
164 HRESULT Reset(void);
166 HRESULT Clone(
167 [out] IEnumPins **ppEnum);
170 typedef IEnumPins *PENUMPINS;
173 object,
174 uuid(89c31040-846b-11ce-97d3-00aa0055595a),
175 pointer_default(unique)
177 interface IEnumMediaTypes : IUnknown
179 HRESULT Next(
180 [in] ULONG cMediaTypes,
181 [out, size_is(cMediaTypes)]
182 AM_MEDIA_TYPE ** ppMediaTypes,
183 [out] ULONG * pcFetched
186 HRESULT Skip(
187 [in] ULONG cMediaTypes);
189 HRESULT Reset(void);
191 HRESULT Clone(
192 [out] IEnumMediaTypes **ppEnum
196 typedef IEnumMediaTypes *PENUMMEDIATYPES;
199 object,
200 uuid(56a8689f-0ad4-11ce-b03a-0020af0ba770),
201 pointer_default(unique)
203 interface IFilterGraph : IUnknown
205 HRESULT AddFilter(
206 [in] IBaseFilter * pFilter,
207 [in, string] LPCWSTR pName);
209 HRESULT RemoveFilter(
210 [in] IBaseFilter * pFilter);
212 HRESULT EnumFilters(
213 [out] IEnumFilters **ppEnum);
215 HRESULT FindFilterByName(
216 [in, string] LPCWSTR pName,
217 [out] IBaseFilter ** ppFilter);
219 HRESULT ConnectDirect(
220 [in] IPin * ppinOut,
221 [in] IPin * ppinIn,
222 [in, unique] const AM_MEDIA_TYPE* pmt);
224 HRESULT Reconnect(
225 [in] IPin * ppin);
227 HRESULT Disconnect(
228 [in] IPin * ppin);
230 HRESULT SetDefaultSyncSource(void);
233 typedef IFilterGraph *PFILTERGRAPH;
236 object,
237 uuid(56a86893-0ad4-11ce-b03a-0020af0ba770),
238 pointer_default(unique)
240 interface IEnumFilters : IUnknown
242 HRESULT Next(
243 [in] ULONG cFilters,
244 [out] IBaseFilter ** ppFilter,
245 [out] ULONG * pcFetched);
248 HRESULT Skip(
249 [in] ULONG cFilters);
252 HRESULT Reset(void);
255 HRESULT Clone(
256 [out] IEnumFilters **ppEnum);
259 typedef IEnumFilters *PENUMFILTERS;
262 object,
263 uuid(56a86899-0ad4-11ce-b03a-0020af0ba770),
264 pointer_default(unique)
266 interface IMediaFilter : IPersist
268 typedef enum _FilterState
270 State_Stopped,
271 State_Paused,
272 State_Running
273 } FILTER_STATE;
275 HRESULT Stop(void);
276 HRESULT Pause(void);
278 HRESULT Run(REFERENCE_TIME tStart);
280 HRESULT GetState(
281 [in] DWORD dwMilliSecsTimeout,
282 [out] FILTER_STATE *State);
284 HRESULT SetSyncSource(
285 [in] IReferenceClock * pClock);
287 HRESULT GetSyncSource(
288 [out] IReferenceClock ** pClock);
291 typedef IMediaFilter *PMEDIAFILTER;
294 object,
295 uuid(56a86895-0ad4-11ce-b03a-0020af0ba770),
296 pointer_default(unique)
298 interface IBaseFilter : IMediaFilter
300 typedef struct _FilterInfo
302 WCHAR achName[MAX_FILTER_NAME];
303 IFilterGraph * pGraph;
304 } FILTER_INFO;
306 HRESULT EnumPins(
307 [out] IEnumPins ** ppEnum);
309 HRESULT FindPin(
310 [in, string] LPCWSTR Id,
311 [out] IPin ** ppPin);
313 HRESULT QueryFilterInfo(
314 [out] FILTER_INFO * pInfo);
316 HRESULT JoinFilterGraph(
317 [in] IFilterGraph * pGraph,
318 [in, string] LPCWSTR pName);
320 HRESULT QueryVendorInfo(
321 [out, string] LPWSTR* pVendorInfo);
324 typedef IBaseFilter *PFILTER;
327 object,
328 uuid(56a86897-0ad4-11ce-b03a-0020af0ba770),
329 pointer_default(unique)
331 interface IReferenceClock : IUnknown
333 HRESULT GetTime(
334 [out] REFERENCE_TIME *pTime);
336 HRESULT AdviseTime(
337 [in] REFERENCE_TIME baseTime,
338 [in] REFERENCE_TIME streamTime,
339 [in] HEVENT hEvent,
340 [out] DWORD_PTR * pdwAdviseCookie);
342 HRESULT AdvisePeriodic(
343 [in] REFERENCE_TIME startTime,
344 [in] REFERENCE_TIME periodTime,
345 [in] HSEMAPHORE hSemaphore,
346 [out] DWORD_PTR * pdwAdviseCookie);
348 HRESULT Unadvise(
349 [in] DWORD_PTR dwAdviseCookie);
352 typedef IReferenceClock *PREFERENCECLOCK;
356 object,
357 uuid(36b73885-c2c8-11cf-8b46-00805f6cef60),
358 pointer_default(unique)
360 interface IReferenceClock2 : IReferenceClock
364 typedef IReferenceClock2 *PREFERENCECLOCK2;
369 local,
370 object,
371 uuid(56a8689a-0ad4-11ce-b03a-0020af0ba770),
372 pointer_default(unique)
374 interface IMediaSample : IUnknown
376 HRESULT GetPointer([out] BYTE ** ppBuffer);
378 long GetSize(void);
380 HRESULT GetTime(
381 [out] REFERENCE_TIME * pTimeStart,
382 [out] REFERENCE_TIME * pTimeEnd);
384 HRESULT SetTime(
385 [in] REFERENCE_TIME * pTimeStart,
386 [in] REFERENCE_TIME * pTimeEnd);
388 HRESULT IsSyncPoint(void);
390 HRESULT SetSyncPoint(BOOL bIsSyncPoint);
392 HRESULT IsPreroll(void);
394 HRESULT SetPreroll(BOOL bIsPreroll);
396 LONG GetActualDataLength(void);
398 HRESULT SetActualDataLength(LONG length);
400 HRESULT GetMediaType(AM_MEDIA_TYPE **ppMediaType);
402 HRESULT SetMediaType(AM_MEDIA_TYPE *pMediaType);
404 HRESULT IsDiscontinuity(void);
406 HRESULT SetDiscontinuity(BOOL bDiscontinuity);
408 HRESULT GetMediaTime(
409 [out] LONGLONG * pTimeStart,
410 [out] LONGLONG * pTimeEnd);
412 HRESULT SetMediaTime(
413 [in] LONGLONG * pTimeStart,
414 [in] LONGLONG * pTimeEnd);
417 typedef IMediaSample *PMEDIASAMPLE;
419 enum tagAM_SAMPLE_PROPERTY_FLAGS
421 AM_SAMPLE_SPLICEPOINT = 0x01,
422 AM_SAMPLE_PREROLL = 0x02,
423 AM_SAMPLE_DATADISCONTINUITY = 0x04,
424 AM_SAMPLE_TYPECHANGED = 0x08,
425 AM_SAMPLE_TIMEVALID = 0x10,
426 AM_SAMPLE_TIMEDISCONTINUITY = 0x40,
427 AM_SAMPLE_FLUSH_ON_PAUSE = 0x80,
428 AM_SAMPLE_STOPVALID = 0x100,
429 AM_SAMPLE_ENDOFSTREAM = 0x200,
430 AM_STREAM_MEDIA = 0,
431 AM_STREAM_CONTROL = 1
434 typedef struct tagAM_SAMPLE2_PROPERTIES
436 DWORD cbData;
437 DWORD dwTypeSpecificFlags;
438 DWORD dwSampleFlags;
439 LONG lActual;
440 REFERENCE_TIME tStart;
441 REFERENCE_TIME tStop;
442 DWORD dwStreamId;
443 AM_MEDIA_TYPE *pMediaType;
444 BYTE *pbBuffer;
445 LONG cbBuffer;
446 } AM_SAMPLE2_PROPERTIES;
449 local,
450 object,
451 uuid(36b73884-c2c8-11cf-8b46-00805f6cef60),
452 pointer_default(unique)
454 interface IMediaSample2 : IMediaSample
456 HRESULT GetProperties(
457 [in] DWORD cbProperties,
458 [out, size_is(cbProperties)] BYTE * pbProperties
461 HRESULT SetProperties(
462 [in] DWORD cbProperties,
463 [in, size_is(cbProperties)] const BYTE * pbProperties
467 typedef IMediaSample2 *PMEDIASAMPLE2;
469 #define AM_GBF_PREVFRAMESKIPPED 1
470 #define AM_GBF_NOTASYNCPOINT 2
471 cpp_quote("#define AM_GBF_PREVFRAMESKIPPED 1")
472 cpp_quote("#define AM_GBF_NOTASYNCPOINT 2")
474 cpp_quote("#define AM_GBF_NOWAIT 4")
477 object,
478 uuid(56a8689c-0ad4-11ce-b03a-0020af0ba770),
479 pointer_default(unique)
481 interface IMemAllocator : IUnknown
483 HRESULT SetProperties(
484 [in] ALLOCATOR_PROPERTIES* pRequest,
485 [out] ALLOCATOR_PROPERTIES* pActual);
487 HRESULT GetProperties(
488 [out] ALLOCATOR_PROPERTIES* pProps);
490 HRESULT Commit(void);
492 HRESULT Decommit(void);
494 HRESULT GetBuffer(
495 [out] IMediaSample **ppBuffer,
496 [in] REFERENCE_TIME * pStartTime,
497 [in] REFERENCE_TIME * pEndTime,
498 [in] DWORD dwFlags);
500 HRESULT ReleaseBuffer(
501 [in] IMediaSample *pBuffer);
504 typedef IMemAllocator *PMEMALLOCATOR;
507 object,
508 uuid(379a0cf0-c1de-11d2-abf5-00a0c905f375),
509 pointer_default(unique)
511 interface IMemAllocatorCallbackTemp : IMemAllocator
513 HRESULT SetNotify(
514 [in] IMemAllocatorNotifyCallbackTemp *pNotify);
516 HRESULT GetFreeCount(
517 [out] LONG *plBuffersFree);
521 object,
522 uuid(92980b30-c1de-11d2-abf5-00a0c905f375),
523 pointer_default(unique)
525 interface IMemAllocatorNotifyCallbackTemp : IUnknown
527 HRESULT NotifyRelease();
531 object,
532 uuid(56a8689d-0ad4-11ce-b03a-0020af0ba770),
533 pointer_default(unique)
535 interface IMemInputPin : IUnknown
537 HRESULT GetAllocator(
538 [out] IMemAllocator ** ppAllocator);
540 HRESULT NotifyAllocator(
541 [in] IMemAllocator * pAllocator,
542 [in] BOOL bReadOnly);
544 HRESULT GetAllocatorRequirements( [out] ALLOCATOR_PROPERTIES*pProps );
546 HRESULT Receive(
547 [in] IMediaSample * pSample);
549 HRESULT ReceiveMultiple(
550 [in, size_is(nSamples)] IMediaSample **pSamples,
551 [in] long nSamples,
552 [out] long *nSamplesProcessed);
554 HRESULT ReceiveCanBlock();
557 typedef IMemInputPin *PMEMINPUTPIN;
560 object,
561 uuid(a3d8cec0-7e5a-11cf-bbc5-00805f6cef20),
562 pointer_default(unique)
564 interface IAMovieSetup : IUnknown
566 HRESULT Register( );
567 HRESULT Unregister( );
570 typedef IAMovieSetup *PAMOVIESETUP;
572 typedef enum AM_SEEKING_SeekingFlags
574 AM_SEEKING_NoPositioning = 0x00,
575 AM_SEEKING_AbsolutePositioning = 0x01,
576 AM_SEEKING_RelativePositioning = 0x02,
577 AM_SEEKING_IncrementalPositioning = 0x03,
578 AM_SEEKING_PositioningBitsMask = 0x03,
579 AM_SEEKING_SeekToKeyFrame = 0x04,
580 AM_SEEKING_ReturnTime = 0x08,
581 AM_SEEKING_Segment = 0x10,
582 AM_SEEKING_NoFlush = 0x20
583 } AM_SEEKING_SEEKING_FLAGS;
585 typedef enum AM_SEEKING_SeekingCapabilities
587 AM_SEEKING_CanSeekAbsolute = 0x001,
588 AM_SEEKING_CanSeekForwards = 0x002,
589 AM_SEEKING_CanSeekBackwards = 0x004,
590 AM_SEEKING_CanGetCurrentPos = 0x008,
591 AM_SEEKING_CanGetStopPos = 0x010,
592 AM_SEEKING_CanGetDuration = 0x020,
593 AM_SEEKING_CanPlayBackwards = 0x040,
594 AM_SEEKING_CanDoSegments = 0x080,
595 AM_SEEKING_Source = 0x100
596 } AM_SEEKING_SEEKING_CAPABILITIES;
599 object,
600 uuid(36b73880-c2c8-11cf-8b46-00805f6cef60),
601 pointer_default(unique)
603 interface IMediaSeeking : IUnknown
605 HRESULT GetCapabilities( [out] DWORD * pCapabilities );
607 HRESULT CheckCapabilities( [in,out] DWORD * pCapabilities );
609 HRESULT IsFormatSupported([in] const GUID * pFormat);
611 HRESULT QueryPreferredFormat([out] GUID * pFormat);
613 HRESULT GetTimeFormat([out] GUID *pFormat);
615 HRESULT IsUsingTimeFormat([in] const GUID * pFormat);
617 HRESULT SetTimeFormat([in] const GUID * pFormat);
619 HRESULT GetDuration([out] LONGLONG *pDuration);
621 HRESULT GetStopPosition([out] LONGLONG *pStop);
623 HRESULT GetCurrentPosition([out] LONGLONG *pCurrent);
625 HRESULT ConvertTimeFormat([out] LONGLONG * pTarget, [in] const GUID * pTargetFormat,
626 [in] LONGLONG Source, [in] const GUID * pSourceFormat );
628 HRESULT SetPositions(
629 [in,out] LONGLONG * pCurrent,
630 [in] DWORD dwCurrentFlags,
631 [in,out] LONGLONG * pStop,
632 [in] DWORD dwStopFlags);
634 HRESULT GetPositions(
635 [out] LONGLONG * pCurrent,
636 [out] LONGLONG * pStop);
638 HRESULT GetAvailable(
639 [out] LONGLONG * pEarliest,
640 [out] LONGLONG * pLatest);
642 HRESULT SetRate([in] double dRate);
644 HRESULT GetRate([out] double * pdRate);
646 HRESULT GetPreroll([out] LONGLONG * pllPreroll);
649 typedef IMediaSeeking *PMEDIASEEKING;
651 enum tagAM_MEDIAEVENT_FLAGS
653 AM_MEDIAEVENT_NONOTIFY = 0x01