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
("#ifdef WINE_NO_UNICODE_MACROS")
25 cpp_quote
("#undef GetTimeFormat")
28 typedef struct _AMMediaType
32 BOOL bFixedSizeSamples
;
33 BOOL bTemporalCompression
;
38 [size_is(cbFormat
)] BYTE * pbFormat
;
41 typedef enum _PinDirection
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")
52 cpp_quote
("#ifndef REFERENCE_TIME_DEFINED")
53 cpp_quote
("#define REFERENCE_TIME_DEFINED")
54 typedef LONGLONG REFERENCE_TIME
;
57 cpp_quote
("#ifndef REFTIME_DEFINED")
58 cpp_quote
("#define REFTIME_DEFINED")
59 typedef DOUBLE REFTIME
;
62 typedef DWORD_PTR HSEMAPHORE
;
63 typedef DWORD_PTR HEVENT
;
65 typedef struct _AllocatorProperties
71 } ALLOCATOR_PROPERTIES
;
73 interface IAMovieSetup
;
74 interface IEnumFilters
;
75 interface IEnumMediaTypes
;
77 interface IBaseFilter
;
78 interface IFilterGraph
;
79 interface IMediaFilter
;
80 interface IMediaSample
;
81 interface IMemAllocator
;
82 interface IMemAllocatorCallbackTemp
;
83 interface IMemAllocatorNotifyCallbackTemp
;
84 interface IMemInputPin
;
86 interface IReferenceClock
;
90 uuid(56a86891
-0ad4
-11ce
-b03a
-0020af0ba770
),
91 pointer_default(unique)
93 interface IPin
: IUnknown
95 typedef struct _PinInfo
99 WCHAR achName
[MAX_PIN_NAME
];
103 [in] IPin
* pReceivePin
,
104 [in] const AM_MEDIA_TYPE
* pmt
);
106 HRESULT ReceiveConnection
(
107 [in] IPin
* pConnector
,
108 [in] const AM_MEDIA_TYPE
*pmt
);
110 HRESULT Disconnect
(void);
115 HRESULT ConnectionMediaType
(
116 [out] AM_MEDIA_TYPE
*pmt
);
118 HRESULT QueryPinInfo
(
119 [out] PIN_INFO
* pInfo
);
121 HRESULT QueryDirection
(
122 [out] PIN_DIRECTION
*pPinDir
);
128 [in] const AM_MEDIA_TYPE
*pmt
);
130 HRESULT EnumMediaTypes
(
131 [out] IEnumMediaTypes
**ppEnum
);
133 HRESULT QueryInternalConnections
(
135 [in, out] ULONG
*nPin
);
137 HRESULT EndOfStream
(void);
139 HRESULT BeginFlush
(void);
141 HRESULT EndFlush
(void);
143 [in] REFERENCE_TIME tStart
,
144 [in] REFERENCE_TIME tStop
,
152 uuid(56a86892
-0ad4
-11ce
-b03a
-0020af0ba770
),
153 pointer_default(unique)
155 interface IEnumPins
: IUnknown
160 [out, size_is(cPins
)] IPin
** ppPins
,
161 [out] ULONG
* pcFetched
);
169 [out] IEnumPins
**ppEnum
);
172 typedef IEnumPins
*PENUMPINS
;
176 uuid(89c31040
-846b
-11ce
-97d3
-00aa0055595a
),
177 pointer_default(unique)
179 interface IEnumMediaTypes
: IUnknown
182 [in] ULONG cMediaTypes
,
183 [out, size_is(cMediaTypes
)]
184 AM_MEDIA_TYPE
** ppMediaTypes
,
185 [out] ULONG
* pcFetched
189 [in] ULONG cMediaTypes
);
194 [out] IEnumMediaTypes
**ppEnum
198 typedef IEnumMediaTypes
*PENUMMEDIATYPES
;
202 uuid(56a8689f
-0ad4
-11ce
-b03a
-0020af0ba770
),
203 pointer_default(unique)
205 interface IFilterGraph
: IUnknown
208 [in] IBaseFilter
* pFilter
,
209 [in, string] LPCWSTR pName
);
211 HRESULT RemoveFilter
(
212 [in] IBaseFilter
* pFilter
);
215 [out] IEnumFilters
**ppEnum
);
217 HRESULT FindFilterByName
(
218 [in, string] LPCWSTR pName
,
219 [out] IBaseFilter
** ppFilter
);
221 HRESULT ConnectDirect
(
224 [in, unique] const AM_MEDIA_TYPE
* pmt
);
232 HRESULT SetDefaultSyncSource
(void);
235 typedef IFilterGraph
*PFILTERGRAPH
;
239 uuid(56a86893
-0ad4
-11ce
-b03a
-0020af0ba770
),
240 pointer_default(unique)
242 interface IEnumFilters
: IUnknown
246 [out] IBaseFilter
** ppFilter
,
247 [out] ULONG
* pcFetched
);
251 [in] ULONG cFilters
);
258 [out] IEnumFilters
**ppEnum
);
261 typedef IEnumFilters
*PENUMFILTERS
;
265 uuid(56a86899
-0ad4
-11ce
-b03a
-0020af0ba770
),
266 pointer_default(unique)
268 interface IMediaFilter
: IPersist
270 typedef enum _FilterState
280 HRESULT Run
(REFERENCE_TIME tStart
);
283 [in] DWORD dwMilliSecsTimeout
,
284 [out] FILTER_STATE
*State
);
286 HRESULT SetSyncSource
(
287 [in] IReferenceClock
* pClock
);
289 HRESULT GetSyncSource
(
290 [out] IReferenceClock
** pClock
);
293 typedef IMediaFilter
*PMEDIAFILTER
;
297 uuid(56a86895
-0ad4
-11ce
-b03a
-0020af0ba770
),
298 pointer_default(unique)
300 interface IBaseFilter
: IMediaFilter
302 typedef struct _FilterInfo
304 WCHAR achName
[MAX_FILTER_NAME
];
305 IFilterGraph
* pGraph
;
309 [out] IEnumPins
** ppEnum
);
312 [in, string] LPCWSTR
Id,
313 [out] IPin
** ppPin
);
315 HRESULT QueryFilterInfo
(
316 [out] FILTER_INFO
* pInfo
);
318 HRESULT JoinFilterGraph
(
319 [in] IFilterGraph
* pGraph
,
320 [in, string] LPCWSTR pName
);
322 HRESULT QueryVendorInfo
(
323 [out, string] LPWSTR
* pVendorInfo
);
326 typedef IBaseFilter
*PFILTER
;
330 uuid(56a86897
-0ad4
-11ce
-b03a
-0020af0ba770
),
331 pointer_default(unique)
333 interface IReferenceClock
: IUnknown
336 [out] REFERENCE_TIME
*pTime
);
339 [in] REFERENCE_TIME baseTime
,
340 [in] REFERENCE_TIME streamTime
,
342 [out] DWORD_PTR
* pdwAdviseCookie
);
344 HRESULT AdvisePeriodic
(
345 [in] REFERENCE_TIME startTime
,
346 [in] REFERENCE_TIME periodTime
,
347 [in] HSEMAPHORE hSemaphore
,
348 [out] DWORD_PTR
* pdwAdviseCookie
);
351 [in] DWORD_PTR dwAdviseCookie
);
354 typedef IReferenceClock
*PREFERENCECLOCK
;
359 uuid(36b73885-c2c8-11cf-8b46-00805f6cef60),
360 pointer_default(unique)
362 interface IReferenceClock2 : IReferenceClock
366 typedef IReferenceClock2 *PREFERENCECLOCK2;
373 uuid(56a8689a
-0ad4
-11ce
-b03a
-0020af0ba770
),
374 pointer_default(unique)
376 interface IMediaSample
: IUnknown
378 HRESULT GetPointer
([out] BYTE ** ppBuffer
);
383 [out] REFERENCE_TIME
* pTimeStart
,
384 [out] REFERENCE_TIME
* pTimeEnd
);
387 [in] REFERENCE_TIME
* pTimeStart
,
388 [in] REFERENCE_TIME
* pTimeEnd
);
390 HRESULT IsSyncPoint
(void);
392 HRESULT SetSyncPoint
(BOOL bIsSyncPoint
);
394 HRESULT IsPreroll
(void);
396 HRESULT SetPreroll
(BOOL bIsPreroll
);
398 LONG GetActualDataLength
(void);
400 HRESULT SetActualDataLength
(LONG length
);
402 HRESULT GetMediaType
(AM_MEDIA_TYPE
**ppMediaType
);
404 HRESULT SetMediaType
(AM_MEDIA_TYPE
*pMediaType
);
406 HRESULT IsDiscontinuity
(void);
408 HRESULT SetDiscontinuity
(BOOL bDiscontinuity
);
410 HRESULT GetMediaTime
(
411 [out] LONGLONG
* pTimeStart
,
412 [out] LONGLONG
* pTimeEnd
);
414 HRESULT SetMediaTime
(
415 [in] LONGLONG
* pTimeStart
,
416 [in] LONGLONG
* pTimeEnd
);
419 typedef IMediaSample
*PMEDIASAMPLE
;
421 enum tagAM_SAMPLE_PROPERTY_FLAGS
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,
433 AM_STREAM_CONTROL
= 1
436 typedef struct tagAM_SAMPLE2_PROPERTIES
439 DWORD dwTypeSpecificFlags
;
442 REFERENCE_TIME tStart
;
443 REFERENCE_TIME tStop
;
445 AM_MEDIA_TYPE
*pMediaType
;
448 } AM_SAMPLE2_PROPERTIES
;
453 uuid(36b73884
-c2c8
-11cf
-8b46
-00805f6cef60
),
454 pointer_default(unique)
456 interface IMediaSample2
: IMediaSample
458 HRESULT GetProperties
(
459 [in] DWORD cbProperties
,
460 [out, size_is(cbProperties
)] BYTE * pbProperties
463 HRESULT SetProperties
(
464 [in] DWORD cbProperties
,
465 [in, size_is(cbProperties
)] const BYTE * pbProperties
469 typedef IMediaSample2
*PMEDIASAMPLE2
;
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")
476 cpp_quote
("#define AM_GBF_NOWAIT 4")
477 cpp_quote
("#define AM_GBF_NODDSURFACELOCK 8")
481 uuid(56a8689c
-0ad4
-11ce
-b03a
-0020af0ba770
),
482 pointer_default(unique)
484 interface IMemAllocator
: IUnknown
486 HRESULT SetProperties
(
487 [in] ALLOCATOR_PROPERTIES
* pRequest
,
488 [out] ALLOCATOR_PROPERTIES
* pActual
);
490 HRESULT GetProperties
(
491 [out] ALLOCATOR_PROPERTIES
* pProps
);
493 HRESULT Commit
(void);
495 HRESULT Decommit
(void);
498 [out] IMediaSample
**ppBuffer
,
499 [in] REFERENCE_TIME
* pStartTime
,
500 [in] REFERENCE_TIME
* pEndTime
,
503 HRESULT ReleaseBuffer
(
504 [in] IMediaSample
*pBuffer
);
507 typedef IMemAllocator
*PMEMALLOCATOR
;
511 uuid(379a0cf0
-c1de
-11d2
-abf5
-00a0c905f375
),
512 pointer_default(unique)
514 interface IMemAllocatorCallbackTemp
: IMemAllocator
517 [in] IMemAllocatorNotifyCallbackTemp
*pNotify
);
519 HRESULT GetFreeCount
(
520 [out] LONG *plBuffersFree
);
525 uuid(92980b30
-c1de
-11d2
-abf5
-00a0c905f375
),
526 pointer_default(unique)
528 interface IMemAllocatorNotifyCallbackTemp
: IUnknown
530 HRESULT NotifyRelease
();
535 uuid(56a8689d
-0ad4
-11ce
-b03a
-0020af0ba770
),
536 pointer_default(unique)
538 interface IMemInputPin
: IUnknown
540 HRESULT GetAllocator
(
541 [out] IMemAllocator
** ppAllocator
);
543 HRESULT NotifyAllocator
(
544 [in] IMemAllocator
* pAllocator
,
545 [in] BOOL bReadOnly
);
547 HRESULT GetAllocatorRequirements
( [out] ALLOCATOR_PROPERTIES
*pProps
);
550 [in] IMediaSample
* pSample
);
552 HRESULT ReceiveMultiple
(
553 [in, size_is(nSamples
)] IMediaSample
**pSamples
,
555 [out] long *nSamplesProcessed
);
557 HRESULT ReceiveCanBlock
();
560 typedef IMemInputPin
*PMEMINPUTPIN
;
564 uuid(a3d8cec0
-7e5a
-11cf
-bbc5
-00805f6cef20
),
565 pointer_default(unique)
567 interface IAMovieSetup
: IUnknown
570 HRESULT Unregister
( );
573 typedef IAMovieSetup
*PAMOVIESETUP
;
575 typedef enum AM_SEEKING_SeekingFlags
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
;
588 typedef enum AM_SEEKING_SeekingCapabilities
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
;
603 uuid(36b73880
-c2c8
-11cf
-8b46
-00805f6cef60
),
604 pointer_default(unique)
606 interface IMediaSeeking
: IUnknown
608 HRESULT GetCapabilities
( [out] DWORD
* pCapabilities
);
610 HRESULT CheckCapabilities
( [in,out] DWORD
* pCapabilities
);
612 HRESULT IsFormatSupported
([in] const GUID
* pFormat
);
614 HRESULT QueryPreferredFormat
([out] GUID
* pFormat
);
616 HRESULT GetTimeFormat
([out] GUID
*pFormat
);
618 HRESULT IsUsingTimeFormat
([in] const GUID
* pFormat
);
620 HRESULT SetTimeFormat
([in] const GUID
* pFormat
);
622 HRESULT GetDuration
([out] LONGLONG
*pDuration
);
624 HRESULT GetStopPosition
([out] LONGLONG
*pStop
);
626 HRESULT GetCurrentPosition
([out] LONGLONG
*pCurrent
);
628 HRESULT ConvertTimeFormat
([out] LONGLONG
* pTarget
, [in] const GUID
* pTargetFormat
,
629 [in] LONGLONG
Source, [in] const GUID
* pSourceFormat
);
631 HRESULT SetPositions
(
632 [in,out] LONGLONG
* pCurrent
,
633 [in] DWORD dwCurrentFlags
,
634 [in,out] LONGLONG
* pStop
,
635 [in] DWORD dwStopFlags
);
637 HRESULT GetPositions
(
638 [out] LONGLONG
* pCurrent
,
639 [out] LONGLONG
* pStop
);
641 HRESULT GetAvailable
(
642 [out] LONGLONG
* pEarliest
,
643 [out] LONGLONG
* pLatest
);
645 HRESULT SetRate
([in] double dRate
);
647 HRESULT GetRate
([out] double * pdRate
);
649 HRESULT GetPreroll
([out] LONGLONG
* pllPreroll
);
652 typedef IMediaSeeking
*PMEDIASEEKING
;
654 enum tagAM_MEDIAEVENT_FLAGS
656 AM_MEDIAEVENT_NONOTIFY
= 0x01