2012-04-02 14:52:15 +02:00
|
|
|
/*
|
|
|
|
* Header file for private strmbase implementations
|
|
|
|
*
|
|
|
|
* Copyright 2012 Aric Stewart, CodeWeavers
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
2019-05-09 17:12:32 +02:00
|
|
|
#ifndef __WINE_STRMBASE_PRIVATE_H
|
|
|
|
#define __WINE_STRMBASE_PRIVATE_H
|
|
|
|
|
|
|
|
#include <assert.h>
|
|
|
|
#define NONAMELESSUNION
|
|
|
|
#define NONAMELESSSTRUCT
|
|
|
|
#define COBJMACROS
|
|
|
|
#include "dshow.h"
|
|
|
|
#include "uuids.h"
|
|
|
|
#include "wine/debug.h"
|
2019-05-15 02:41:56 +02:00
|
|
|
#include "wine/heap.h"
|
2019-05-09 17:12:32 +02:00
|
|
|
#include "wine/list.h"
|
|
|
|
#include "wine/strmbase.h"
|
|
|
|
|
2019-10-06 02:18:49 +02:00
|
|
|
static inline const char *debugstr_time(REFERENCE_TIME time)
|
|
|
|
{
|
2020-01-31 02:05:16 +01:00
|
|
|
ULONGLONG abstime = time >= 0 ? time : -time;
|
2019-10-06 02:18:49 +02:00
|
|
|
unsigned int i = 0, j = 0;
|
2020-01-31 02:05:16 +01:00
|
|
|
char buffer[23], rev[23];
|
2019-10-06 02:18:49 +02:00
|
|
|
|
2020-01-31 02:05:16 +01:00
|
|
|
while (abstime || i <= 8)
|
2019-10-06 02:18:49 +02:00
|
|
|
{
|
2020-01-31 02:05:16 +01:00
|
|
|
buffer[i++] = '0' + (abstime % 10);
|
|
|
|
abstime /= 10;
|
2019-10-06 02:18:49 +02:00
|
|
|
if (i == 7) buffer[i++] = '.';
|
|
|
|
}
|
2020-01-31 02:05:16 +01:00
|
|
|
if (time < 0) buffer[i++] = '-';
|
2019-10-06 02:18:49 +02:00
|
|
|
|
|
|
|
while (i--) rev[j++] = buffer[i];
|
|
|
|
rev[j] = 0;
|
|
|
|
|
|
|
|
return wine_dbg_sprintf("%s", rev);
|
|
|
|
}
|
|
|
|
|
2012-04-02 14:52:15 +02:00
|
|
|
/* Quality Control */
|
|
|
|
typedef struct QualityControlImpl {
|
|
|
|
IQualityControl IQualityControl_iface;
|
2019-10-28 00:28:03 +01:00
|
|
|
struct strmbase_pin *pin;
|
2012-04-02 14:52:15 +02:00
|
|
|
IQualityControl *tonotify;
|
|
|
|
|
|
|
|
/* Render stuff */
|
|
|
|
REFERENCE_TIME last_in_time, last_left, avg_duration, avg_pt, avg_render, start, stop;
|
|
|
|
REFERENCE_TIME current_jitter, current_rstart, current_rstop, clockstart;
|
|
|
|
double avg_rate;
|
|
|
|
LONG64 rendered, dropped;
|
|
|
|
BOOL qos_handled, is_dropped;
|
|
|
|
} QualityControlImpl;
|
|
|
|
|
2019-10-28 00:28:03 +01:00
|
|
|
HRESULT QualityControlImpl_Create(struct strmbase_pin *pin, QualityControlImpl **out);
|
2015-10-19 10:57:52 +02:00
|
|
|
void QualityControlImpl_Destroy(QualityControlImpl *This);
|
2012-04-02 14:52:15 +02:00
|
|
|
HRESULT WINAPI QualityControlImpl_QueryInterface(IQualityControl *iface, REFIID riid, void **ppv);
|
|
|
|
ULONG WINAPI QualityControlImpl_AddRef(IQualityControl *iface);
|
|
|
|
ULONG WINAPI QualityControlImpl_Release(IQualityControl *iface);
|
|
|
|
HRESULT WINAPI QualityControlImpl_Notify(IQualityControl *iface, IBaseFilter *sender, Quality qm);
|
|
|
|
HRESULT WINAPI QualityControlImpl_SetSink(IQualityControl *iface, IQualityControl *tonotify);
|
|
|
|
|
|
|
|
void QualityControlRender_Start(QualityControlImpl *This, REFERENCE_TIME tStart);
|
|
|
|
void QualityControlRender_DoQOS(QualityControlImpl *priv);
|
2019-07-02 05:49:46 +02:00
|
|
|
void QualityControlRender_BeginRender(QualityControlImpl *This, REFERENCE_TIME start, REFERENCE_TIME stop);
|
2012-04-02 14:52:15 +02:00
|
|
|
void QualityControlRender_EndRender(QualityControlImpl *This);
|
2019-05-09 17:12:32 +02:00
|
|
|
|
2020-03-13 03:34:10 +01:00
|
|
|
void strmbase_passthrough_update_time(struct strmbase_passthrough *passthrough, REFERENCE_TIME time);
|
|
|
|
void strmbase_passthrough_invalidate_time(struct strmbase_passthrough *passthrough);
|
|
|
|
void strmbase_passthrough_eos(struct strmbase_passthrough *passthrough);
|
2019-05-09 17:12:32 +02:00
|
|
|
|
|
|
|
#endif /* __WINE_STRMBASE_PRIVATE_H */
|