d3d8: Render state additions.
[wine/multimedia.git] / dlls / qcap / pin.h
blob40a86342e703cfbf395e9f01bd817c381c9898b0
1 /*
2 * IPin function declarations to allow inheritance
4 * Copyright 2003 Robert Shearman
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.
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.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 /* This function will process incoming samples to the pin.
22 * Any return value valid in IMemInputPin::Receive is allowed here
24 typedef HRESULT (* SAMPLEPROC)(LPVOID userdata, IMediaSample * pSample);
26 /* This function will determine whether a type is supported or not.
27 * It is allowed to return any error value (within reason), as opposed
28 * to IPin::QueryAccept which is only allowed to return S_OK or S_FALSE.
30 typedef HRESULT (* QUERYACCEPTPROC)(LPVOID userdata, const AM_MEDIA_TYPE * pmt);
32 /* This function is called prior to finalizing a connection with
33 * another pin and can be used to get things from the other pin
34 * like IMemInput interfaces.
36 typedef HRESULT (* PRECONNECTPROC)(IPin * iface, IPin * pConnectPin);
38 typedef struct IPinImpl
40 const struct IPinVtbl * lpVtbl;
41 LONG refCount;
42 LPCRITICAL_SECTION pCritSec;
43 PIN_INFO pinInfo;
44 IPin * pConnectedTo;
45 AM_MEDIA_TYPE mtCurrent;
46 ENUMMEDIADETAILS enumMediaDetails;
47 QUERYACCEPTPROC fnQueryAccept;
48 LPVOID pUserData;
49 } IPinImpl;
51 typedef struct OutputPin
53 /* inheritance C style! */
54 IPinImpl pin;
56 IMemInputPin * pMemInputPin;
57 HRESULT (* pConnectSpecific)(IPin * iface, IPin * pReceiver, const AM_MEDIA_TYPE * pmt);
58 ALLOCATOR_PROPERTIES allocProps;
59 } OutputPin;
61 /*** Initializers ***/
62 HRESULT OutputPin_Init(const PIN_INFO * pPinInfo, ALLOCATOR_PROPERTIES *props, LPVOID pUserData, QUERYACCEPTPROC pQueryAccept, LPCRITICAL_SECTION pCritSec, OutputPin * pPinImpl);
64 /* Common */
65 HRESULT WINAPI IPinImpl_ConnectedTo(IPin * iface, IPin ** ppPin);
66 HRESULT WINAPI IPinImpl_ConnectionMediaType(IPin * iface, AM_MEDIA_TYPE * pmt);
67 HRESULT WINAPI IPinImpl_QueryPinInfo(IPin * iface, PIN_INFO * pInfo);
68 HRESULT WINAPI IPinImpl_QueryDirection(IPin * iface, PIN_DIRECTION * pPinDir);
69 HRESULT WINAPI IPinImpl_QueryId(IPin * iface, LPWSTR * Id);
70 HRESULT WINAPI IPinImpl_QueryAccept(IPin * iface, const AM_MEDIA_TYPE * pmt);
71 HRESULT WINAPI IPinImpl_EnumMediaTypes(IPin * iface, IEnumMediaTypes ** ppEnum);
72 HRESULT WINAPI IPinImpl_QueryInternalConnections(IPin * iface, IPin ** apPin, ULONG * cPin);
74 /* Output Pin */
75 HRESULT WINAPI OutputPin_Connect(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt);
76 HRESULT WINAPI OutputPin_Disconnect(IPin * iface);
77 HRESULT WINAPI OutputPin_ReceiveConnection(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt);
79 HRESULT OutputPin_GetDeliveryBuffer(OutputPin * This, IMediaSample ** ppSample, const REFERENCE_TIME * tStart, const REFERENCE_TIME * tStop, DWORD dwFlags);
80 HRESULT OutputPin_SendSample(OutputPin * This, IMediaSample * pSample);