quartz: Implement a dummy null renderer for directshow.
[wine] / dlls / quartz / quartz_private.h
1 /*              DirectShow private interfaces (QUARTZ.DLL)
2  *
3  * Copyright 2002 Lionel Ulmer
4  *
5  * This file contains the (internal) driver registration functions,
6  * driver enumeration APIs and DirectDraw creation functions.
7  *
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.
12  *
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.
17  *
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
21  */
22
23 #ifndef __QUARTZ_PRIVATE_INCLUDED__
24 #define __QUARTZ_PRIVATE_INCLUDED__
25
26 #include <stdarg.h>
27
28 #define COBJMACROS
29
30 #include "windef.h"
31 #include "winbase.h"
32 #include "wtypes.h"
33 #include "wingdi.h"
34 #include "winuser.h"
35 #include "dshow.h"
36
37 #define MEDIATIME_FROM_BYTES(x) ((LONGLONG)(x) * 10000000)
38 #define SEC_FROM_MEDIATIME(time) ((time) / 10000000)
39 #define BYTES_FROM_MEDIATIME(time) SEC_FROM_MEDIATIME(time)
40 #define MSEC_FROM_MEDIATIME(time) ((time) / 10000)
41
42 #define ICOM_THIS_MULTI(impl,field,iface) impl* const This=(impl*)((char*)(iface) - offsetof(impl,field))
43
44 HRESULT FilterGraph_create(IUnknown *pUnkOuter, LPVOID *ppObj);
45 HRESULT FilterGraphNoThread_create(IUnknown *pUnkOuter, LPVOID *ppObj);
46 HRESULT FilterMapper2_create(IUnknown *pUnkOuter, LPVOID *ppObj);
47 HRESULT FilterMapper_create(IUnknown *pUnkOuter, LPVOID *ppObj);
48 HRESULT AsyncReader_create(IUnknown * pUnkOuter, LPVOID * ppv);
49 HRESULT StdMemAllocator_create(IUnknown * pUnkOuter, LPVOID * ppv);
50 HRESULT AVISplitter_create(IUnknown * pUnkOuter, LPVOID * ppv);
51 HRESULT MPEGSplitter_create(IUnknown * pUnkOuter, LPVOID * ppv);
52 HRESULT AVIDec_create(IUnknown * pUnkOuter, LPVOID * ppv);
53 HRESULT DSoundRender_create(IUnknown * pUnkOuter, LPVOID * ppv);
54 HRESULT VideoRenderer_create(IUnknown * pUnkOuter, LPVOID * ppv);
55 HRESULT NullRenderer_create(IUnknown * pUnkOuter, LPVOID * ppv);
56 HRESULT VideoRendererDefault_create(IUnknown * pUnkOuter, LPVOID * ppv);
57 HRESULT QUARTZ_CreateSystemClock(IUnknown * pUnkOuter, LPVOID * ppv);
58 HRESULT ACMWrapper_create(IUnknown * pUnkOuter, LPVOID * ppv);
59 HRESULT WAVEParser_create(IUnknown * pUnkOuter, LPVOID * ppv);
60
61 HRESULT EnumMonikerImpl_Create(IMoniker ** ppMoniker, ULONG nMonikerCount, IEnumMoniker ** ppEnum);
62
63 typedef struct tagENUMPINDETAILS
64 {
65         ULONG cPins;
66         IPin ** ppPins;
67 } ENUMPINDETAILS;
68
69 typedef struct tagENUMEDIADETAILS
70 {
71         ULONG cMediaTypes;
72         AM_MEDIA_TYPE * pMediaTypes;
73 } ENUMMEDIADETAILS;
74
75 HRESULT IEnumPinsImpl_Construct(const ENUMPINDETAILS * pDetails, IEnumPins ** ppEnum);
76 HRESULT IEnumMediaTypesImpl_Construct(const ENUMMEDIADETAILS * pDetails, IEnumMediaTypes ** ppEnum);
77 HRESULT IEnumRegFiltersImpl_Construct(REGFILTER * pInRegFilters, const ULONG size, IEnumRegFilters ** ppEnum);
78 HRESULT IEnumFiltersImpl_Construct(IBaseFilter ** ppFilters, ULONG nFilters, IEnumFilters ** ppEnum);
79
80 extern const char * qzdebugstr_guid(const GUID * id);
81 extern const char * qzdebugstr_State(FILTER_STATE state);
82
83 HRESULT CopyMediaType(AM_MEDIA_TYPE * pDest, const AM_MEDIA_TYPE *pSrc);
84 void FreeMediaType(AM_MEDIA_TYPE * pmt);
85 void DeleteMediaType(AM_MEDIA_TYPE * pmt);
86 BOOL CompareMediaTypes(const AM_MEDIA_TYPE * pmt1, const AM_MEDIA_TYPE * pmt2, BOOL bWildcards);
87 void dump_AM_MEDIA_TYPE(const AM_MEDIA_TYPE * pmt);
88
89 #endif /* __QUARTZ_PRIVATE_INCLUDED__ */