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