Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/acmwrapper.c | 48 ++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 24 deletions(-)
diff --git a/dlls/quartz/acmwrapper.c b/dlls/quartz/acmwrapper.c index b116f98ef01..6df04595bb5 100644 --- a/dlls/quartz/acmwrapper.c +++ b/dlls/quartz/acmwrapper.c @@ -35,7 +35,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(quartz);
-typedef struct ACMWrapperImpl +struct acm_wrapper { struct strmbase_filter filter; CRITICAL_SECTION stream_cs; @@ -53,16 +53,16 @@ typedef struct ACMWrapperImpl
LONGLONG lasttime_real; LONGLONG lasttime_sent; -} ACMWrapperImpl; +};
-static inline ACMWrapperImpl *impl_from_strmbase_filter(struct strmbase_filter *iface) +static struct acm_wrapper *impl_from_strmbase_filter(struct strmbase_filter *iface) { - return CONTAINING_RECORD(iface, ACMWrapperImpl, filter); + return CONTAINING_RECORD(iface, struct acm_wrapper, filter); }
static HRESULT acm_wrapper_sink_query_interface(struct strmbase_pin *iface, REFIID iid, void **out) { - ACMWrapperImpl *filter = impl_from_strmbase_filter(iface->filter); + struct acm_wrapper *filter = impl_from_strmbase_filter(iface->filter);
if (IsEqualGUID(iid, &IID_IMemInputPin)) *out = &filter->sink.IMemInputPin_iface; @@ -80,7 +80,7 @@ static HRESULT acm_wrapper_sink_query_accept(struct strmbase_pin *iface, const A
static HRESULT WINAPI acm_wrapper_sink_Receive(struct strmbase_sink *iface, IMediaSample *pSample) { - ACMWrapperImpl *This = impl_from_strmbase_filter(iface->pin.filter); + struct acm_wrapper *This = impl_from_strmbase_filter(iface->pin.filter); IMediaSample* pOutSample = NULL; DWORD cbDstStream, cbSrcStream; LPBYTE pbDstStream; @@ -278,7 +278,7 @@ static BOOL is_audio_subtype(const GUID *guid)
static HRESULT acm_wrapper_sink_connect(struct strmbase_sink *iface, IPin *peer, const AM_MEDIA_TYPE *mt) { - ACMWrapperImpl *filter = impl_from_strmbase_filter(iface->pin.filter); + struct acm_wrapper *filter = impl_from_strmbase_filter(iface->pin.filter); const WAVEFORMATEX *wfx = (WAVEFORMATEX *)mt->pbFormat; HACMSTREAM drv; MMRESULT res; @@ -312,7 +312,7 @@ static HRESULT acm_wrapper_sink_connect(struct strmbase_sink *iface, IPin *peer,
static void acm_wrapper_sink_disconnect(struct strmbase_sink *iface) { - ACMWrapperImpl *filter = impl_from_strmbase_filter(iface->pin.filter); + struct acm_wrapper *filter = impl_from_strmbase_filter(iface->pin.filter);
if (filter->has) acmStreamClose(filter->has, 0); @@ -332,7 +332,7 @@ static const struct strmbase_sink_ops sink_ops =
static HRESULT acm_wrapper_source_query_interface(struct strmbase_pin *iface, REFIID iid, void **out) { - ACMWrapperImpl *filter = impl_from_strmbase_filter(iface->filter); + struct acm_wrapper *filter = impl_from_strmbase_filter(iface->filter);
if (IsEqualGUID(iid, &IID_IQualityControl)) *out = &filter->source_IQualityControl_iface; @@ -347,7 +347,7 @@ static HRESULT acm_wrapper_source_query_interface(struct strmbase_pin *iface, RE
static HRESULT acm_wrapper_source_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TYPE *mt) { - ACMWrapperImpl *filter = impl_from_strmbase_filter(iface->filter); + struct acm_wrapper *filter = impl_from_strmbase_filter(iface->filter);
if (IsEqualGUID(&mt->majortype, &filter->mt.majortype) && (IsEqualGUID(&mt->subtype, &filter->mt.subtype) @@ -359,7 +359,7 @@ static HRESULT acm_wrapper_source_query_accept(struct strmbase_pin *iface, const static HRESULT acm_wrapper_source_get_media_type(struct strmbase_pin *iface, unsigned int index, AM_MEDIA_TYPE *mt) { - ACMWrapperImpl *filter = impl_from_strmbase_filter(iface->filter); + struct acm_wrapper *filter = impl_from_strmbase_filter(iface->filter);
if (index) return VFW_S_NO_MORE_ITEMS; @@ -370,7 +370,7 @@ static HRESULT acm_wrapper_source_get_media_type(struct strmbase_pin *iface, static HRESULT WINAPI acm_wrapper_source_DecideBufferSize(struct strmbase_source *iface, IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest) { - ACMWrapperImpl *filter = impl_from_strmbase_filter(iface->pin.filter); + struct acm_wrapper *filter = impl_from_strmbase_filter(iface->pin.filter); ALLOCATOR_PROPERTIES actual;
if (!ppropInputRequest->cbAlign) @@ -395,34 +395,34 @@ static const struct strmbase_source_ops source_ops = .pfnDecideBufferSize = acm_wrapper_source_DecideBufferSize, };
-static ACMWrapperImpl *impl_from_source_IQualityControl(IQualityControl *iface) +static struct acm_wrapper *impl_from_source_IQualityControl(IQualityControl *iface) { - return CONTAINING_RECORD(iface, ACMWrapperImpl, source_IQualityControl_iface); + return CONTAINING_RECORD(iface, struct acm_wrapper, source_IQualityControl_iface); }
static HRESULT WINAPI acm_wrapper_source_qc_QueryInterface(IQualityControl *iface, REFIID iid, void **out) { - ACMWrapperImpl *filter = impl_from_source_IQualityControl(iface); + struct acm_wrapper *filter = impl_from_source_IQualityControl(iface); return IPin_QueryInterface(&filter->source.pin.IPin_iface, iid, out); }
static ULONG WINAPI acm_wrapper_source_qc_AddRef(IQualityControl *iface) { - ACMWrapperImpl *filter = impl_from_source_IQualityControl(iface); + struct acm_wrapper *filter = impl_from_source_IQualityControl(iface); return IPin_AddRef(&filter->source.pin.IPin_iface); }
static ULONG WINAPI acm_wrapper_source_qc_Release(IQualityControl *iface) { - ACMWrapperImpl *filter = impl_from_source_IQualityControl(iface); + struct acm_wrapper *filter = impl_from_source_IQualityControl(iface); return IPin_Release(&filter->source.pin.IPin_iface); }
static HRESULT WINAPI acm_wrapper_source_qc_Notify(IQualityControl *iface, IBaseFilter *sender, Quality q) { - ACMWrapperImpl *filter = impl_from_source_IQualityControl(iface); + struct acm_wrapper *filter = impl_from_source_IQualityControl(iface); IQualityControl *peer; HRESULT hr = S_OK;
@@ -443,7 +443,7 @@ static HRESULT WINAPI acm_wrapper_source_qc_Notify(IQualityControl *iface,
static HRESULT WINAPI acm_wrapper_source_qc_SetSink(IQualityControl *iface, IQualityControl *sink) { - ACMWrapperImpl *filter = impl_from_source_IQualityControl(iface); + struct acm_wrapper *filter = impl_from_source_IQualityControl(iface);
TRACE("filter %p, sink %p.\n", filter, sink);
@@ -463,7 +463,7 @@ static const IQualityControlVtbl source_qc_vtbl =
static struct strmbase_pin *acm_wrapper_get_pin(struct strmbase_filter *iface, unsigned int index) { - ACMWrapperImpl *filter = impl_from_strmbase_filter(iface); + struct acm_wrapper *filter = impl_from_strmbase_filter(iface);
if (index == 0) return &filter->sink.pin; @@ -474,7 +474,7 @@ static struct strmbase_pin *acm_wrapper_get_pin(struct strmbase_filter *iface, u
static void acm_wrapper_destroy(struct strmbase_filter *iface) { - ACMWrapperImpl *filter = impl_from_strmbase_filter(iface); + struct acm_wrapper *filter = impl_from_strmbase_filter(iface);
if (filter->sink.pin.peer) IPin_Disconnect(filter->sink.pin.peer); @@ -499,7 +499,7 @@ static void acm_wrapper_destroy(struct strmbase_filter *iface)
static HRESULT acm_wrapper_init_stream(struct strmbase_filter *iface) { - ACMWrapperImpl *filter = impl_from_strmbase_filter(iface); + struct acm_wrapper *filter = impl_from_strmbase_filter(iface);
BaseOutputPinImpl_Active(&filter->source); return S_OK; @@ -507,7 +507,7 @@ static HRESULT acm_wrapper_init_stream(struct strmbase_filter *iface)
static HRESULT acm_wrapper_cleanup_stream(struct strmbase_filter *iface) { - ACMWrapperImpl *filter = impl_from_strmbase_filter(iface); + struct acm_wrapper *filter = impl_from_strmbase_filter(iface);
BaseOutputPinImpl_Inactive(&filter->source); return S_OK; @@ -523,7 +523,7 @@ static const struct strmbase_filter_ops filter_ops =
HRESULT acm_wrapper_create(IUnknown *outer, IUnknown **out) { - ACMWrapperImpl *object; + struct acm_wrapper *object;
if (!(object = calloc(1, sizeof(*object)))) return E_OUTOFMEMORY;
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/avidec.c | 51 ++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 25 deletions(-)
diff --git a/dlls/quartz/avidec.c b/dlls/quartz/avidec.c index 8d38b89e992..1d9bc8acdfe 100644 --- a/dlls/quartz/avidec.c +++ b/dlls/quartz/avidec.c @@ -36,7 +36,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(quartz);
-typedef struct AVIDecImpl +struct avi_decompressor { struct strmbase_filter filter; CRITICAL_SECTION stream_cs; @@ -50,16 +50,16 @@ typedef struct AVIDecImpl HIC hvid; BITMAPINFOHEADER* pBihIn; REFERENCE_TIME late; -} AVIDecImpl; +};
-static AVIDecImpl *impl_from_strmbase_filter(struct strmbase_filter *iface) +static struct avi_decompressor *impl_from_strmbase_filter(struct strmbase_filter *iface) { - return CONTAINING_RECORD(iface, AVIDecImpl, filter); + return CONTAINING_RECORD(iface, struct avi_decompressor, filter); }
static HRESULT avi_decompressor_sink_query_interface(struct strmbase_pin *iface, REFIID iid, void **out) { - AVIDecImpl *filter = impl_from_strmbase_filter(iface->filter); + struct avi_decompressor *filter = impl_from_strmbase_filter(iface->filter);
if (IsEqualGUID(iid, &IID_IMemInputPin)) *out = &filter->sink.IMemInputPin_iface; @@ -77,14 +77,15 @@ static HRESULT avi_decompressor_sink_query_accept(struct strmbase_pin *iface, co
static HRESULT avi_decompressor_sink_end_flush(struct strmbase_sink *iface) { - AVIDecImpl *filter = impl_from_strmbase_filter(iface->pin.filter); + struct avi_decompressor *filter = impl_from_strmbase_filter(iface->pin.filter); filter->late = -1; if (filter->source.pin.peer) return IPin_EndFlush(filter->source.pin.peer); return S_OK; }
-static int AVIDec_DropSample(AVIDecImpl *This, REFERENCE_TIME tStart) { +static int AVIDec_DropSample(struct avi_decompressor *This, REFERENCE_TIME tStart) +{ if (This->late < 0) return 0;
@@ -98,7 +99,7 @@ static int AVIDec_DropSample(AVIDecImpl *This, REFERENCE_TIME tStart) {
static HRESULT WINAPI avi_decompressor_sink_Receive(struct strmbase_sink *iface, IMediaSample *pSample) { - AVIDecImpl *This = impl_from_strmbase_filter(iface->pin.filter); + struct avi_decompressor *This = impl_from_strmbase_filter(iface->pin.filter); VIDEOINFOHEADER *source_format; HRESULT hr; DWORD res; @@ -219,7 +220,7 @@ static HRESULT WINAPI avi_decompressor_sink_Receive(struct strmbase_sink *iface,
static HRESULT avi_decompressor_sink_connect(struct strmbase_sink *iface, IPin *peer, const AM_MEDIA_TYPE *pmt) { - AVIDecImpl *This = impl_from_strmbase_filter(iface->pin.filter); + struct avi_decompressor *This = impl_from_strmbase_filter(iface->pin.filter); HRESULT hr = VFW_E_TYPE_NOT_ACCEPTED;
/* Check root (GUID w/o FOURCC) */ @@ -273,7 +274,7 @@ failed:
static void avi_decompressor_sink_disconnect(struct strmbase_sink *iface) { - AVIDecImpl *filter = impl_from_strmbase_filter(iface->pin.filter); + struct avi_decompressor *filter = impl_from_strmbase_filter(iface->pin.filter);
if (filter->hvid) ICClose(filter->hvid); @@ -295,7 +296,7 @@ static const struct strmbase_sink_ops sink_ops =
static HRESULT avi_decompressor_source_query_interface(struct strmbase_pin *iface, REFIID iid, void **out) { - AVIDecImpl *filter = impl_from_strmbase_filter(iface->filter); + struct avi_decompressor *filter = impl_from_strmbase_filter(iface->filter);
if (IsEqualGUID(iid, &IID_IQualityControl)) *out = &filter->source_IQualityControl_iface; @@ -310,7 +311,7 @@ static HRESULT avi_decompressor_source_query_interface(struct strmbase_pin *ifac
static HRESULT avi_decompressor_source_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TYPE *mt) { - AVIDecImpl *filter = impl_from_strmbase_filter(iface->filter); + struct avi_decompressor *filter = impl_from_strmbase_filter(iface->filter); VIDEOINFOHEADER *sink_format, *format;
if (!filter->sink.pin.peer || !IsEqualGUID(&mt->formattype, &FORMAT_VideoInfo)) @@ -346,7 +347,7 @@ static HRESULT avi_decompressor_source_get_media_type(struct strmbase_pin *iface {&MEDIASUBTYPE_RGB8, BI_RGB, 8}, };
- AVIDecImpl *filter = impl_from_strmbase_filter(iface->filter); + struct avi_decompressor *filter = impl_from_strmbase_filter(iface->filter); const VIDEOINFOHEADER *sink_format; VIDEOINFO *format;
@@ -464,34 +465,34 @@ static const struct strmbase_source_ops source_ops = .pfnDecideBufferSize = avi_decompressor_source_DecideBufferSize, };
-static AVIDecImpl *impl_from_source_IQualityControl(IQualityControl *iface) +static struct avi_decompressor *impl_from_source_IQualityControl(IQualityControl *iface) { - return CONTAINING_RECORD(iface, AVIDecImpl, source_IQualityControl_iface); + return CONTAINING_RECORD(iface, struct avi_decompressor, source_IQualityControl_iface); }
static HRESULT WINAPI acm_wrapper_source_qc_QueryInterface(IQualityControl *iface, REFIID iid, void **out) { - AVIDecImpl *filter = impl_from_source_IQualityControl(iface); + struct avi_decompressor *filter = impl_from_source_IQualityControl(iface); return IPin_QueryInterface(&filter->source.pin.IPin_iface, iid, out); }
static ULONG WINAPI acm_wrapper_source_qc_AddRef(IQualityControl *iface) { - AVIDecImpl *filter = impl_from_source_IQualityControl(iface); + struct avi_decompressor *filter = impl_from_source_IQualityControl(iface); return IPin_AddRef(&filter->source.pin.IPin_iface); }
static ULONG WINAPI acm_wrapper_source_qc_Release(IQualityControl *iface) { - AVIDecImpl *filter = impl_from_source_IQualityControl(iface); + struct avi_decompressor *filter = impl_from_source_IQualityControl(iface); return IPin_Release(&filter->source.pin.IPin_iface); }
static HRESULT WINAPI acm_wrapper_source_qc_Notify(IQualityControl *iface, IBaseFilter *sender, Quality q) { - AVIDecImpl *filter = impl_from_source_IQualityControl(iface); + struct avi_decompressor *filter = impl_from_source_IQualityControl(iface);
TRACE("filter %p, sender %p, type %#x, proportion %u, late %s, timestamp %s.\n", filter, sender, q.Type, q.Proportion, debugstr_time(q.Late), debugstr_time(q.TimeStamp)); @@ -507,7 +508,7 @@ static HRESULT WINAPI acm_wrapper_source_qc_Notify(IQualityControl *iface,
static HRESULT WINAPI acm_wrapper_source_qc_SetSink(IQualityControl *iface, IQualityControl *sink) { - AVIDecImpl *filter = impl_from_source_IQualityControl(iface); + struct avi_decompressor *filter = impl_from_source_IQualityControl(iface);
TRACE("filter %p, sink %p.\n", filter, sink);
@@ -525,7 +526,7 @@ static const IQualityControlVtbl source_qc_vtbl =
static struct strmbase_pin *avi_decompressor_get_pin(struct strmbase_filter *iface, unsigned int index) { - AVIDecImpl *filter = impl_from_strmbase_filter(iface); + struct avi_decompressor *filter = impl_from_strmbase_filter(iface);
if (index == 0) return &filter->sink.pin; @@ -536,7 +537,7 @@ static struct strmbase_pin *avi_decompressor_get_pin(struct strmbase_filter *ifa
static void avi_decompressor_destroy(struct strmbase_filter *iface) { - AVIDecImpl *filter = impl_from_strmbase_filter(iface); + struct avi_decompressor *filter = impl_from_strmbase_filter(iface);
if (filter->sink.pin.peer) IPin_Disconnect(filter->sink.pin.peer); @@ -560,7 +561,7 @@ static void avi_decompressor_destroy(struct strmbase_filter *iface)
static HRESULT avi_decompressor_init_stream(struct strmbase_filter *iface) { - AVIDecImpl *filter = impl_from_strmbase_filter(iface); + struct avi_decompressor *filter = impl_from_strmbase_filter(iface); VIDEOINFOHEADER *source_format; LRESULT res;
@@ -579,7 +580,7 @@ static HRESULT avi_decompressor_init_stream(struct strmbase_filter *iface)
static HRESULT avi_decompressor_cleanup_stream(struct strmbase_filter *iface) { - AVIDecImpl *filter = impl_from_strmbase_filter(iface); + struct avi_decompressor *filter = impl_from_strmbase_filter(iface); LRESULT res;
if (filter->hvid && (res = ICDecompressEnd(filter->hvid))) @@ -602,7 +603,7 @@ static const struct strmbase_filter_ops filter_ops =
HRESULT avi_dec_create(IUnknown *outer, IUnknown **out) { - AVIDecImpl *object; + struct avi_decompressor *object;
if (!(object = calloc(1, sizeof(*object)))) return E_OUTOFMEMORY;
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/avidec.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/dlls/quartz/avidec.c b/dlls/quartz/avidec.c index 1d9bc8acdfe..ada3a1c7e62 100644 --- a/dlls/quartz/avidec.c +++ b/dlls/quartz/avidec.c @@ -470,26 +470,26 @@ static struct avi_decompressor *impl_from_source_IQualityControl(IQualityControl return CONTAINING_RECORD(iface, struct avi_decompressor, source_IQualityControl_iface); }
-static HRESULT WINAPI acm_wrapper_source_qc_QueryInterface(IQualityControl *iface, +static HRESULT WINAPI avi_decompressor_source_qc_QueryInterface(IQualityControl *iface, REFIID iid, void **out) { struct avi_decompressor *filter = impl_from_source_IQualityControl(iface); return IPin_QueryInterface(&filter->source.pin.IPin_iface, iid, out); }
-static ULONG WINAPI acm_wrapper_source_qc_AddRef(IQualityControl *iface) +static ULONG WINAPI avi_decompressor_source_qc_AddRef(IQualityControl *iface) { struct avi_decompressor *filter = impl_from_source_IQualityControl(iface); return IPin_AddRef(&filter->source.pin.IPin_iface); }
-static ULONG WINAPI acm_wrapper_source_qc_Release(IQualityControl *iface) +static ULONG WINAPI avi_decompressor_source_qc_Release(IQualityControl *iface) { struct avi_decompressor *filter = impl_from_source_IQualityControl(iface); return IPin_Release(&filter->source.pin.IPin_iface); }
-static HRESULT WINAPI acm_wrapper_source_qc_Notify(IQualityControl *iface, +static HRESULT WINAPI avi_decompressor_source_qc_Notify(IQualityControl *iface, IBaseFilter *sender, Quality q) { struct avi_decompressor *filter = impl_from_source_IQualityControl(iface); @@ -506,7 +506,7 @@ static HRESULT WINAPI acm_wrapper_source_qc_Notify(IQualityControl *iface, return S_OK; }
-static HRESULT WINAPI acm_wrapper_source_qc_SetSink(IQualityControl *iface, IQualityControl *sink) +static HRESULT WINAPI avi_decompressor_source_qc_SetSink(IQualityControl *iface, IQualityControl *sink) { struct avi_decompressor *filter = impl_from_source_IQualityControl(iface);
@@ -517,11 +517,11 @@ static HRESULT WINAPI acm_wrapper_source_qc_SetSink(IQualityControl *iface, IQua
static const IQualityControlVtbl source_qc_vtbl = { - acm_wrapper_source_qc_QueryInterface, - acm_wrapper_source_qc_AddRef, - acm_wrapper_source_qc_Release, - acm_wrapper_source_qc_Notify, - acm_wrapper_source_qc_SetSink, + avi_decompressor_source_qc_QueryInterface, + avi_decompressor_source_qc_AddRef, + avi_decompressor_source_qc_Release, + avi_decompressor_source_qc_Notify, + avi_decompressor_source_qc_SetSink, };
static struct strmbase_pin *avi_decompressor_get_pin(struct strmbase_filter *iface, unsigned int index)
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/dsoundrender.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c index 6ed714c5899..4d682a3ec7f 100644 --- a/dlls/quartz/dsoundrender.c +++ b/dlls/quartz/dsoundrender.c @@ -483,7 +483,7 @@ static void dsound_render_destroy(struct strmbase_renderer *iface) filter->dsound = NULL;
strmbase_renderer_cleanup(&filter->renderer); - CoTaskMemFree(filter); + free(filter);
InterlockedDecrement(&object_locks); } @@ -802,9 +802,8 @@ HRESULT dsound_render_create(IUnknown *outer, IUnknown **out) DSoundRenderImpl *object; HRESULT hr;
- if (!(object = CoTaskMemAlloc(sizeof(*object)))) + if (!(object = calloc(1, sizeof(*object)))) return E_OUTOFMEMORY; - memset(object, 0, sizeof(*object));
strmbase_renderer_init(&object->renderer, outer, &CLSID_DSoundRender, L"Audio Input pin (rendered)", &renderer_ops); @@ -812,7 +811,7 @@ HRESULT dsound_render_create(IUnknown *outer, IUnknown **out) if (FAILED(hr = system_clock_create(&object->renderer.filter.IUnknown_inner, &object->system_clock))) { strmbase_renderer_cleanup(&object->renderer); - CoTaskMemFree(object); + free(object); return hr; }
@@ -823,7 +822,7 @@ HRESULT dsound_render_create(IUnknown *outer, IUnknown **out) { IUnknown_Release(object->system_clock); strmbase_renderer_cleanup(&object->renderer); - CoTaskMemFree(object); + free(object); return hr; }
@@ -833,7 +832,7 @@ HRESULT dsound_render_create(IUnknown *outer, IUnknown **out) IDirectSound8_Release(object->dsound); IUnknown_Release(object->system_clock); strmbase_renderer_cleanup(&object->renderer); - CoTaskMemFree(object); + free(object); return hr; }
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/dsoundrender.c | 91 ++++++++++++++++++++------------------ 1 file changed, 48 insertions(+), 43 deletions(-)
diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c index 4d682a3ec7f..8d9b1b3ee88 100644 --- a/dlls/quartz/dsoundrender.c +++ b/dlls/quartz/dsoundrender.c @@ -39,7 +39,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(quartz); */ static const REFERENCE_TIME DSoundRenderer_Max_Fill = 150 * 10000;
-typedef struct DSoundRenderImpl +struct dsound_render { struct strmbase_renderer renderer;
@@ -57,31 +57,33 @@ typedef struct DSoundRenderImpl
LONG volume; LONG pan; -} DSoundRenderImpl; +};
-static inline DSoundRenderImpl *impl_from_strmbase_renderer(struct strmbase_renderer *iface) +static struct dsound_render *impl_from_strmbase_renderer(struct strmbase_renderer *iface) { - return CONTAINING_RECORD(iface, DSoundRenderImpl, renderer); + return CONTAINING_RECORD(iface, struct dsound_render, renderer); }
-static inline DSoundRenderImpl *impl_from_IBasicAudio(IBasicAudio *iface) +static struct dsound_render *impl_from_IBasicAudio(IBasicAudio *iface) { - return CONTAINING_RECORD(iface, DSoundRenderImpl, IBasicAudio_iface); + return CONTAINING_RECORD(iface, struct dsound_render, IBasicAudio_iface); }
-static inline DSoundRenderImpl *impl_from_IAMDirectSound(IAMDirectSound *iface) +static struct dsound_render *impl_from_IAMDirectSound(IAMDirectSound *iface) { - return CONTAINING_RECORD(iface, DSoundRenderImpl, IAMDirectSound_iface); + return CONTAINING_RECORD(iface, struct dsound_render, IAMDirectSound_iface); }
-static REFERENCE_TIME time_from_pos(DSoundRenderImpl *This, DWORD pos) { +static REFERENCE_TIME time_from_pos(struct dsound_render *This, DWORD pos) +{ WAVEFORMATEX *wfx = (WAVEFORMATEX *)This->renderer.sink.pin.mt.pbFormat; REFERENCE_TIME ret = 10000000; ret = ret * pos / wfx->nAvgBytesPerSec; return ret; }
-static DWORD pos_from_time(DSoundRenderImpl *This, REFERENCE_TIME time) { +static DWORD pos_from_time(struct dsound_render *This, REFERENCE_TIME time) +{ WAVEFORMATEX *wfx = (WAVEFORMATEX *)This->renderer.sink.pin.mt.pbFormat; REFERENCE_TIME ret = time; ret *= wfx->nAvgBytesPerSec; @@ -90,7 +92,8 @@ static DWORD pos_from_time(DSoundRenderImpl *This, REFERENCE_TIME time) { return ret; }
-static void DSoundRender_UpdatePositions(DSoundRenderImpl *This, DWORD *seqwritepos, DWORD *minwritepos) { +static void DSoundRender_UpdatePositions(struct dsound_render *This, DWORD *seqwritepos, DWORD *minwritepos) +{ WAVEFORMATEX *wfx = (WAVEFORMATEX *)This->renderer.sink.pin.mt.pbFormat; BYTE *buf1, *buf2; DWORD size1, size2, playpos, writepos, old_writepos, old_playpos, adv; @@ -127,7 +130,8 @@ static void DSoundRender_UpdatePositions(DSoundRenderImpl *This, DWORD *seqwrite *seqwritepos = This->writepos; }
-static HRESULT DSoundRender_GetWritePos(DSoundRenderImpl *This, DWORD *ret_writepos, REFERENCE_TIME write_at, DWORD *pfree, DWORD *skip) +static HRESULT DSoundRender_GetWritePos(struct dsound_render *This, + DWORD *ret_writepos, REFERENCE_TIME write_at, DWORD *pfree, DWORD *skip) { WAVEFORMATEX *wfx = (WAVEFORMATEX *)This->renderer.sink.pin.mt.pbFormat; DWORD writepos, min_writepos, playpos; @@ -206,7 +210,7 @@ end: return S_OK; }
-static HRESULT DSoundRender_HandleEndOfStream(DSoundRenderImpl *This) +static HRESULT DSoundRender_HandleEndOfStream(struct dsound_render *This) { while (This->renderer.filter.state == State_Running) { @@ -225,7 +229,8 @@ static HRESULT DSoundRender_HandleEndOfStream(DSoundRenderImpl *This) return S_OK; }
-static HRESULT DSoundRender_SendSampleData(DSoundRenderImpl* This, REFERENCE_TIME tStart, REFERENCE_TIME tStop, const BYTE *data, DWORD size) +static HRESULT DSoundRender_SendSampleData(struct dsound_render *This, + REFERENCE_TIME tStart, REFERENCE_TIME tStop, const BYTE *data, DWORD size) { HRESULT hr;
@@ -286,7 +291,7 @@ static HRESULT WINAPI DSoundRender_ShouldDrawSampleNow(struct strmbase_renderer
static HRESULT WINAPI DSoundRender_PrepareReceive(struct strmbase_renderer *iface, IMediaSample *pSample) { - DSoundRenderImpl *This = impl_from_strmbase_renderer(iface); + struct dsound_render *This = impl_from_strmbase_renderer(iface); HRESULT hr; AM_MEDIA_TYPE *amt;
@@ -321,7 +326,7 @@ static HRESULT WINAPI DSoundRender_PrepareReceive(struct strmbase_renderer *ifac
static HRESULT WINAPI DSoundRender_DoRenderSample(struct strmbase_renderer *iface, IMediaSample *pSample) { - DSoundRenderImpl *This = impl_from_strmbase_renderer(iface); + struct dsound_render *This = impl_from_strmbase_renderer(iface); LPBYTE pbSrcStream = NULL; LONG cbSrcStream = 0; REFERENCE_TIME tStart, tStop; @@ -370,7 +375,7 @@ static HRESULT WINAPI DSoundRender_CheckMediaType(struct strmbase_renderer *ifac
static void dsound_render_stop_stream(struct strmbase_renderer *iface) { - DSoundRenderImpl *This = impl_from_strmbase_renderer(iface); + struct dsound_render *This = impl_from_strmbase_renderer(iface);
TRACE("(%p/%p)->()\n", This, iface);
@@ -380,7 +385,7 @@ static void dsound_render_stop_stream(struct strmbase_renderer *iface)
static void dsound_render_start_stream(struct strmbase_renderer *iface) { - DSoundRenderImpl *This = impl_from_strmbase_renderer(iface); + struct dsound_render *This = impl_from_strmbase_renderer(iface);
TRACE("(%p)\n", This);
@@ -392,7 +397,7 @@ static void dsound_render_start_stream(struct strmbase_renderer *iface)
static HRESULT dsound_render_connect(struct strmbase_renderer *iface, const AM_MEDIA_TYPE *mt) { - DSoundRenderImpl *This = impl_from_strmbase_renderer(iface); + struct dsound_render *This = impl_from_strmbase_renderer(iface); const WAVEFORMATEX *format = (WAVEFORMATEX *)mt->pbFormat; HRESULT hr = S_OK; DSBUFFERDESC buf_desc; @@ -435,7 +440,7 @@ static HRESULT dsound_render_connect(struct strmbase_renderer *iface, const AM_M
static HRESULT WINAPI DSoundRender_BreakConnect(struct strmbase_renderer *iface) { - DSoundRenderImpl *This = impl_from_strmbase_renderer(iface); + struct dsound_render *This = impl_from_strmbase_renderer(iface);
TRACE("(%p)->()\n", iface);
@@ -448,13 +453,13 @@ static HRESULT WINAPI DSoundRender_BreakConnect(struct strmbase_renderer *iface)
static HRESULT WINAPI DSoundRender_EndOfStream(struct strmbase_renderer *iface) { - DSoundRenderImpl *This = impl_from_strmbase_renderer(iface); + struct dsound_render *This = impl_from_strmbase_renderer(iface); return DSoundRender_HandleEndOfStream(This); }
static HRESULT WINAPI DSoundRender_EndFlush(struct strmbase_renderer *iface) { - DSoundRenderImpl *This = impl_from_strmbase_renderer(iface); + struct dsound_render *This = impl_from_strmbase_renderer(iface);
if (This->dsbuffer) { @@ -473,7 +478,7 @@ static HRESULT WINAPI DSoundRender_EndFlush(struct strmbase_renderer *iface)
static void dsound_render_destroy(struct strmbase_renderer *iface) { - DSoundRenderImpl *filter = impl_from_strmbase_renderer(iface); + struct dsound_render *filter = impl_from_strmbase_renderer(iface);
if (filter->dsbuffer) IDirectSoundBuffer_Release(filter->dsbuffer); @@ -490,7 +495,7 @@ static void dsound_render_destroy(struct strmbase_renderer *iface)
static HRESULT dsound_render_query_interface(struct strmbase_renderer *iface, REFIID iid, void **out) { - DSoundRenderImpl *filter = impl_from_strmbase_renderer(iface); + struct dsound_render *filter = impl_from_strmbase_renderer(iface);
if (IsEqualGUID(iid, &IID_IBasicAudio)) *out = &filter->IBasicAudio_iface; @@ -525,7 +530,7 @@ static const struct strmbase_renderer_ops renderer_ops = static HRESULT WINAPI Basicaudio_QueryInterface(IBasicAudio *iface, REFIID riid, LPVOID*ppvObj) { - DSoundRenderImpl *This = impl_from_IBasicAudio(iface); + struct dsound_render *This = impl_from_IBasicAudio(iface);
TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppvObj);
@@ -533,7 +538,7 @@ static HRESULT WINAPI Basicaudio_QueryInterface(IBasicAudio *iface, }
static ULONG WINAPI Basicaudio_AddRef(IBasicAudio *iface) { - DSoundRenderImpl *This = impl_from_IBasicAudio(iface); + struct dsound_render *This = impl_from_IBasicAudio(iface);
TRACE("(%p/%p)->()\n", This, iface);
@@ -541,7 +546,7 @@ static ULONG WINAPI Basicaudio_AddRef(IBasicAudio *iface) { }
static ULONG WINAPI Basicaudio_Release(IBasicAudio *iface) { - DSoundRenderImpl *This = impl_from_IBasicAudio(iface); + struct dsound_render *This = impl_from_IBasicAudio(iface);
TRACE("(%p/%p)->()\n", This, iface);
@@ -598,7 +603,7 @@ static HRESULT WINAPI basic_audio_Invoke(IBasicAudio *iface, DISPID id, REFIID i
static HRESULT WINAPI Basicaudio_put_Volume(IBasicAudio *iface, LONG lVolume) { - DSoundRenderImpl *This = impl_from_IBasicAudio(iface); + struct dsound_render *This = impl_from_IBasicAudio(iface);
TRACE("(%p/%p)->(%d)\n", This, iface, lVolume);
@@ -616,7 +621,7 @@ static HRESULT WINAPI Basicaudio_put_Volume(IBasicAudio *iface,
static HRESULT WINAPI Basicaudio_get_Volume(IBasicAudio *iface, LONG *plVolume) { - DSoundRenderImpl *This = impl_from_IBasicAudio(iface); + struct dsound_render *This = impl_from_IBasicAudio(iface);
TRACE("(%p/%p)->(%p)\n", This, iface, plVolume);
@@ -629,7 +634,7 @@ static HRESULT WINAPI Basicaudio_get_Volume(IBasicAudio *iface,
static HRESULT WINAPI Basicaudio_put_Balance(IBasicAudio *iface, LONG lBalance) { - DSoundRenderImpl *This = impl_from_IBasicAudio(iface); + struct dsound_render *This = impl_from_IBasicAudio(iface);
TRACE("(%p/%p)->(%d)\n", This, iface, lBalance);
@@ -647,7 +652,7 @@ static HRESULT WINAPI Basicaudio_put_Balance(IBasicAudio *iface,
static HRESULT WINAPI Basicaudio_get_Balance(IBasicAudio *iface, LONG *plBalance) { - DSoundRenderImpl *This = impl_from_IBasicAudio(iface); + struct dsound_render *This = impl_from_IBasicAudio(iface);
TRACE("(%p/%p)->(%p)\n", This, iface, plBalance);
@@ -678,7 +683,7 @@ static HRESULT WINAPI AMDirectSound_QueryInterface(IAMDirectSound *iface, REFIID riid, LPVOID*ppvObj) { - DSoundRenderImpl *This = impl_from_IAMDirectSound(iface); + struct dsound_render *This = impl_from_IAMDirectSound(iface);
TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppvObj);
@@ -687,7 +692,7 @@ static HRESULT WINAPI AMDirectSound_QueryInterface(IAMDirectSound *iface,
static ULONG WINAPI AMDirectSound_AddRef(IAMDirectSound *iface) { - DSoundRenderImpl *This = impl_from_IAMDirectSound(iface); + struct dsound_render *This = impl_from_IAMDirectSound(iface);
TRACE("(%p/%p)->()\n", This, iface);
@@ -696,7 +701,7 @@ static ULONG WINAPI AMDirectSound_AddRef(IAMDirectSound *iface)
static ULONG WINAPI AMDirectSound_Release(IAMDirectSound *iface) { - DSoundRenderImpl *This = impl_from_IAMDirectSound(iface); + struct dsound_render *This = impl_from_IAMDirectSound(iface);
TRACE("(%p/%p)->()\n", This, iface);
@@ -706,7 +711,7 @@ static ULONG WINAPI AMDirectSound_Release(IAMDirectSound *iface) /*** IAMDirectSound methods ***/ static HRESULT WINAPI AMDirectSound_GetDirectSoundInterface(IAMDirectSound *iface, IDirectSound **ds) { - DSoundRenderImpl *This = impl_from_IAMDirectSound(iface); + struct dsound_render *This = impl_from_IAMDirectSound(iface);
FIXME("(%p/%p)->(%p): stub\n", This, iface, ds);
@@ -715,7 +720,7 @@ static HRESULT WINAPI AMDirectSound_GetDirectSoundInterface(IAMDirectSound *ifac
static HRESULT WINAPI AMDirectSound_GetPrimaryBufferInterface(IAMDirectSound *iface, IDirectSoundBuffer **buf) { - DSoundRenderImpl *This = impl_from_IAMDirectSound(iface); + struct dsound_render *This = impl_from_IAMDirectSound(iface);
FIXME("(%p/%p)->(%p): stub\n", This, iface, buf);
@@ -724,7 +729,7 @@ static HRESULT WINAPI AMDirectSound_GetPrimaryBufferInterface(IAMDirectSound *if
static HRESULT WINAPI AMDirectSound_GetSecondaryBufferInterface(IAMDirectSound *iface, IDirectSoundBuffer **buf) { - DSoundRenderImpl *This = impl_from_IAMDirectSound(iface); + struct dsound_render *This = impl_from_IAMDirectSound(iface);
FIXME("(%p/%p)->(%p): stub\n", This, iface, buf);
@@ -733,7 +738,7 @@ static HRESULT WINAPI AMDirectSound_GetSecondaryBufferInterface(IAMDirectSound *
static HRESULT WINAPI AMDirectSound_ReleaseDirectSoundInterface(IAMDirectSound *iface, IDirectSound *ds) { - DSoundRenderImpl *This = impl_from_IAMDirectSound(iface); + struct dsound_render *This = impl_from_IAMDirectSound(iface);
FIXME("(%p/%p)->(%p): stub\n", This, iface, ds);
@@ -742,7 +747,7 @@ static HRESULT WINAPI AMDirectSound_ReleaseDirectSoundInterface(IAMDirectSound *
static HRESULT WINAPI AMDirectSound_ReleasePrimaryBufferInterface(IAMDirectSound *iface, IDirectSoundBuffer *buf) { - DSoundRenderImpl *This = impl_from_IAMDirectSound(iface); + struct dsound_render *This = impl_from_IAMDirectSound(iface);
FIXME("(%p/%p)->(%p): stub\n", This, iface, buf);
@@ -751,7 +756,7 @@ static HRESULT WINAPI AMDirectSound_ReleasePrimaryBufferInterface(IAMDirectSound
static HRESULT WINAPI AMDirectSound_ReleaseSecondaryBufferInterface(IAMDirectSound *iface, IDirectSoundBuffer *buf) { - DSoundRenderImpl *This = impl_from_IAMDirectSound(iface); + struct dsound_render *This = impl_from_IAMDirectSound(iface);
FIXME("(%p/%p)->(%p): stub\n", This, iface, buf);
@@ -760,7 +765,7 @@ static HRESULT WINAPI AMDirectSound_ReleaseSecondaryBufferInterface(IAMDirectSou
static HRESULT WINAPI AMDirectSound_SetFocusWindow(IAMDirectSound *iface, HWND hwnd, BOOL bgaudible) { - DSoundRenderImpl *This = impl_from_IAMDirectSound(iface); + struct dsound_render *This = impl_from_IAMDirectSound(iface);
FIXME("(%p/%p)->(%p,%d): stub\n", This, iface, hwnd, bgaudible);
@@ -769,7 +774,7 @@ static HRESULT WINAPI AMDirectSound_SetFocusWindow(IAMDirectSound *iface, HWND h
static HRESULT WINAPI AMDirectSound_GetFocusWindow(IAMDirectSound *iface, HWND *hwnd, BOOL *bgaudible) { - DSoundRenderImpl *This = impl_from_IAMDirectSound(iface); + struct dsound_render *This = impl_from_IAMDirectSound(iface);
FIXME("(%p/%p)->(%p,%p): stub\n", This, iface, hwnd, bgaudible);
@@ -798,8 +803,8 @@ HRESULT dsound_render_create(IUnknown *outer, IUnknown **out) .dwFlags = DSBCAPS_PRIMARYBUFFER, };
+ struct dsound_render *object; IDirectSoundBuffer *buffer; - DSoundRenderImpl *object; HRESULT hr;
if (!(object = calloc(1, sizeof(*object))))
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=68630
Your paranoid android.
=== debiant (32 bit report) ===
quartz: vmr9.c:2714: Test succeeded inside todo block: Got 1 calls to PresentImage().