1 /* DirectShow private interfaces (QUARTZ.DLL)
3 * Copyright 2002 Lionel Ulmer
5 * This file contains the (internal) driver registration functions,
6 * driver enumeration APIs and DirectDraw creation functions.
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 #ifndef __QUARTZ_PRIVATE_INCLUDED__
24 #define __QUARTZ_PRIVATE_INCLUDED__
36 #include "wine/list.h"
38 #define MEDIATIME_FROM_BYTES(x) ((LONGLONG)(x) * 10000000)
39 #define SEC_FROM_MEDIATIME(time) ((time) / 10000000)
40 #define BYTES_FROM_MEDIATIME(time) SEC_FROM_MEDIATIME(time)
41 #define MSEC_FROM_MEDIATIME(time) ((time) / 10000)
43 #define ICOM_THIS_MULTI(impl,field,iface) impl* const This=(impl*)((char*)(iface) - offsetof(impl,field))
45 HRESULT
FilterGraph_create(IUnknown
*pUnkOuter
, LPVOID
*ppObj
);
46 HRESULT
FilterGraphNoThread_create(IUnknown
*pUnkOuter
, LPVOID
*ppObj
);
47 HRESULT
FilterMapper2_create(IUnknown
*pUnkOuter
, LPVOID
*ppObj
);
48 HRESULT
FilterMapper_create(IUnknown
*pUnkOuter
, LPVOID
*ppObj
);
49 HRESULT
AsyncReader_create(IUnknown
* pUnkOuter
, LPVOID
* ppv
);
50 HRESULT
StdMemAllocator_create(IUnknown
* pUnkOuter
, LPVOID
* ppv
);
51 HRESULT
AVISplitter_create(IUnknown
* pUnkOuter
, LPVOID
* ppv
);
52 HRESULT
MPEGSplitter_create(IUnknown
* pUnkOuter
, LPVOID
* ppv
);
53 HRESULT
AVIDec_create(IUnknown
* pUnkOuter
, LPVOID
* ppv
);
54 HRESULT
DSoundRender_create(IUnknown
* pUnkOuter
, LPVOID
* ppv
);
55 HRESULT
VideoRenderer_create(IUnknown
* pUnkOuter
, LPVOID
* ppv
);
56 HRESULT
NullRenderer_create(IUnknown
* pUnkOuter
, LPVOID
* ppv
);
57 HRESULT
VideoRendererDefault_create(IUnknown
* pUnkOuter
, LPVOID
* ppv
);
58 HRESULT
QUARTZ_CreateSystemClock(IUnknown
* pUnkOuter
, LPVOID
* ppv
);
59 HRESULT
ACMWrapper_create(IUnknown
* pUnkOuter
, LPVOID
* ppv
);
60 HRESULT
WAVEParser_create(IUnknown
* pUnkOuter
, LPVOID
* ppv
);
61 HRESULT
SeekingPassThru_create(IUnknown
*pUnkOuter
, LPVOID
*ppObj
);
63 HRESULT
EnumMonikerImpl_Create(IMoniker
** ppMoniker
, ULONG nMonikerCount
, IEnumMoniker
** ppEnum
);
65 typedef struct tagENUMEDIADETAILS
68 AM_MEDIA_TYPE
* pMediaTypes
;
71 typedef HRESULT (* FNOBTAINPIN
)(IBaseFilter
*iface
, ULONG pos
, IPin
**pin
, DWORD
*lastsynctick
);
73 HRESULT
IEnumPinsImpl_Construct(IEnumPins
** ppEnum
, FNOBTAINPIN receive_pin
, IBaseFilter
*base
);
74 HRESULT
IEnumMediaTypesImpl_Construct(const ENUMMEDIADETAILS
* pDetails
, IEnumMediaTypes
** ppEnum
);
75 HRESULT
IEnumRegFiltersImpl_Construct(REGFILTER
* pInRegFilters
, const ULONG size
, IEnumRegFilters
** ppEnum
);
76 HRESULT
IEnumFiltersImpl_Construct(IBaseFilter
** ppFilters
, ULONG nFilters
, IEnumFilters
** ppEnum
);
78 extern const char * qzdebugstr_guid(const GUID
* id
);
79 extern const char * qzdebugstr_State(FILTER_STATE state
);
81 HRESULT
CopyMediaType(AM_MEDIA_TYPE
* pDest
, const AM_MEDIA_TYPE
*pSrc
);
82 void FreeMediaType(AM_MEDIA_TYPE
* pmt
);
83 void DeleteMediaType(AM_MEDIA_TYPE
* pmt
);
84 BOOL
CompareMediaTypes(const AM_MEDIA_TYPE
* pmt1
, const AM_MEDIA_TYPE
* pmt2
, BOOL bWildcards
);
85 void dump_AM_MEDIA_TYPE(const AM_MEDIA_TYPE
* pmt
);
86 HRESULT
updatehres( HRESULT original
, HRESULT
new );
88 typedef struct StdMediaSample2
90 const IMediaSample2Vtbl
* lpvtbl
;
93 AM_SAMPLE2_PROPERTIES props
;
94 IMemAllocator
* pParent
;
95 struct list listentry
;
100 typedef struct BaseMemAllocator
102 const IMemAllocatorVtbl
* lpVtbl
;
105 ALLOCATOR_PROPERTIES props
;
106 HRESULT (* fnAlloc
) (IMemAllocator
*);
107 HRESULT (* fnFree
)(IMemAllocator
*);
108 HRESULT (* fnVerify
)(IMemAllocator
*, ALLOCATOR_PROPERTIES
*);
109 HRESULT (* fnBufferPrepare
)(IMemAllocator
*, StdMediaSample2
*, DWORD flags
);
110 HRESULT (* fnBufferReleased
)(IMemAllocator
*, StdMediaSample2
*);
111 void (* fnDestroyed
)(IMemAllocator
*);
113 BOOL bDecommitQueued
;
116 struct list free_list
;
117 struct list used_list
;
118 CRITICAL_SECTION
*pCritSect
;
121 HRESULT
BaseMemAllocator_Init(HRESULT (* fnAlloc
)(IMemAllocator
*),
122 HRESULT (* fnFree
)(IMemAllocator
*),
123 HRESULT (* fnVerify
)(IMemAllocator
*, ALLOCATOR_PROPERTIES
*),
124 HRESULT (* fnBufferPrepare
)(IMemAllocator
*, StdMediaSample2
*, DWORD
),
125 HRESULT (* fnBufferReleased
)(IMemAllocator
*, StdMediaSample2
*),
126 void (* fnDestroyed
)(IMemAllocator
*),
127 CRITICAL_SECTION
*pCritSect
,
128 BaseMemAllocator
* pMemAlloc
);
130 HRESULT
StdMediaSample2_Construct(BYTE
* pbBuffer
, LONG cbBuffer
, IMemAllocator
* pParent
, StdMediaSample2
** ppSample
);
131 void StdMediaSample2_Delete(StdMediaSample2
* This
);
133 #endif /* __QUARTZ_PRIVATE_INCLUDED__ */