02d75cf031497bd4e5cc9ac5c76bad8e7f9aa475
[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 #include <config.h>
22
23 #include <assert.h>
24
25 #define WIN32_NO_STATUS
26 #define WIN32_LEAN_AND_MEAN
27
28 #define COBJMACROS
29 #define NONAMELESSSTRUCT
30 #define NONAMELESSUNION
31
32 #include <dshow.h>
33
34 #include <wine/list.h>
35 #include <wine/strmbase.h>
36 #include <wine/unicode.h>
37
38 #include <wine/debug.h>
39 WINE_DEFAULT_DEBUG_CHANNEL(strmbase);
40
41 /* Quality Control */
42 typedef struct QualityControlImpl {
43 IQualityControl IQualityControl_iface;
44 IPin *input;
45 IBaseFilter *self;
46 IQualityControl *tonotify;
47
48 /* Render stuff */
49 IReferenceClock *clock;
50 REFERENCE_TIME last_in_time, last_left, avg_duration, avg_pt, avg_render, start, stop;
51 REFERENCE_TIME current_jitter, current_rstart, current_rstop, clockstart;
52 double avg_rate;
53 LONG64 rendered, dropped;
54 BOOL qos_handled, is_dropped;
55 } QualityControlImpl;
56
57 HRESULT QualityControlImpl_Create(IPin *input, IBaseFilter *self, QualityControlImpl **ppv);
58 HRESULT QualityControlImpl_Destroy(QualityControlImpl *This);
59 HRESULT WINAPI QualityControlImpl_QueryInterface(IQualityControl *iface, REFIID riid, void **ppv);
60 ULONG WINAPI QualityControlImpl_AddRef(IQualityControl *iface);
61 ULONG WINAPI QualityControlImpl_Release(IQualityControl *iface);
62 HRESULT WINAPI QualityControlImpl_Notify(IQualityControl *iface, IBaseFilter *sender, Quality qm);
63 HRESULT WINAPI QualityControlImpl_SetSink(IQualityControl *iface, IQualityControl *tonotify);
64
65 void QualityControlRender_Start(QualityControlImpl *This, REFERENCE_TIME tStart);
66 void QualityControlRender_SetClock(QualityControlImpl *This, IReferenceClock *clock);
67 HRESULT QualityControlRender_WaitFor(QualityControlImpl *This, IMediaSample *sample, HANDLE ev);
68 void QualityControlRender_DoQOS(QualityControlImpl *priv);
69 void QualityControlRender_BeginRender(QualityControlImpl *This);
70 void QualityControlRender_EndRender(QualityControlImpl *This);