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
20 #pragma makedep install
23 #define CHARS_IN_GUID
39
24 cpp_quote
("#define CHARS_IN_GUID 39")
26 /* GetTimeFormat is defined in winnls.h as
27 * either the W or A suffixed version */
28 cpp_quote
("#ifdef WINE_NO_UNICODE_MACROS")
29 cpp_quote
("#undef GetTimeFormat")
32 typedef struct _AMMediaType
36 BOOL bFixedSizeSamples
;
37 BOOL bTemporalCompression
;
42 [size_is(cbFormat
)] BYTE * pbFormat
;
45 typedef enum _PinDirection
51 #define MAX_PIN_NAME
128
52 #define MAX_FILTER_NAME
128
53 cpp_quote
("#define MAX_PIN_NAME 128")
54 cpp_quote
("#define MAX_FILTER_NAME 128")
56 cpp_quote
("#ifndef REFERENCE_TIME_DEFINED")
57 cpp_quote
("#define REFERENCE_TIME_DEFINED")
58 typedef LONGLONG REFERENCE_TIME
;
61 cpp_quote
("#ifndef REFTIME_DEFINED")
62 cpp_quote
("#define REFTIME_DEFINED")
63 typedef DOUBLE REFTIME
;
66 typedef DWORD_PTR HSEMAPHORE
;
67 typedef DWORD_PTR HEVENT
;
69 typedef struct _AllocatorProperties
75 } ALLOCATOR_PROPERTIES
;
77 interface IAMovieSetup
;
78 interface IEnumFilters
;
79 interface IEnumMediaTypes
;
81 interface IBaseFilter
;
82 interface IFilterGraph
;
83 interface IMediaFilter
;
84 interface IMediaSample
;
85 interface IMemAllocator
;
86 interface IMemAllocatorCallbackTemp
;
87 interface IMemAllocatorNotifyCallbackTemp
;
88 interface IMemInputPin
;
90 interface IReferenceClock
;
94 uuid(56a86891
-0ad4
-11ce
-b03a
-0020af0ba770
),
95 pointer_default(unique)
97 interface IPin
: IUnknown
99 typedef struct _PinInfo
101 IBaseFilter
*pFilter
;
103 WCHAR achName
[MAX_PIN_NAME
];
107 [in] IPin
* pReceivePin
,
108 [in] const AM_MEDIA_TYPE
* pmt
);
110 HRESULT ReceiveConnection
(
111 [in] IPin
* pConnector
,
112 [in] const AM_MEDIA_TYPE
*pmt
);
114 HRESULT Disconnect
(void);
119 HRESULT ConnectionMediaType
(
120 [out] AM_MEDIA_TYPE
*pmt
);
122 HRESULT QueryPinInfo
(
123 [out] PIN_INFO
* pInfo
);
125 HRESULT QueryDirection
(
126 [out] PIN_DIRECTION
*pPinDir
);
132 [in] const AM_MEDIA_TYPE
*pmt
);
134 HRESULT EnumMediaTypes
(
135 [out] IEnumMediaTypes
**ppEnum
);
137 HRESULT QueryInternalConnections
(
139 [in, out] ULONG
*nPin
);
141 HRESULT EndOfStream
(void);
143 HRESULT BeginFlush
(void);
145 HRESULT EndFlush
(void);
147 [in] REFERENCE_TIME tStart
,
148 [in] REFERENCE_TIME tStop
,
156 uuid(56a86892
-0ad4
-11ce
-b03a
-0020af0ba770
),
157 pointer_default(unique)
159 interface IEnumPins
: IUnknown
164 [out, size_is(cPins
)] IPin
** ppPins
,
165 [out] ULONG
* pcFetched
);
173 [out] IEnumPins
**ppEnum
);
176 typedef IEnumPins
*PENUMPINS
;
180 uuid(89c31040
-846b
-11ce
-97d3
-00aa0055595a
),
181 pointer_default(unique)
183 interface IEnumMediaTypes
: IUnknown
186 [in] ULONG cMediaTypes
,
187 [out, size_is(cMediaTypes
)]
188 AM_MEDIA_TYPE
** ppMediaTypes
,
189 [out] ULONG
* pcFetched
193 [in] ULONG cMediaTypes
);
198 [out] IEnumMediaTypes
**ppEnum
202 typedef IEnumMediaTypes
*PENUMMEDIATYPES
;
206 uuid(56a8689f
-0ad4
-11ce
-b03a
-0020af0ba770
),
207 pointer_default(unique)
209 interface IFilterGraph
: IUnknown
212 [in] IBaseFilter
* pFilter
,
213 [in, string] LPCWSTR pName
);
215 HRESULT RemoveFilter
(
216 [in] IBaseFilter
* pFilter
);
219 [out] IEnumFilters
**ppEnum
);
221 HRESULT FindFilterByName
(
222 [in, string] LPCWSTR pName
,
223 [out] IBaseFilter
** ppFilter
);
225 HRESULT ConnectDirect
(
228 [in, unique] const AM_MEDIA_TYPE
* pmt
);
236 HRESULT SetDefaultSyncSource
(void);
239 typedef IFilterGraph
*PFILTERGRAPH
;
243 uuid(56a86893
-0ad4
-11ce
-b03a
-0020af0ba770
),
244 pointer_default(unique)
246 interface IEnumFilters
: IUnknown
250 [out] IBaseFilter
** ppFilter
,
251 [out] ULONG
* pcFetched
);
255 [in] ULONG cFilters
);
262 [out] IEnumFilters
**ppEnum
);
265 typedef IEnumFilters
*PENUMFILTERS
;
269 uuid(56a86899
-0ad4
-11ce
-b03a
-0020af0ba770
),
270 pointer_default(unique)
272 interface IMediaFilter
: IPersist
274 typedef enum _FilterState
284 HRESULT Run
(REFERENCE_TIME tStart
);
287 [in] DWORD dwMilliSecsTimeout
,
288 [out] FILTER_STATE
*State
);
290 HRESULT SetSyncSource
(
291 [in] IReferenceClock
* pClock
);
293 HRESULT GetSyncSource
(
294 [out] IReferenceClock
** pClock
);
297 typedef IMediaFilter
*PMEDIAFILTER
;
301 uuid(56a86895
-0ad4
-11ce
-b03a
-0020af0ba770
),
302 pointer_default(unique)
304 interface IBaseFilter
: IMediaFilter
306 typedef struct _FilterInfo
308 WCHAR achName
[MAX_FILTER_NAME
];
309 IFilterGraph
* pGraph
;
313 [out] IEnumPins
** ppEnum
);
316 [in, string] LPCWSTR
Id,
317 [out] IPin
** ppPin
);
319 HRESULT QueryFilterInfo
(
320 [out] FILTER_INFO
* pInfo
);
322 HRESULT JoinFilterGraph
(
323 [in] IFilterGraph
* pGraph
,
324 [in, string] LPCWSTR pName
);
326 HRESULT QueryVendorInfo
(
327 [out, string] LPWSTR
* pVendorInfo
);
330 typedef IBaseFilter
*PFILTER
;
334 uuid(56a86897
-0ad4
-11ce
-b03a
-0020af0ba770
),
335 pointer_default(unique)
337 interface IReferenceClock
: IUnknown
340 [out] REFERENCE_TIME
*pTime
);
343 [in] REFERENCE_TIME baseTime
,
344 [in] REFERENCE_TIME streamTime
,
346 [out] DWORD_PTR
* pdwAdviseCookie
);
348 HRESULT AdvisePeriodic
(
349 [in] REFERENCE_TIME startTime
,
350 [in] REFERENCE_TIME periodTime
,
351 [in] HSEMAPHORE hSemaphore
,
352 [out] DWORD_PTR
* pdwAdviseCookie
);
355 [in] DWORD_PTR dwAdviseCookie
);
358 typedef IReferenceClock
*PREFERENCECLOCK
;
363 uuid(36b73885-c2c8-11cf-8b46-00805f6cef60),
364 pointer_default(unique)
366 interface IReferenceClock2 : IReferenceClock
370 typedef IReferenceClock2 *PREFERENCECLOCK2;
377 uuid(56a8689a
-0ad4
-11ce
-b03a
-0020af0ba770
),
378 pointer_default(unique)
380 interface IMediaSample
: IUnknown
382 HRESULT GetPointer
([out] BYTE ** ppBuffer
);
387 [out] REFERENCE_TIME
* pTimeStart
,
388 [out] REFERENCE_TIME
* pTimeEnd
);
391 [in] REFERENCE_TIME
* pTimeStart
,
392 [in] REFERENCE_TIME
* pTimeEnd
);
394 HRESULT IsSyncPoint
(void);
396 HRESULT SetSyncPoint
(BOOL bIsSyncPoint
);
398 HRESULT IsPreroll
(void);
400 HRESULT SetPreroll
(BOOL bIsPreroll
);
402 LONG GetActualDataLength
(void);
404 HRESULT SetActualDataLength
(LONG length
);
406 HRESULT GetMediaType
(AM_MEDIA_TYPE
**ppMediaType
);
408 HRESULT SetMediaType
(AM_MEDIA_TYPE
*pMediaType
);
410 HRESULT IsDiscontinuity
(void);
412 HRESULT SetDiscontinuity
(BOOL bDiscontinuity
);
414 HRESULT GetMediaTime
(
415 [out] LONGLONG
* pTimeStart
,
416 [out] LONGLONG
* pTimeEnd
);
418 HRESULT SetMediaTime
(
419 [in] LONGLONG
* pTimeStart
,
420 [in] LONGLONG
* pTimeEnd
);
423 typedef IMediaSample
*PMEDIASAMPLE
;
425 enum tagAM_SAMPLE_PROPERTY_FLAGS
427 AM_SAMPLE_SPLICEPOINT
= 0x01,
428 AM_SAMPLE_PREROLL
= 0x02,
429 AM_SAMPLE_DATADISCONTINUITY
= 0x04,
430 AM_SAMPLE_TYPECHANGED
= 0x08,
431 AM_SAMPLE_TIMEVALID
= 0x10,
432 AM_SAMPLE_TIMEDISCONTINUITY
= 0x40,
433 AM_SAMPLE_FLUSH_ON_PAUSE
= 0x80,
434 AM_SAMPLE_STOPVALID
= 0x100,
435 AM_SAMPLE_ENDOFSTREAM
= 0x200,
437 AM_STREAM_CONTROL
= 1
440 typedef struct tagAM_SAMPLE2_PROPERTIES
443 DWORD dwTypeSpecificFlags
;
446 REFERENCE_TIME tStart
;
447 REFERENCE_TIME tStop
;
449 AM_MEDIA_TYPE
*pMediaType
;
452 } AM_SAMPLE2_PROPERTIES
;
457 uuid(36b73884
-c2c8
-11cf
-8b46
-00805f6cef60
),
458 pointer_default(unique)
460 interface IMediaSample2
: IMediaSample
462 HRESULT GetProperties
(
463 [in] DWORD cbProperties
,
464 [out, size_is(cbProperties
)] BYTE * pbProperties
467 HRESULT SetProperties
(
468 [in] DWORD cbProperties
,
469 [in, size_is(cbProperties
)] const BYTE * pbProperties
473 typedef IMediaSample2
*PMEDIASAMPLE2
;
475 #define AM_GBF_PREVFRAMESKIPPED
1
476 #define AM_GBF_NOTASYNCPOINT
2
477 cpp_quote
("#define AM_GBF_PREVFRAMESKIPPED 1")
478 cpp_quote
("#define AM_GBF_NOTASYNCPOINT 2")
480 cpp_quote
("#define AM_GBF_NOWAIT 4")
481 cpp_quote
("#define AM_GBF_NODDSURFACELOCK 8")
485 uuid(56a8689c
-0ad4
-11ce
-b03a
-0020af0ba770
),
486 pointer_default(unique)
488 interface IMemAllocator
: IUnknown
490 HRESULT SetProperties
(
491 [in] ALLOCATOR_PROPERTIES
* pRequest
,
492 [out] ALLOCATOR_PROPERTIES
* pActual
);
494 HRESULT GetProperties
(
495 [out] ALLOCATOR_PROPERTIES
* pProps
);
497 HRESULT Commit
(void);
499 HRESULT Decommit
(void);
502 [out] IMediaSample
**ppBuffer
,
503 [in] REFERENCE_TIME
* pStartTime
,
504 [in] REFERENCE_TIME
* pEndTime
,
507 HRESULT ReleaseBuffer
(
508 [in] IMediaSample
*pBuffer
);
511 typedef IMemAllocator
*PMEMALLOCATOR
;
515 uuid(379a0cf0
-c1de
-11d2
-abf5
-00a0c905f375
),
516 pointer_default(unique)
518 interface IMemAllocatorCallbackTemp
: IMemAllocator
521 [in] IMemAllocatorNotifyCallbackTemp
*pNotify
);
523 HRESULT GetFreeCount
(
524 [out] LONG *plBuffersFree
);
529 uuid(92980b30
-c1de
-11d2
-abf5
-00a0c905f375
),
530 pointer_default(unique)
532 interface IMemAllocatorNotifyCallbackTemp
: IUnknown
534 HRESULT NotifyRelease
();
539 uuid(56a8689d
-0ad4
-11ce
-b03a
-0020af0ba770
),
540 pointer_default(unique)
542 interface IMemInputPin
: IUnknown
544 HRESULT GetAllocator
(
545 [out] IMemAllocator
** ppAllocator
);
547 HRESULT NotifyAllocator
(
548 [in] IMemAllocator
* pAllocator
,
549 [in] BOOL bReadOnly
);
551 HRESULT GetAllocatorRequirements
( [out] ALLOCATOR_PROPERTIES
*pProps
);
554 [in] IMediaSample
* pSample
);
556 HRESULT ReceiveMultiple
(
557 [in, size_is(nSamples
)] IMediaSample
**pSamples
,
559 [out] long *nSamplesProcessed
);
561 HRESULT ReceiveCanBlock
();
564 typedef IMemInputPin
*PMEMINPUTPIN
;
568 uuid(a3d8cec0
-7e5a
-11cf
-bbc5
-00805f6cef20
),
569 pointer_default(unique)
571 interface IAMovieSetup
: IUnknown
574 HRESULT Unregister
( );
577 typedef IAMovieSetup
*PAMOVIESETUP
;
579 typedef enum AM_SEEKING_SeekingFlags
581 AM_SEEKING_NoPositioning
= 0x00,
582 AM_SEEKING_AbsolutePositioning
= 0x01,
583 AM_SEEKING_RelativePositioning
= 0x02,
584 AM_SEEKING_IncrementalPositioning
= 0x03,
585 AM_SEEKING_PositioningBitsMask
= 0x03,
586 AM_SEEKING_SeekToKeyFrame
= 0x04,
587 AM_SEEKING_ReturnTime
= 0x08,
588 AM_SEEKING_Segment
= 0x10,
589 AM_SEEKING_NoFlush
= 0x20
590 } AM_SEEKING_SEEKING_FLAGS
;
592 typedef enum AM_SEEKING_SeekingCapabilities
594 AM_SEEKING_CanSeekAbsolute
= 0x001,
595 AM_SEEKING_CanSeekForwards
= 0x002,
596 AM_SEEKING_CanSeekBackwards
= 0x004,
597 AM_SEEKING_CanGetCurrentPos
= 0x008,
598 AM_SEEKING_CanGetStopPos
= 0x010,
599 AM_SEEKING_CanGetDuration
= 0x020,
600 AM_SEEKING_CanPlayBackwards
= 0x040,
601 AM_SEEKING_CanDoSegments
= 0x080,
602 AM_SEEKING_Source
= 0x100
603 } AM_SEEKING_SEEKING_CAPABILITIES
;
607 uuid(36b73880
-c2c8
-11cf
-8b46
-00805f6cef60
),
608 pointer_default(unique)
610 interface IMediaSeeking
: IUnknown
612 HRESULT GetCapabilities
( [out] DWORD
* pCapabilities
);
614 HRESULT CheckCapabilities
( [in,out] DWORD
* pCapabilities
);
616 HRESULT IsFormatSupported
([in] const GUID
* pFormat
);
618 HRESULT QueryPreferredFormat
([out] GUID
* pFormat
);
620 HRESULT GetTimeFormat
([out] GUID
*pFormat
);
622 HRESULT IsUsingTimeFormat
([in] const GUID
* pFormat
);
624 HRESULT SetTimeFormat
([in] const GUID
* pFormat
);
626 HRESULT GetDuration
([out] LONGLONG
*pDuration
);
628 HRESULT GetStopPosition
([out] LONGLONG
*pStop
);
630 HRESULT GetCurrentPosition
([out] LONGLONG
*pCurrent
);
632 HRESULT ConvertTimeFormat
([out] LONGLONG
* pTarget
, [in] const GUID
* pTargetFormat
,
633 [in] LONGLONG
Source, [in] const GUID
* pSourceFormat
);
635 HRESULT SetPositions
(
636 [in,out] LONGLONG
* pCurrent
,
637 [in] DWORD dwCurrentFlags
,
638 [in,out] LONGLONG
* pStop
,
639 [in] DWORD dwStopFlags
);
641 HRESULT GetPositions
(
642 [out] LONGLONG
* pCurrent
,
643 [out] LONGLONG
* pStop
);
645 HRESULT GetAvailable
(
646 [out] LONGLONG
* pEarliest
,
647 [out] LONGLONG
* pLatest
);
649 HRESULT SetRate
([in] double dRate
);
651 HRESULT GetRate
([out] double * pdRate
);
653 HRESULT GetPreroll
([out] LONGLONG
* pllPreroll
);
656 typedef IMediaSeeking
*PMEDIASEEKING
;
658 enum tagAM_MEDIAEVENT_FLAGS
660 AM_MEDIAEVENT_NONOTIFY
= 0x01
663 enum _AMSTREAMSELECTINFOFLAGS
665 AMSTREAMSELECTINFO_ENABLED
= 0x1,
666 AMSTREAMSELECTINFO_EXCLUSIVE
= 0x2
669 enum _AMSTREAMSELECTENABLEFLAGS
671 AMSTREAMSELECTENABLE_ENABLE
= 0x1,
672 AMSTREAMSELECTENABLE_ENABLEALL
= 0x2
677 uuid(c1960960
-17f5
-11d1
-abe1
-00a0c905f375
),
678 pointer_default(unique)
680 interface IAMStreamSelect
: IUnknown
683 [out] DWORD
*streams
);
687 [out] AM_MEDIA_TYPE
**media_type
,
692 [out] IUnknown
**object,
693 [out] IUnknown
**unknown
);
700 typedef IAMStreamSelect
*PAMSTREAMSELECT
;