ReactOS  0.4.14-dev-317-g96040ec
parser.h
Go to the documentation of this file.
1 /*
2  * Parser declarations
3  *
4  * Copyright 2005 Christian Costa
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  */
20 
21 #pragma once
22 
23 typedef struct ParserImpl ParserImpl;
24 
25 typedef HRESULT (*PFN_PROCESS_SAMPLE) (LPVOID iface, IMediaSample * pSample, DWORD_PTR cookie);
26 typedef HRESULT (*PFN_QUERY_ACCEPT) (LPVOID iface, const AM_MEDIA_TYPE * pmt);
27 typedef HRESULT (*PFN_PRE_CONNECT) (IPin * iface, IPin * pConnectPin, ALLOCATOR_PROPERTIES *prop);
28 typedef HRESULT (*PFN_CLEANUP) (LPVOID iface);
29 typedef HRESULT (*PFN_DISCONNECT) (LPVOID iface);
30 
31 struct ParserImpl
32 {
34 
37 
42 };
43 
44 typedef struct Parser_OutputPin
45 {
47 
51 
55 
56 extern HRESULT Parser_AddPin(ParserImpl * This, const PIN_INFO * piOutput, ALLOCATOR_PROPERTIES * props, const AM_MEDIA_TYPE * amt);
57 
58 extern HRESULT Parser_Create(ParserImpl*, const IBaseFilterVtbl *, const CLSID*, PFN_PROCESS_SAMPLE, PFN_QUERY_ACCEPT, PFN_PRE_CONNECT,
60 
61 /* Override the _Release function and call this when releasing */
62 extern void Parser_Destroy(ParserImpl *This);
63 
65 extern ULONG WINAPI Parser_AddRef(IBaseFilter * iface);
66 extern ULONG WINAPI Parser_Release(IBaseFilter * iface);
67 extern HRESULT WINAPI Parser_GetClassID(IBaseFilter * iface, CLSID * pClsid);
68 extern HRESULT WINAPI Parser_Stop(IBaseFilter * iface);
69 extern HRESULT WINAPI Parser_Pause(IBaseFilter * iface);
70 extern HRESULT WINAPI Parser_Run(IBaseFilter * iface, REFERENCE_TIME tStart);
71 extern HRESULT WINAPI Parser_GetState(IBaseFilter * iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState);
74 extern HRESULT WINAPI Parser_EnumPins(IBaseFilter * iface, IEnumPins **ppEnum);
75 extern HRESULT WINAPI Parser_FindPin(IBaseFilter * iface, LPCWSTR Id, IPin **ppPin);
76 extern HRESULT WINAPI Parser_QueryFilterInfo(IBaseFilter * iface, FILTER_INFO *pInfo);
78 extern HRESULT WINAPI Parser_QueryVendorInfo(IBaseFilter * iface, LPWSTR *pVendorInfo);
79 
80 /* COM helpers */
82 {
83  return CONTAINING_RECORD(iface, Parser_OutputPin, pin.pin.IPin_iface);
84 }
HRESULT Parser_AddPin(ParserImpl *This, const PIN_INFO *piOutput, ALLOCATOR_PROPERTIES *props, const AM_MEDIA_TYPE *amt)
Definition: parser.c:446
HRESULT(* REQUESTPROC)(LPVOID userdata)
Definition: pin.h:60
#define HRESULT
Definition: msvc.h:9
ULONG cStreams
Definition: parser.h:40
HRESULT(WINAPI * SourceSeeking_ChangeRate)(IMediaSeeking *iface)
Definition: strmbase.h:270
#define REFIID
Definition: guiddef.h:118
AM_MEDIA_TYPE * pmt
Definition: parser.h:48
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
BaseOutputPin pin
Definition: parser.h:46
REFIID riid
Definition: precomp.h:44
PFN_CLEANUP fnCleanup
Definition: parser.h:35
HRESULT WINAPI Parser_JoinFilterGraph(IBaseFilter *iface, IFilterGraph *pGraph, LPCWSTR pName)
Definition: parser.c:424
REFIID LPVOID * ppv
Definition: atlbase.h:39
IMemAllocator * alloc
Definition: parser.h:52
HRESULT(* PFN_QUERY_ACCEPT)(LPVOID iface, const AM_MEDIA_TYPE *pmt)
Definition: parser.h:26
HRESULT WINAPI Parser_EnumPins(IBaseFilter *iface, IEnumPins **ppEnum)
Definition: parser.c:404
int rate
Definition: pcmconverter.c:97
HRESULT WINAPI Parser_QueryInterface(IBaseFilter *iface, REFIID riid, LPVOID *ppv)
Definition: parser.c:142
IPin ** ppPins
Definition: parser.h:39
DWORD Id
Definition: regsvr.c:103
void Parser_Destroy(ParserImpl *This)
Definition: parser.c:176
Definition: pin.h:70
HRESULT Parser_Create(ParserImpl *, const IBaseFilterVtbl *, const CLSID *, PFN_PROCESS_SAMPLE, PFN_QUERY_ACCEPT, PFN_PRE_CONNECT, PFN_CLEANUP, PFN_DISCONNECT, REQUESTPROC, STOPPROCESSPROC, SourceSeeking_ChangeStop stop, SourceSeeking_ChangeStart start, SourceSeeking_ChangeRate rate)
Definition: parser.c:96
HRESULT(WINAPI * SourceSeeking_ChangeStop)(IMediaSeeking *iface)
Definition: strmbase.h:272
ULONG WINAPI Parser_Release(IBaseFilter *iface)
Definition: parser.c:213
unsigned int BOOL
Definition: ntddk_ex.h:94
HRESULT(WINAPI * SourceSeeking_ChangeStart)(IMediaSeeking *iface)
Definition: strmbase.h:271
HRESULT WINAPI Parser_FindPin(IBaseFilter *iface, LPCWSTR Id, IPin **ppPin)
Definition: parser.c:409
HRESULT(* PFN_DISCONNECT)(LPVOID iface)
Definition: parser.h:29
HRESULT WINAPI Parser_QueryVendorInfo(IBaseFilter *iface, LPWSTR *pVendorInfo)
Definition: parser.c:429
HRESULT WINAPI Parser_Run(IBaseFilter *iface, REFERENCE_TIME tStart)
Definition: parser.c:313
HRESULT WINAPI Parser_Stop(IBaseFilter *iface)
Definition: parser.c:241
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
int64_t LONGLONG
Definition: typedefs.h:66
HRESULT WINAPI Parser_GetSyncSource(IBaseFilter *iface, IReferenceClock **ppClock)
Definition: parser.c:397
static LPSTR pName
Definition: security.c:75
HRESULT(* PFN_PRE_CONNECT)(IPin *iface, IPin *pConnectPin, ALLOCATOR_PROPERTIES *prop)
Definition: parser.h:27
LONGLONG REFERENCE_TIME
Definition: dmusicks.h:9
HRESULT WINAPI Parser_QueryFilterInfo(IBaseFilter *iface, FILTER_INFO *pInfo)
Definition: parser.c:419
LONG HRESULT
Definition: typedefs.h:77
BaseFilter filter
Definition: parser.h:33
HRESULT(* PFN_PROCESS_SAMPLE)(LPVOID iface, IMediaSample *pSample, DWORD_PTR cookie)
Definition: parser.h:25
#define WINAPI
Definition: msvc.h:8
unsigned long DWORD
Definition: ntddk_ex.h:95
ALLOCATOR_PROPERTIES allocProps
Definition: parser.h:50
struct Parser_OutputPin Parser_OutputPin
uint32_t DWORD_PTR
Definition: typedefs.h:63
HRESULT(* PFN_CLEANUP)(LPVOID iface)
Definition: parser.h:28
HRESULT WINAPI Parser_Pause(IBaseFilter *iface)
Definition: parser.c:279
HRESULT(* STOPPROCESSPROC)(LPVOID userdata)
Definition: pin.h:65
GLuint start
Definition: gl.h:1545
PFN_DISCONNECT fnDisconnect
Definition: parser.h:36
static Parser_OutputPin * unsafe_impl_Parser_OutputPin_from_IPin(IPin *iface)
Definition: parser.h:81
Definition: axcore.idl:91
HRESULT WINAPI Parser_SetSyncSource(IBaseFilter *iface, IReferenceClock *pClock)
Definition: parser.c:383
SourceSeeking sourceSeeking
Definition: parser.h:41
PullPin * pInputPin
Definition: parser.h:38
static const WCHAR props[]
Definition: wbemdisp.c:288
unsigned int ULONG
Definition: retypes.h:1
HRESULT WINAPI Parser_GetState(IBaseFilter *iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState)
Definition: parser.c:361
ULONG WINAPI Parser_AddRef(IBaseFilter *iface)
Definition: parser.c:171
BOOL readonly
Definition: parser.h:53
WCHAR * LPWSTR
Definition: xmlstorage.h:184
HRESULT WINAPI Parser_GetClassID(IBaseFilter *iface, CLSID *pClsid)
Definition: parser.c:228
LONGLONG dwSamplesProcessed
Definition: parser.h:49