[LIBS]
[reactos.git] / reactos / lib / 3rdparty / strmbase / strmbase_private.h
1 /*
2 * Header file for private strmbase implementations
3 *
4 * Copyright 2012 Aric Stewart, CodeWeavers
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 #ifndef _STRMBASE_PCH_
22 #define _STRMBASE_PCH_
23
24 #include <wine/config.h>
25
26 #include <assert.h>
27 #include <stdarg.h>
28
29 #define WIN32_NO_STATUS
30 #define _INC_WINDOWS
31 #define COM_NO_WINDOWS_H
32 #define WIN32_LEAN_AND_MEAN
33
34 #define COBJMACROS
35 #define NONAMELESSSTRUCT
36 #define NONAMELESSUNION
37
38 #include <windef.h>
39 #include <winbase.h>
40 #include <objbase.h>
41 #include <dshow.h>
42
43 #include <wine/debug.h>
44 #include <wine/strmbase.h>
45 #include <wine/unicode.h>
46
47 WINE_DEFAULT_DEBUG_CHANNEL(strmbase);
48
49 /* Quality Control */
50 typedef struct QualityControlImpl {
51 IQualityControl IQualityControl_iface;
52 IPin *input;
53 IBaseFilter *self;
54 IQualityControl *tonotify;
55
56 /* Render stuff */
57 IReferenceClock *clock;
58 REFERENCE_TIME last_in_time, last_left, avg_duration, avg_pt, avg_render, start, stop;
59 REFERENCE_TIME current_jitter, current_rstart, current_rstop, clockstart;
60 double avg_rate;
61 LONG64 rendered, dropped;
62 BOOL qos_handled, is_dropped;
63 } QualityControlImpl;
64
65 HRESULT QualityControlImpl_Create(IPin *input, IBaseFilter *self, QualityControlImpl **ppv);
66 HRESULT QualityControlImpl_Destroy(QualityControlImpl *This);
67 HRESULT WINAPI QualityControlImpl_QueryInterface(IQualityControl *iface, REFIID riid, void **ppv);
68 ULONG WINAPI QualityControlImpl_AddRef(IQualityControl *iface);
69 ULONG WINAPI QualityControlImpl_Release(IQualityControl *iface);
70 HRESULT WINAPI QualityControlImpl_Notify(IQualityControl *iface, IBaseFilter *sender, Quality qm);
71 HRESULT WINAPI QualityControlImpl_SetSink(IQualityControl *iface, IQualityControl *tonotify);
72
73 void QualityControlRender_Start(QualityControlImpl *This, REFERENCE_TIME tStart);
74 void QualityControlRender_SetClock(QualityControlImpl *This, IReferenceClock *clock);
75 HRESULT QualityControlRender_WaitFor(QualityControlImpl *This, IMediaSample *sample, HANDLE ev);
76 void QualityControlRender_DoQOS(QualityControlImpl *priv);
77 void QualityControlRender_BeginRender(QualityControlImpl *This);
78 void QualityControlRender_EndRender(QualityControlImpl *This);
79
80 #endif /* _STRMBASE_PCH_ */