Support unrar64.dll
[xy_vsfilter.git] / src / apps / mplayerc / IPinHook.h
blob82ab189a28253813791b3f01d34344df2319738c
1 /*
2 * Copyright (C) 2003-2006 Gabest
3 * http://www.gabest.org
5 * This Program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
8 * any later version.
9 *
10 * This Program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with GNU Make; see the file COPYING. If not, write to
17 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
18 * http://www.gnu.org/copyleft/gpl.html
22 #pragma once
24 interface IPinC;
26 typedef struct IPinCVtbl
28 BEGIN_INTERFACE
29 HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IPinC * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject );
30 ULONG ( STDMETHODCALLTYPE *AddRef )( IPinC * This );
31 ULONG ( STDMETHODCALLTYPE *Release )( IPinC * This );
32 HRESULT ( STDMETHODCALLTYPE *Connect )( IPinC * This, /* [in] */ IPinC *pReceivePin, /* [in] */ const AM_MEDIA_TYPE *pmt );
33 HRESULT ( STDMETHODCALLTYPE *ReceiveConnection )( IPinC * This, /* [in] */ IPinC *pConnector, /* [in] */ const AM_MEDIA_TYPE *pmt );
34 HRESULT ( STDMETHODCALLTYPE *Disconnect )( IPinC * This );
35 HRESULT ( STDMETHODCALLTYPE *ConnectedTo )( IPinC * This, /* [out] */ IPinC **pPin );
36 HRESULT ( STDMETHODCALLTYPE *ConnectionMediaType )( IPinC * This, /* [out] */ AM_MEDIA_TYPE *pmt );
37 HRESULT ( STDMETHODCALLTYPE *QueryPinInfo )( IPinC * This, /* [out] */ PIN_INFO *pInfo );
38 HRESULT ( STDMETHODCALLTYPE *QueryDirection )( IPinC * This, /* [out] */ PIN_DIRECTION *pPinDir );
39 HRESULT ( STDMETHODCALLTYPE *QueryId )( IPinC * This, /* [out] */ LPWSTR *Id );
40 HRESULT ( STDMETHODCALLTYPE *QueryAccept )( IPinC * This, /* [in] */ const AM_MEDIA_TYPE *pmt );
41 HRESULT ( STDMETHODCALLTYPE *EnumMediaTypes )( IPinC * This, /* [out] */ IEnumMediaTypes **ppEnum );
42 HRESULT ( STDMETHODCALLTYPE *QueryInternalConnections )( IPinC * This, /* [out] */ IPinC **apPin, /* [out][in] */ ULONG *nPin );
43 HRESULT ( STDMETHODCALLTYPE *EndOfStream )( IPinC * This );
44 HRESULT ( STDMETHODCALLTYPE *BeginFlush )( IPinC * This );
45 HRESULT ( STDMETHODCALLTYPE *EndFlush )( IPinC * This );
46 HRESULT ( STDMETHODCALLTYPE *NewSegment )( IPinC * This, /* [in] */ REFERENCE_TIME tStart, /* [in] */ REFERENCE_TIME tStop, /* [in] */ double dRate );
47 END_INTERFACE
48 } IPinCVtbl;
50 interface IPinC
52 CONST_VTBL struct IPinCVtbl *lpVtbl;
55 interface IMemInputPinC;
57 typedef struct IMemInputPinCVtbl
59 BEGIN_INTERFACE
60 HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IPinC * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject );
61 ULONG ( STDMETHODCALLTYPE *AddRef )( IPinC * This );
62 ULONG ( STDMETHODCALLTYPE *Release )( IPinC * This );
63 HRESULT ( STDMETHODCALLTYPE *GetAllocator )( IMemInputPinC * This, IMemAllocator **ppAllocator);
64 HRESULT ( STDMETHODCALLTYPE *NotifyAllocator )( IMemInputPinC * This, IMemAllocator *pAllocator, BOOL bReadOnly);
65 HRESULT ( STDMETHODCALLTYPE *GetAllocatorRequirements )( IMemInputPinC * This, ALLOCATOR_PROPERTIES *pProps);
66 HRESULT ( STDMETHODCALLTYPE *Receive )( IMemInputPinC * This, IMediaSample *pSample);
67 HRESULT ( STDMETHODCALLTYPE *ReceiveMultiple )( IMemInputPinC * This, IMediaSample **pSamples, long nSamples, long *nSamplesProcessed);
68 HRESULT ( STDMETHODCALLTYPE *ReceiveCanBlock )( IMemInputPinC * This);
69 END_INTERFACE
70 } IMemInputPinCVtbl;
72 interface IMemInputPinC
74 CONST_VTBL struct IMemInputPinCVtbl *lpVtbl;
77 extern bool HookNewSegmentAndReceive(IPinC* pPinC, IMemInputPinC* pMemInputPin);
78 extern REFERENCE_TIME g_tSegmentStart, g_tSampleStart;
82 #include <videoacc.h>
84 interface IAMVideoAcceleratorC;
86 typedef struct IAMVideoAcceleratorCVtbl
88 BEGIN_INTERFACE
90 HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
91 IAMVideoAcceleratorC * This,
92 /* [in] */ REFIID riid,
93 /* [iid_is][out] */ void **ppvObject);
95 ULONG ( STDMETHODCALLTYPE *AddRef )(
96 IAMVideoAcceleratorC * This);
98 ULONG ( STDMETHODCALLTYPE *Release )(
99 IAMVideoAcceleratorC * This);
101 HRESULT ( STDMETHODCALLTYPE *GetVideoAcceleratorGUIDs )(
102 IAMVideoAcceleratorC * This,
103 /* [out][in] */ LPDWORD pdwNumGuidsSupported,
104 /* [out][in] */ LPGUID pGuidsSupported);
106 HRESULT ( STDMETHODCALLTYPE *GetUncompFormatsSupported )(
107 IAMVideoAcceleratorC * This,
108 /* [in] */ const GUID *pGuid,
109 /* [out][in] */ LPDWORD pdwNumFormatsSupported,
110 /* [out][in] */ LPDDPIXELFORMAT pFormatsSupported);
112 HRESULT ( STDMETHODCALLTYPE *GetInternalMemInfo )(
113 IAMVideoAcceleratorC * This,
114 /* [in] */ const GUID *pGuid,
115 /* [in] */ const AMVAUncompDataInfo *pamvaUncompDataInfo,
116 /* [out][in] */ LPAMVAInternalMemInfo pamvaInternalMemInfo);
118 HRESULT ( STDMETHODCALLTYPE *GetCompBufferInfo )(
119 IAMVideoAcceleratorC * This,
120 /* [in] */ const GUID *pGuid,
121 /* [in] */ const AMVAUncompDataInfo *pamvaUncompDataInfo,
122 /* [out][in] */ LPDWORD pdwNumTypesCompBuffers,
123 /* [out] */ LPAMVACompBufferInfo pamvaCompBufferInfo);
125 HRESULT ( STDMETHODCALLTYPE *GetInternalCompBufferInfo )(
126 IAMVideoAcceleratorC * This,
127 /* [out][in] */ LPDWORD pdwNumTypesCompBuffers,
128 /* [out] */ LPAMVACompBufferInfo pamvaCompBufferInfo);
130 HRESULT ( STDMETHODCALLTYPE *BeginFrame )(
131 IAMVideoAcceleratorC * This,
132 /* [in] */ const AMVABeginFrameInfo *amvaBeginFrameInfo);
134 HRESULT ( STDMETHODCALLTYPE *EndFrame )(
135 IAMVideoAcceleratorC * This,
136 /* [in] */ const AMVAEndFrameInfo *pEndFrameInfo);
138 HRESULT ( STDMETHODCALLTYPE *GetBuffer )(
139 IAMVideoAcceleratorC * This,
140 /* [in] */ DWORD dwTypeIndex,
141 /* [in] */ DWORD dwBufferIndex,
142 /* [in] */ BOOL bReadOnly,
143 /* [out] */ LPVOID *ppBuffer,
144 /* [out] */ LONG *lpStride);
146 HRESULT ( STDMETHODCALLTYPE *ReleaseBuffer )(
147 IAMVideoAcceleratorC * This,
148 /* [in] */ DWORD dwTypeIndex,
149 /* [in] */ DWORD dwBufferIndex);
151 HRESULT ( STDMETHODCALLTYPE *Execute )(
152 IAMVideoAcceleratorC * This,
153 /* [in] */ DWORD dwFunction,
154 /* [in] */ LPVOID lpPrivateInputData,
155 /* [in] */ DWORD cbPrivateInputData,
156 /* [in] */ LPVOID lpPrivateOutputDat,
157 /* [in] */ DWORD cbPrivateOutputData,
158 /* [in] */ DWORD dwNumBuffers,
159 /* [in] */ const AMVABUFFERINFO *pamvaBufferInfo);
161 HRESULT ( STDMETHODCALLTYPE *QueryRenderStatus )(
162 IAMVideoAcceleratorC * This,
163 /* [in] */ DWORD dwTypeIndex,
164 /* [in] */ DWORD dwBufferIndex,
165 /* [in] */ DWORD dwFlags);
167 HRESULT ( STDMETHODCALLTYPE *DisplayFrame )(
168 IAMVideoAcceleratorC * This,
169 /* [in] */ DWORD dwFlipToIndex,
170 /* [in] */ IMediaSample *pMediaSample);
172 END_INTERFACE
173 } IAMVideoAcceleratorCVtbl;
175 interface IAMVideoAcceleratorC
177 CONST_VTBL struct IAMVideoAcceleratorCVtbl *lpVtbl;
180 extern void HookAMVideoAccelerator(IAMVideoAcceleratorC* pAMVideoAcceleratorC);