ReactOS 0.4.16-dev-319-g6cf4263
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
23typedef struct ParserImpl ParserImpl;
24
26typedef HRESULT (*PFN_QUERY_ACCEPT) (LPVOID iface, const AM_MEDIA_TYPE * pmt);
27typedef HRESULT (*PFN_PRE_CONNECT) (IPin * iface, IPin * pConnectPin, ALLOCATOR_PROPERTIES *prop);
28typedef HRESULT (*PFN_CLEANUP) (LPVOID iface);
29typedef HRESULT (*PFN_DISCONNECT) (LPVOID iface);
30
32{
34
37
42};
43
44typedef struct Parser_OutputPin
45{
47
51
55
56extern HRESULT Parser_AddPin(ParserImpl * This, const PIN_INFO * piOutput, ALLOCATOR_PROPERTIES * props, const AM_MEDIA_TYPE * amt);
57
60
61/* Override the _Release function and call this when releasing */
62extern void Parser_Destroy(ParserImpl *This);
63
67extern HRESULT WINAPI Parser_GetClassID(IBaseFilter * iface, CLSID * pClsid);
70extern HRESULT WINAPI Parser_Run(IBaseFilter * iface, REFERENCE_TIME tStart);
71extern HRESULT WINAPI Parser_GetState(IBaseFilter * iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState);
74extern HRESULT WINAPI Parser_EnumPins(IBaseFilter * iface, IEnumPins **ppEnum);
75extern HRESULT WINAPI Parser_FindPin(IBaseFilter * iface, LPCWSTR Id, IPin **ppPin);
76extern HRESULT WINAPI Parser_QueryFilterInfo(IBaseFilter * iface, FILTER_INFO *pInfo);
78extern 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}
DWORD Id
HRESULT(* PFN_PRE_CONNECT)(IPin *iface, IPin *pConnectPin, ALLOCATOR_PROPERTIES *prop)
Definition: parser.h:27
HRESULT WINAPI Parser_QueryFilterInfo(IBaseFilter *iface, FILTER_INFO *pInfo)
Definition: parser.c:419
HRESULT WINAPI Parser_GetClassID(IBaseFilter *iface, CLSID *pClsid)
Definition: parser.c:228
HRESULT WINAPI Parser_Run(IBaseFilter *iface, REFERENCE_TIME tStart)
Definition: parser.c:313
HRESULT WINAPI Parser_Pause(IBaseFilter *iface)
Definition: parser.c:279
HRESULT WINAPI Parser_Stop(IBaseFilter *iface)
Definition: parser.c:241
ULONG WINAPI Parser_AddRef(IBaseFilter *iface)
Definition: parser.c:171
HRESULT(* PFN_DISCONNECT)(LPVOID iface)
Definition: parser.h:29
HRESULT(* PFN_PROCESS_SAMPLE)(LPVOID iface, IMediaSample *pSample, DWORD_PTR cookie)
Definition: parser.h:25
HRESULT WINAPI Parser_QueryVendorInfo(IBaseFilter *iface, LPWSTR *pVendorInfo)
Definition: parser.c:429
HRESULT(* PFN_QUERY_ACCEPT)(LPVOID iface, const AM_MEDIA_TYPE *pmt)
Definition: parser.h:26
void Parser_Destroy(ParserImpl *This)
Definition: parser.c:176
HRESULT Parser_AddPin(ParserImpl *This, const PIN_INFO *piOutput, ALLOCATOR_PROPERTIES *props, const AM_MEDIA_TYPE *amt)
Definition: parser.c:446
HRESULT(* PFN_CLEANUP)(LPVOID iface)
Definition: parser.h:28
HRESULT WINAPI Parser_GetState(IBaseFilter *iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState)
Definition: parser.c:361
HRESULT WINAPI Parser_GetSyncSource(IBaseFilter *iface, IReferenceClock **ppClock)
Definition: parser.c:397
ULONG WINAPI Parser_Release(IBaseFilter *iface)
Definition: parser.c:213
HRESULT WINAPI Parser_EnumPins(IBaseFilter *iface, IEnumPins **ppEnum)
Definition: parser.c:404
static Parser_OutputPin * unsafe_impl_Parser_OutputPin_from_IPin(IPin *iface)
Definition: parser.h:81
HRESULT WINAPI Parser_SetSyncSource(IBaseFilter *iface, IReferenceClock *pClock)
Definition: parser.c:383
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 Parser_QueryInterface(IBaseFilter *iface, REFIID riid, LPVOID *ppv)
Definition: parser.c:142
HRESULT WINAPI Parser_FindPin(IBaseFilter *iface, LPCWSTR Id, IPin **ppPin)
Definition: parser.c:409
HRESULT WINAPI Parser_JoinFilterGraph(IBaseFilter *iface, IFilterGraph *pGraph, LPCWSTR pName)
Definition: parser.c:424
LONGLONG REFERENCE_TIME
Definition: dmusicks.h:9
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint start
Definition: gl.h:1545
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
Definition: axcore.idl:92
static LPSTR pName
Definition: security.c:75
int rate
Definition: pcmconverter.c:97
HRESULT(* STOPPROCESSPROC)(LPVOID userdata)
Definition: pin.h:65
HRESULT(* REQUESTPROC)(LPVOID userdata)
Definition: pin.h:60
#define REFIID
Definition: guiddef.h:118
HRESULT(WINAPI * SourceSeeking_ChangeStop)(IMediaSeeking *iface)
Definition: strmbase.h:272
HRESULT(WINAPI * SourceSeeking_ChangeRate)(IMediaSeeking *iface)
Definition: strmbase.h:270
HRESULT(WINAPI * SourceSeeking_ChangeStart)(IMediaSeeking *iface)
Definition: strmbase.h:271
PFN_CLEANUP fnCleanup
Definition: parser.h:35
ULONG cStreams
Definition: parser.h:40
BaseFilter filter
Definition: parser.h:33
PullPin * pInputPin
Definition: parser.h:38
SourceSeeking sourceSeeking
Definition: parser.h:41
IPin ** ppPins
Definition: parser.h:39
PFN_DISCONNECT fnDisconnect
Definition: parser.h:36
IMemAllocator * alloc
Definition: parser.h:52
BaseOutputPin pin
Definition: parser.h:46
AM_MEDIA_TYPE * pmt
Definition: parser.h:48
LONGLONG dwSamplesProcessed
Definition: parser.h:49
ALLOCATOR_PROPERTIES allocProps
Definition: parser.h:50
BOOL readonly
Definition: parser.h:53
Definition: pin.h:71
Definition: cookie.c:34
Definition: regsvr.c:104
uint32_t DWORD_PTR
Definition: typedefs.h:65
int64_t LONGLONG
Definition: typedefs.h:68
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
static const WCHAR props[]
Definition: wbemdisp.c:288
#define HRESULT
Definition: msvc.h:7
#define WINAPI
Definition: msvc.h:6
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185