wined3d: read_from_framebuffer_texture() isn't suitable for readback of onscreen...
[wine/testsucceed.git] / dlls / qcap / pin.h
blob68d3e28123c261416b5dbe7feeea8435d4d11135
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, 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, const ALLOCATOR_PROPERTIES *props,
63 LPVOID pUserData, QUERYACCEPTPROC pQueryAccept,
64 LPCRITICAL_SECTION pCritSec, OutputPin * pPinImpl);
66 /* Common */
67 HRESULT WINAPI IPinImpl_ConnectedTo(IPin * iface, IPin ** ppPin);
68 HRESULT WINAPI IPinImpl_ConnectionMediaType(IPin * iface, AM_MEDIA_TYPE * pmt);
69 HRESULT WINAPI IPinImpl_QueryPinInfo(IPin * iface, PIN_INFO * pInfo);
70 HRESULT WINAPI IPinImpl_QueryDirection(IPin * iface, PIN_DIRECTION * pPinDir);
71 HRESULT WINAPI IPinImpl_QueryId(IPin * iface, LPWSTR * Id);
72 HRESULT WINAPI IPinImpl_QueryAccept(IPin * iface, const AM_MEDIA_TYPE * pmt);
73 HRESULT WINAPI IPinImpl_EnumMediaTypes(IPin * iface, IEnumMediaTypes ** ppEnum);
75 /* Output Pin */
76 HRESULT WINAPI OutputPin_Connect(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt);
77 HRESULT WINAPI OutputPin_Disconnect(IPin * iface);
78 HRESULT WINAPI OutputPin_ReceiveConnection(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt);
80 HRESULT OutputPin_GetDeliveryBuffer(OutputPin * This, IMediaSample ** ppSample, REFERENCE_TIME * tStart, REFERENCE_TIME * tStop, DWORD dwFlags);
81 HRESULT OutputPin_SendSample(OutputPin * This, IMediaSample * pSample);