WM_PAINT(wParam) might be a valid HDC.
[wine/wine64.git] / dlls / quartz / pin.h
blobeda76e3ad058adb7109c53767e43f6abe4b67a39
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 typedef struct IPinImpl
34 const struct IPinVtbl * lpVtbl;
35 ULONG refCount;
36 LPCRITICAL_SECTION pCritSec;
37 PIN_INFO pinInfo;
38 IPin * pConnectedTo;
39 AM_MEDIA_TYPE mtCurrent;
40 ENUMMEDIADETAILS enumMediaDetails;
41 QUERYACCEPTPROC pQueryAccept;
42 LPVOID pUserData;
43 } IPinImpl;
45 typedef struct InputPin
47 /* inheritance C style! */
48 IPinImpl pin;
50 const IMemInputPinVtbl * lpVtblMemInput;
51 IMemAllocator * pAllocator;
52 SAMPLEPROC pSampleProc;
53 REFERENCE_TIME tStart;
54 REFERENCE_TIME tStop;
55 double dRate;
56 } InputPin;
58 typedef struct OutputPin
60 /* inheritance C style! */
61 IPinImpl pin;
63 IMemInputPin * pMemInputPin;
64 HRESULT (* pConnectSpecific)(IPin * iface, IPin * pReceiver, const AM_MEDIA_TYPE * pmt);
65 } OutputPin;
67 /*** Initializers ***/
68 HRESULT InputPin_Init(const PIN_INFO * pPinInfo, SAMPLEPROC pSampleProc, LPVOID pUserData, QUERYACCEPTPROC pQueryAccept, LPCRITICAL_SECTION pCritSec, InputPin * pPinImpl);
69 HRESULT OutputPin_Init(const PIN_INFO * pPinInfo, LPVOID pUserData, QUERYACCEPTPROC pQueryAccept, LPCRITICAL_SECTION pCritSec, OutputPin * pPinImpl);
71 /*** Constructors ***/
72 HRESULT InputPin_Construct(const PIN_INFO * pPinInfo, SAMPLEPROC pSampleProc, LPVOID pUserData, QUERYACCEPTPROC pQueryAccept, LPCRITICAL_SECTION pCritSec, IPin ** ppPin);
74 /**************************/
75 /*** Pin Implementation ***/
77 /* Common */
78 ULONG WINAPI IPinImpl_AddRef(IPin * iface);
79 HRESULT WINAPI IPinImpl_Disconnect(IPin * iface);
80 HRESULT WINAPI IPinImpl_ConnectedTo(IPin * iface, IPin ** ppPin);
81 HRESULT WINAPI IPinImpl_ConnectionMediaType(IPin * iface, AM_MEDIA_TYPE * pmt);
82 HRESULT WINAPI IPinImpl_QueryPinInfo(IPin * iface, PIN_INFO * pInfo);
83 HRESULT WINAPI IPinImpl_QueryDirection(IPin * iface, PIN_DIRECTION * pPinDir);
84 HRESULT WINAPI IPinImpl_QueryId(IPin * iface, LPWSTR * Id);
85 HRESULT WINAPI IPinImpl_QueryAccept(IPin * iface, const AM_MEDIA_TYPE * pmt);
86 HRESULT WINAPI IPinImpl_EnumMediaTypes(IPin * iface, IEnumMediaTypes ** ppEnum);
87 HRESULT WINAPI IPinImpl_QueryInternalConnections(IPin * iface, IPin ** apPin, ULONG * cPin);
89 /* Input Pin */
90 HRESULT WINAPI InputPin_QueryInterface(IPin * iface, REFIID riid, LPVOID * ppv);
91 ULONG WINAPI InputPin_Release(IPin * iface);
92 HRESULT WINAPI InputPin_Connect(IPin * iface, IPin * pConnector, const AM_MEDIA_TYPE * pmt);
93 HRESULT WINAPI InputPin_ReceiveConnection(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt);
94 HRESULT WINAPI InputPin_EndOfStream(IPin * iface);
95 HRESULT WINAPI InputPin_BeginFlush(IPin * iface);
96 HRESULT WINAPI InputPin_EndFlush(IPin * iface);
97 HRESULT WINAPI InputPin_NewSegment(IPin * iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate);
99 /* Output Pin */
100 HRESULT WINAPI OutputPin_QueryInterface(IPin * iface, REFIID riid, LPVOID * ppv);
101 ULONG WINAPI OutputPin_Release(IPin * iface);
102 HRESULT WINAPI OutputPin_Connect(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt);
103 HRESULT WINAPI OutputPin_ReceiveConnection(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt);
104 HRESULT WINAPI OutputPin_EndOfStream(IPin * iface);
105 HRESULT WINAPI OutputPin_BeginFlush(IPin * iface);
106 HRESULT WINAPI OutputPin_EndFlush(IPin * iface);
107 HRESULT WINAPI OutputPin_NewSegment(IPin * iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate);
109 /**********************************/
110 /*** MemInputPin Implementation ***/
112 HRESULT WINAPI MemInputPin_QueryInterface(IMemInputPin * iface, REFIID riid, LPVOID * ppv);
113 ULONG WINAPI MemInputPin_AddRef(IMemInputPin * iface);
114 ULONG WINAPI MemInputPin_Release(IMemInputPin * iface);
115 HRESULT WINAPI MemInputPin_GetAllocator(IMemInputPin * iface, IMemAllocator ** ppAllocator);
116 HRESULT WINAPI MemInputPin_NotifyAllocator(IMemInputPin * iface, IMemAllocator * pAllocator, BOOL bReadOnly);
117 HRESULT WINAPI MemInputPin_GetAllocatorRequirements(IMemInputPin * iface, ALLOCATOR_PROPERTIES * pProps);
118 HRESULT WINAPI MemInputPin_Receive(IMemInputPin * iface, IMediaSample * pSample);
119 HRESULT WINAPI MemInputPin_ReceiveMultiple(IMemInputPin * iface, IMediaSample ** pSamples, long nSamples, long *nSamplesProcessed);
120 HRESULT WINAPI MemInputPin_ReceiveCanBlock(IMemInputPin * iface);