quartz_private.h 3.52 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
/*              DirectShow private interfaces (QUARTZ.DLL)
 *
 * Copyright 2002 Lionel Ulmer
 *
 * This file contains the (internal) driver registration functions,
 * driver enumeration APIs and DirectDraw creation functions.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * 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 24 25
 */

#ifndef __QUARTZ_PRIVATE_INCLUDED__
#define __QUARTZ_PRIVATE_INCLUDED__

26 27
#include <stdarg.h>

28 29
#define COBJMACROS

30
#include "windef.h"
31 32 33 34 35 36
#include "winbase.h"
#include "wtypes.h"
#include "wingdi.h"
#include "winuser.h"
#include "dshow.h"

37 38 39 40 41
#define MEDIATIME_FROM_BYTES(x) ((LONGLONG)(x) * 10000000)
#define SEC_FROM_MEDIATIME(time) ((time) / 10000000)
#define BYTES_FROM_MEDIATIME(time) SEC_FROM_MEDIATIME(time)
#define MSEC_FROM_MEDIATIME(time) ((time) / 10000)

42 43
#define ICOM_THIS_MULTI(impl,field,iface) impl* const This=(impl*)((char*)(iface) - offsetof(impl,field))

44 45
HRESULT FilterGraph_create(IUnknown *pUnkOuter, LPVOID *ppObj);
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 53 54
HRESULT AVIDec_create(IUnknown * pUnkOuter, LPVOID * ppv);
HRESULT DSoundRender_create(IUnknown * pUnkOuter, LPVOID * ppv);
HRESULT VideoRenderer_create(IUnknown * pUnkOuter, LPVOID * ppv);
55
HRESULT QUARTZ_CreateSystemClock(IUnknown * pUnkOuter, LPVOID * ppv);
56
HRESULT ACMWrapper_create(IUnknown * pUnkOuter, LPVOID * ppv);
Christian Costa's avatar
Christian Costa committed
57
HRESULT WAVEParser_create(IUnknown * pUnkOuter, LPVOID * ppv);
58 59

HRESULT EnumMonikerImpl_Create(IMoniker ** ppMoniker, ULONG nMonikerCount, IEnumMoniker ** ppEnum);
60

61 62 63 64 65 66 67 68 69 70 71 72 73 74
typedef struct tagENUMPINDETAILS
{
	ULONG cPins;
	IPin ** ppPins;
} ENUMPINDETAILS;

typedef struct tagENUMEDIADETAILS
{
	ULONG cMediaTypes;
	AM_MEDIA_TYPE * pMediaTypes;
} ENUMMEDIADETAILS;

HRESULT IEnumPinsImpl_Construct(const ENUMPINDETAILS * pDetails, IEnumPins ** ppEnum);
HRESULT IEnumMediaTypesImpl_Construct(const ENUMMEDIADETAILS * pDetails, IEnumMediaTypes ** ppEnum);
75 76
HRESULT IEnumRegFiltersImpl_Construct(REGFILTER * pInRegFilters, const ULONG size, IEnumRegFilters ** ppEnum);
HRESULT IEnumFiltersImpl_Construct(IBaseFilter ** ppFilters, ULONG nFilters, IEnumFilters ** ppEnum);
77 78 79 80

extern const char * qzdebugstr_guid(const GUID * id);
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 85 86
BOOL CompareMediaTypes(const AM_MEDIA_TYPE * pmt1, const AM_MEDIA_TYPE * pmt2, BOOL bWildcards);
void dump_AM_MEDIA_TYPE(const AM_MEDIA_TYPE * pmt);

87
#endif /* __QUARTZ_PRIVATE_INCLUDED__ */