Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/strmbase/strmbase_private.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/dlls/strmbase/strmbase_private.h b/dlls/strmbase/strmbase_private.h index b03258bc416..4b0468d7c47 100644 --- a/dlls/strmbase/strmbase_private.h +++ b/dlls/strmbase/strmbase_private.h @@ -34,15 +34,17 @@
static inline const char *debugstr_time(REFERENCE_TIME time) { + ULONGLONG abstime = llabs(time); unsigned int i = 0, j = 0; - char buffer[22], rev[22]; + char buffer[23], rev[23];
- while (time || i <= 8) + while (abstime || i <= 8) { - buffer[i++] = '0' + (time % 10); - time /= 10; + buffer[i++] = '0' + (abstime % 10); + abstime /= 10; if (i == 7) buffer[i++] = '.'; } + if (time < 0) buffer[i++] = '-';
while (i--) rev[j++] = buffer[i]; rev[j] = 0;
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/acmwrapper.c | 4 ++-- dlls/quartz/dsoundrender.c | 7 ++++--- dlls/quartz/filtergraph.c | 12 ++++++++++-- dlls/quartz/memallocator.c | 6 ++++-- dlls/quartz/quartz_private.h | 20 ++++++++++++++++++++ dlls/quartz/systemclock.c | 7 +++---- 6 files changed, 43 insertions(+), 13 deletions(-)
diff --git a/dlls/quartz/acmwrapper.c b/dlls/quartz/acmwrapper.c index 33d9debe5cd..aa34f3ae263 100644 --- a/dlls/quartz/acmwrapper.c +++ b/dlls/quartz/acmwrapper.c @@ -163,7 +163,7 @@ static HRESULT WINAPI ACMWrapper_Receive(TransformFilter *tf, IMediaSample *pSam goto error; }
- TRACE("Sample start time: %u.%03u\n", (DWORD)(tStart/10000000), (DWORD)((tStart/10000)%1000)); + TRACE("Sample start time: %s.\n", debugstr_time(tStart)); if (ash.cbSrcLengthUsed == cbSrcStream) { IMediaSample_SetTime(pOutSample, &tStart, &tStop); @@ -196,7 +196,7 @@ static HRESULT WINAPI ACMWrapper_Receive(TransformFilter *tf, IMediaSample *pSam IMediaSample_SetMediaTime(pOutSample, NULL, NULL); }
- TRACE("Sample stop time: %u.%03u\n", (DWORD)(tStart/10000000), (DWORD)((tStart/10000)%1000)); + TRACE("Sample stop time: %s\n", debugstr_time(tStart));
hr = IMemInputPin_Receive(This->tf.source.pMemInputPin, pOutSample); if (hr != S_OK && hr != VFW_E_NOT_CONNECTED) { diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c index 6fd49dac9b5..4a0f5c4d104 100644 --- a/dlls/quartz/dsoundrender.c +++ b/dlls/quartz/dsoundrender.c @@ -171,7 +171,7 @@ static HRESULT DSoundRender_GetWritePos(DSoundRenderImpl *This, DWORD *ret_write *ret_writepos = writepos; } else if (delta_t < 0) { REFERENCE_TIME past, min_writepos_t; - WARN("Delta too big %i/%i, overwriting old data or even skipping\n", (int)delta_t / 10000, (int)max_lag / 10000); + WARN("Delta too big %s/%s, overwriting old data or even skipping\n", debugstr_time(delta_t), debugstr_time(max_lag)); if (min_writepos >= playpos) min_writepos_t = cur + time_from_pos(This, min_writepos - playpos); else @@ -189,7 +189,7 @@ static HRESULT DSoundRender_GetWritePos(DSoundRenderImpl *This, DWORD *ret_write } } else /* delta_t > 0 */ { DWORD aheadbytes; - WARN("Delta too big %i/%i, too far ahead\n", (int)delta_t / 10000, (int)max_lag / 10000); + WARN("Delta too big %s/%s, too far ahead\n", debugstr_time(delta_t), debugstr_time(max_lag)); aheadbytes = pos_from_time(This, delta_t); WARN("Advancing %u bytes\n", aheadbytes); if (delta_t >= DSoundRenderer_Max_Fill) @@ -204,7 +204,8 @@ end: else *pfree = This->buf_size + playpos - *ret_writepos; if (time_from_pos(This, This->buf_size - *pfree) >= DSoundRenderer_Max_Fill) { - TRACE("Blocked: too full %i / %i\n", (int)(time_from_pos(This, This->buf_size - *pfree)/10000), (int)(DSoundRenderer_Max_Fill / 10000)); + TRACE("Blocked: too full %s / %s\n", debugstr_time(time_from_pos(This, This->buf_size - *pfree)), + debugstr_time(DSoundRenderer_Max_Fill)); return S_FALSE; } return S_OK; diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index e30dae0a591..cd4e7f40e0d 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -2500,6 +2500,8 @@ static HRESULT WINAPI MediaSeeking_GetStopPosition(IMediaSeeking *iface, LONGLON }
LeaveCriticalSection(&graph->cs); + + TRACE("Returning %s (%s seconds).\n", wine_dbgstr_longlong(*stop), debugstr_time(*stop)); return hr; }
@@ -2525,7 +2527,7 @@ static HRESULT WINAPI MediaSeeking_GetCurrentPosition(IMediaSeeking *iface, LONG
LeaveCriticalSection(&graph->cs);
- TRACE("Returning %s.\n", wine_dbgstr_longlong(ret)); + TRACE("Returning %s (%s seconds).\n", wine_dbgstr_longlong(ret), debugstr_time(ret)); *current = ret;
return S_OK; @@ -2565,6 +2567,12 @@ static HRESULT WINAPI MediaSeeking_SetPositions(IMediaSeeking *iface, LONGLONG * TRACE("graph %p, current %s, current_flags %#x, stop %s, stop_flags %#x.\n", graph, current_ptr ? wine_dbgstr_longlong(*current_ptr) : "<null>", current_flags, stop_ptr ? wine_dbgstr_longlong(*stop_ptr): "<null>", stop_flags); + if (current_ptr) + TRACE("Setting current position to %s (%s seconds).\n", + wine_dbgstr_longlong(*current_ptr), debugstr_time(*current_ptr)); + if (stop_ptr) + TRACE("Setting stop position to %s (%s seconds).\n", + wine_dbgstr_longlong(*stop_ptr), debugstr_time(*stop_ptr));
if ((current_flags & 0x7) != AM_SEEKING_AbsolutePositioning && (current_flags & 0x7) != AM_SEEKING_NoPositioning) @@ -5249,7 +5257,7 @@ static HRESULT WINAPI MediaFilter_Run(IMediaFilter *iface, REFERENCE_TIME start) IFilterGraphImpl *graph = impl_from_IMediaFilter(iface); REFERENCE_TIME stream_start = start;
- TRACE("graph %p, start %s.\n", graph, wine_dbgstr_longlong(start)); + TRACE("graph %p, start %s.\n", graph, debugstr_time(start));
EnterCriticalSection(&graph->cs);
diff --git a/dlls/quartz/memallocator.c b/dlls/quartz/memallocator.c index 2f5855e95b5..fab0f2d1c44 100644 --- a/dlls/quartz/memallocator.c +++ b/dlls/quartz/memallocator.c @@ -564,7 +564,8 @@ static HRESULT WINAPI StdMediaSample2_SetTime(IMediaSample2 *iface, REFERENCE_TI { StdMediaSample2 *sample = impl_from_IMediaSample2(iface);
- TRACE("iface %p, start %p, end %p.\n", iface, start, end); + TRACE("sample %p, start %s, end %s.\n", sample, start ? debugstr_time(*start) : "(null)", + end ? debugstr_time(*end) : "(null)");
if (start) { @@ -745,7 +746,8 @@ static HRESULT WINAPI StdMediaSample2_SetMediaTime(IMediaSample2 *iface, LONGLON { StdMediaSample2 *sample = impl_from_IMediaSample2(iface);
- TRACE("sample %p, start %p, end %p.\n", iface, start, end); + TRACE("sample %p, start %s, end %s.\n", sample, start ? debugstr_time(*start) : "(null)", + end ? debugstr_time(*end) : "(null)");
if (start) { diff --git a/dlls/quartz/quartz_private.h b/dlls/quartz/quartz_private.h index 791bec7db67..93e4e488510 100644 --- a/dlls/quartz/quartz_private.h +++ b/dlls/quartz/quartz_private.h @@ -36,6 +36,26 @@ #include "wine/strmbase.h" #include "wine/list.h"
+static inline const char *debugstr_time(REFERENCE_TIME time) +{ + ULONGLONG abstime = llabs(time); + unsigned int i = 0, j = 0; + char buffer[23], rev[23]; + + while (abstime || i <= 8) + { + buffer[i++] = '0' + (abstime % 10); + abstime /= 10; + if (i == 7) buffer[i++] = '.'; + } + if (time < 0) buffer[i++] = '-'; + + while (i--) rev[j++] = buffer[i]; + rev[j] = 0; + + return wine_dbg_sprintf("%s", rev); +} + /* see IAsyncReader::Request on MSDN for the explanation of this */ #define MEDIATIME_FROM_BYTES(x) ((LONGLONG)(x) * 10000000) #define BYTES_FROM_MEDIATIME(time) ((time) / 10000000) diff --git a/dlls/quartz/systemclock.c b/dlls/quartz/systemclock.c index 8122cc5b0bc..51e96c82e68 100644 --- a/dlls/quartz/systemclock.c +++ b/dlls/quartz/systemclock.c @@ -202,8 +202,6 @@ static HRESULT WINAPI SystemClockImpl_GetTime(IReferenceClock *iface, REFERENCE_ REFERENCE_TIME ret; HRESULT hr;
- TRACE("clock %p, time %p.\n", clock, time); - if (!time) { return E_POINTER; } @@ -217,6 +215,7 @@ static HRESULT WINAPI SystemClockImpl_GetTime(IReferenceClock *iface, REFERENCE_
LeaveCriticalSection(&clock->cs);
+ TRACE("clock %p, time %p, returning %s.\n", clock, time, debugstr_time(ret)); return hr; }
@@ -227,7 +226,7 @@ static HRESULT WINAPI SystemClockImpl_AdviseTime(IReferenceClock *iface, struct advise_sink *sink;
TRACE("clock %p, base %s, offset %s, event %#lx, cookie %p.\n", - clock, wine_dbgstr_longlong(base), wine_dbgstr_longlong(offset), event, cookie); + clock, debugstr_time(base), debugstr_time(offset), event, cookie);
if (!event) return E_INVALIDARG; @@ -263,7 +262,7 @@ static HRESULT WINAPI SystemClockImpl_AdvisePeriodic(IReferenceClock* iface, struct advise_sink *sink;
TRACE("clock %p, start %s, period %s, semaphore %#lx, cookie %p.\n", - clock, wine_dbgstr_longlong(start), wine_dbgstr_longlong(period), semaphore, cookie); + clock, debugstr_time(start), debugstr_time(period), semaphore, cookie);
if (!semaphore) return E_INVALIDARG;
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/qcap/avimux.c | 5 ++--- dlls/qcap/vfwcapture.c | 4 ++-- dlls/qedit/samplegrabber.c | 2 -- dlls/strmbase/filter.c | 40 ++++++++++++++++++++------------------ dlls/strmbase/renderer.c | 2 +- include/wine/strmbase.h | 3 ++- 6 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/dlls/qcap/avimux.c b/dlls/qcap/avimux.c index e402479fb17..91a0b17f8e1 100644 --- a/dlls/qcap/avimux.c +++ b/dlls/qcap/avimux.c @@ -772,8 +772,7 @@ static HRESULT WINAPI ConfigInterleaving_put_Mode(
if(This->mode != mode) { if(This->source.pin.peer) { - HRESULT hr = IFilterGraph_Reconnect(This->filter.filterInfo.pGraph, - &This->source.pin.IPin_iface); + HRESULT hr = IFilterGraph_Reconnect(This->filter.graph, &This->source.pin.IPin_iface); if(FAILED(hr)) return hr; } @@ -1152,7 +1151,7 @@ static HRESULT WINAPI AviMuxOut_AttemptConnection(struct strmbase_source *iface, if (!filter->in[i]->pin.pin.peer) continue;
- hr = IFilterGraph_Reconnect(filter->filter.filterInfo.pGraph, &filter->in[i]->pin.pin.IPin_iface); + hr = IFilterGraph_Reconnect(filter->filter.graph, &filter->in[i]->pin.pin.IPin_iface); if (FAILED(hr)) { IPin_Disconnect(&iface->pin.IPin_iface); diff --git a/dlls/qcap/vfwcapture.c b/dlls/qcap/vfwcapture.c index b4716bf1925..30869ede13e 100644 --- a/dlls/qcap/vfwcapture.c +++ b/dlls/qcap/vfwcapture.c @@ -216,9 +216,9 @@ AMStreamConfig_SetFormat(IAMStreamConfig *iface, AM_MEDIA_TYPE *pmt) }
hr = qcap_driver_set_format(This->driver_info, pmt); - if (SUCCEEDED(hr) && This->filter.filterInfo.pGraph && This->source.pin.peer) + if (SUCCEEDED(hr) && This->filter.graph && This->source.pin.peer) { - hr = IFilterGraph_Reconnect(This->filter.filterInfo.pGraph, &This->source.pin.IPin_iface); + hr = IFilterGraph_Reconnect(This->filter.graph, &This->source.pin.IPin_iface); if (SUCCEEDED(hr)) TRACE("Reconnection completed, with new media format..\n"); } diff --git a/dlls/qedit/samplegrabber.c b/dlls/qedit/samplegrabber.c index edb814468a3..7652f70d958 100644 --- a/dlls/qedit/samplegrabber.c +++ b/dlls/qedit/samplegrabber.c @@ -80,8 +80,6 @@ static inline SG_Impl *impl_from_IMemInputPin(IMemInputPin *iface) static void SampleGrabber_cleanup(SG_Impl *This) { TRACE("(%p)\n", This); - if (This->filter.filterInfo.pGraph) - WARN("(%p) still joined to filter graph %p\n", This, This->filter.filterInfo.pGraph); if (This->allocator) IMemAllocator_Release(This->allocator); if (This->grabberIface) diff --git a/dlls/strmbase/filter.c b/dlls/strmbase/filter.c index 43da4b3fb90..84521b80990 100644 --- a/dlls/strmbase/filter.c +++ b/dlls/strmbase/filter.c @@ -443,35 +443,37 @@ static HRESULT WINAPI filter_FindPin(IBaseFilter *iface, const WCHAR *id, IPin * return VFW_E_NOT_FOUND; }
-static HRESULT WINAPI filter_QueryFilterInfo(IBaseFilter *iface, FILTER_INFO *pInfo) +static HRESULT WINAPI filter_QueryFilterInfo(IBaseFilter *iface, FILTER_INFO *info) { - struct strmbase_filter *This = impl_from_IBaseFilter(iface); - TRACE("(%p)->(%p)\n", This, pInfo); + struct strmbase_filter *filter = impl_from_IBaseFilter(iface);
- lstrcpyW(pInfo->achName, This->filterInfo.achName); - pInfo->pGraph = This->filterInfo.pGraph; + TRACE("filter %p, info %p.\n", filter, info);
- if (pInfo->pGraph) - IFilterGraph_AddRef(pInfo->pGraph); + lstrcpyW(info->achName, filter->name); + info->pGraph = filter->graph; + + if (info->pGraph) + IFilterGraph_AddRef(info->pGraph);
return S_OK; }
-static HRESULT WINAPI filter_JoinFilterGraph(IBaseFilter *iface, IFilterGraph *pGraph, const WCHAR *pName) +static HRESULT WINAPI filter_JoinFilterGraph(IBaseFilter *iface, IFilterGraph *graph, const WCHAR *name) { - struct strmbase_filter *This = impl_from_IBaseFilter(iface); + struct strmbase_filter *filter = impl_from_IBaseFilter(iface);
- TRACE("(%p)->(%p, %s)\n", This, pGraph, debugstr_w(pName)); + TRACE("filter %p, graph %p, name %s.\n", filter, graph, debugstr_w(name));
- EnterCriticalSection(&This->csFilter); - { - if (pName) - lstrcpynW(This->filterInfo.achName, pName, MAX_FILTER_NAME); - else - *This->filterInfo.achName = '\0'; - This->filterInfo.pGraph = pGraph; /* NOTE: do NOT increase ref. count */ - } - LeaveCriticalSection(&This->csFilter); + EnterCriticalSection(&filter->csFilter); + + if (name) + lstrcpynW(filter->name, name, ARRAY_SIZE(filter->name)); + else + filter->name[0] = 0; + /* The graph references us, so we cannot also reference the graph. */ + filter->graph = graph; + + LeaveCriticalSection(&filter->csFilter);
return S_OK; } diff --git a/dlls/strmbase/renderer.c b/dlls/strmbase/renderer.c index 1bc581963cf..974823b0466 100644 --- a/dlls/strmbase/renderer.c +++ b/dlls/strmbase/renderer.c @@ -199,7 +199,7 @@ static void sink_disconnect(struct strmbase_sink *iface) static HRESULT sink_eos(struct strmbase_sink *iface) { struct strmbase_renderer *filter = impl_from_IPin(&iface->pin.IPin_iface); - IFilterGraph *graph = filter->filter.filterInfo.pGraph; + IFilterGraph *graph = filter->filter.graph; IMediaEventSink *event_sink; HRESULT hr = S_OK;
diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h index abb04a8384a..ae0fadb391e 100644 --- a/include/wine/strmbase.h +++ b/include/wine/strmbase.h @@ -130,7 +130,8 @@ struct strmbase_filter
FILTER_STATE state; IReferenceClock * pClock; - FILTER_INFO filterInfo; + WCHAR name[128]; + IFilterGraph *graph; CLSID clsid; LONG pin_version;
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/dsoundrender.c | 8 +++--- dlls/strmbase/filter.c | 50 ++++++++++++++++++---------------- dlls/strmbase/qualitycontrol.c | 12 ++++---- dlls/strmbase/renderer.c | 8 +++--- include/wine/strmbase.h | 2 +- 5 files changed, 41 insertions(+), 39 deletions(-)
diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c index 4a0f5c4d104..4e991ff5616 100644 --- a/dlls/quartz/dsoundrender.c +++ b/dlls/quartz/dsoundrender.c @@ -141,9 +141,9 @@ static HRESULT DSoundRender_GetWritePos(DSoundRenderImpl *This, DWORD *ret_write
DSoundRender_UpdatePositions(This, &writepos, &min_writepos); playpos = This->last_playpos; - if (This->renderer.filter.pClock) + if (This->renderer.filter.clock) { - IReferenceClock_GetTime(This->renderer.filter.pClock, &cur); + IReferenceClock_GetTime(This->renderer.filter.clock, &cur); cur -= This->renderer.stream_start; } else write_at = -1; @@ -363,10 +363,10 @@ static HRESULT WINAPI DSoundRender_DoRenderSample(struct strmbase_renderer *ifac TRACE("Sample data ptr = %p, size = %d\n", pbSrcStream, cbSrcStream);
hr = DSoundRender_SendSampleData(This, tStart, tStop, pbSrcStream, cbSrcStream); - if (This->renderer.filter.state == State_Running && This->renderer.filter.pClock && tStart >= 0) { + if (This->renderer.filter.state == State_Running && This->renderer.filter.clock && tStart >= 0) { REFERENCE_TIME jitter, now = 0; Quality q; - IReferenceClock_GetTime(This->renderer.filter.pClock, &now); + IReferenceClock_GetTime(This->renderer.filter.clock, &now); jitter = now - This->renderer.stream_start - tStart; if (jitter <= -DSoundRenderer_Max_Fill) jitter += DSoundRenderer_Max_Fill; diff --git a/dlls/strmbase/filter.c b/dlls/strmbase/filter.c index 84521b80990..98ec3c6f44c 100644 --- a/dlls/strmbase/filter.c +++ b/dlls/strmbase/filter.c @@ -380,36 +380,38 @@ static HRESULT WINAPI filter_GetState(IBaseFilter *iface, DWORD timeout, FILTER_ return hr; }
-static HRESULT WINAPI filter_SetSyncSource(IBaseFilter * iface, IReferenceClock *pClock) +static HRESULT WINAPI filter_SetSyncSource(IBaseFilter *iface, IReferenceClock *clock) { - struct strmbase_filter *This = impl_from_IBaseFilter(iface); - TRACE("(%p)->(%p)\n", This, pClock); + struct strmbase_filter *filter = impl_from_IBaseFilter(iface);
- EnterCriticalSection(&This->csFilter); - { - if (This->pClock) - IReferenceClock_Release(This->pClock); - This->pClock = pClock; - if (This->pClock) - IReferenceClock_AddRef(This->pClock); - } - LeaveCriticalSection(&This->csFilter); + TRACE("filter %p, clock %p.\n", filter, clock); + + EnterCriticalSection(&filter->csFilter); + + if (filter->clock) + IReferenceClock_Release(filter->clock); + filter->clock = clock; + if (filter->clock) + IReferenceClock_AddRef(filter->clock); + + LeaveCriticalSection(&filter->csFilter);
return S_OK; }
-static HRESULT WINAPI filter_GetSyncSource(IBaseFilter *iface, IReferenceClock **ppClock) +static HRESULT WINAPI filter_GetSyncSource(IBaseFilter *iface, IReferenceClock **clock) { - struct strmbase_filter *This = impl_from_IBaseFilter(iface); - TRACE("(%p)->(%p)\n", This, ppClock); + struct strmbase_filter *filter = impl_from_IBaseFilter(iface);
- EnterCriticalSection(&This->csFilter); - { - *ppClock = This->pClock; - if (This->pClock) - IReferenceClock_AddRef(This->pClock); - } - LeaveCriticalSection(&This->csFilter); + TRACE("filter %p, clock %p.\n", filter, clock); + + EnterCriticalSection(&filter->csFilter); + + *clock = filter->clock; + if (filter->clock) + IReferenceClock_AddRef(filter->clock); + + LeaveCriticalSection(&filter->csFilter);
return S_OK; } @@ -528,8 +530,8 @@ void strmbase_filter_init(struct strmbase_filter *filter, IUnknown *outer,
void strmbase_filter_cleanup(struct strmbase_filter *This) { - if (This->pClock) - IReferenceClock_Release(This->pClock); + if (This->clock) + IReferenceClock_Release(This->clock);
This->IBaseFilter_iface.lpVtbl = NULL; DeleteCriticalSection(&This->csFilter); diff --git a/dlls/strmbase/qualitycontrol.c b/dlls/strmbase/qualitycontrol.c index a7e6e713641..763108d46ac 100644 --- a/dlls/strmbase/qualitycontrol.c +++ b/dlls/strmbase/qualitycontrol.c @@ -160,7 +160,7 @@ void QualityControlRender_DoQOS(QualityControlImpl *priv)
TRACE("%p\n", priv);
- if (!priv->pin->filter->pClock || priv->current_rstart < 0) + if (!priv->pin->filter->clock || priv->current_rstart < 0) return;
start = priv->current_rstart; @@ -276,7 +276,7 @@ void QualityControlRender_BeginRender(QualityControlImpl *This, REFERENCE_TIME s if (start >= 0) { REFERENCE_TIME now; - IReferenceClock_GetTime(This->pin->filter->pClock, &now); + IReferenceClock_GetTime(This->pin->filter->clock, &now); This->current_jitter = (now - This->clockstart) - start; } else @@ -291,10 +291,10 @@ void QualityControlRender_BeginRender(QualityControlImpl *This, REFERENCE_TIME s else This->rendered++;
- if (!This->pin->filter->pClock) + if (!This->pin->filter->clock) return;
- IReferenceClock_GetTime(This->pin->filter->pClock, &This->start); + IReferenceClock_GetTime(This->pin->filter->clock, &This->start);
TRACE("Starting at %s.\n", debugstr_time(This->start)); } @@ -305,8 +305,8 @@ void QualityControlRender_EndRender(QualityControlImpl *This)
TRACE("%p\n", This);
- if (!This->pin->filter->pClock || This->start < 0 - || FAILED(IReferenceClock_GetTime(This->pin->filter->pClock, &This->stop))) + if (!This->pin->filter->clock || This->start < 0 + || FAILED(IReferenceClock_GetTime(This->pin->filter->clock, &This->stop))) return;
elapsed = This->start - This->stop; diff --git a/dlls/strmbase/renderer.c b/dlls/strmbase/renderer.c index 974823b0466..8470da40f00 100644 --- a/dlls/strmbase/renderer.c +++ b/dlls/strmbase/renderer.c @@ -331,7 +331,7 @@ HRESULT WINAPI BaseRendererImpl_Receive(struct strmbase_renderer *This, IMediaSa SetEvent(This->state_event);
/* Wait for render Time */ - if (This->filter.pClock && SUCCEEDED(IMediaSample_GetTime(pSample, &start, &stop))) + if (This->filter.clock && SUCCEEDED(IMediaSample_GetTime(pSample, &start, &stop))) { hr = S_FALSE; RendererPosPassThru_RegisterMediaTime(This->pPosition, start); @@ -345,20 +345,20 @@ HRESULT WINAPI BaseRendererImpl_Receive(struct strmbase_renderer *This, IMediaSa REFERENCE_TIME now; DWORD_PTR cookie;
- IReferenceClock_GetTime(This->filter.pClock, &now); + IReferenceClock_GetTime(This->filter.clock, &now);
if (now - This->stream_start - start <= -10000) { HANDLE handles[2] = {This->advise_event, This->flush_event}; DWORD ret;
- IReferenceClock_AdviseTime(This->filter.pClock, This->stream_start, + IReferenceClock_AdviseTime(This->filter.clock, This->stream_start, start, (HEVENT)This->advise_event, &cookie);
LeaveCriticalSection(&This->csRenderLock);
ret = WaitForMultipleObjects(2, handles, FALSE, INFINITE); - IReferenceClock_Unadvise(This->filter.pClock, cookie); + IReferenceClock_Unadvise(This->filter.clock, cookie);
if (ret == 1) { diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h index ae0fadb391e..965f6be401a 100644 --- a/include/wine/strmbase.h +++ b/include/wine/strmbase.h @@ -129,7 +129,7 @@ struct strmbase_filter CRITICAL_SECTION csFilter;
FILTER_STATE state; - IReferenceClock * pClock; + IReferenceClock *clock; WCHAR name[128]; IFilterGraph *graph; CLSID clsid;
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/strmbase/filter.c | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-)
diff --git a/dlls/strmbase/filter.c b/dlls/strmbase/filter.c index 98ec3c6f44c..2809832ee82 100644 --- a/dlls/strmbase/filter.c +++ b/dlls/strmbase/filter.c @@ -208,7 +208,7 @@ static HRESULT WINAPI filter_inner_QueryInterface(IUnknown *iface, REFIID iid, v struct strmbase_filter *filter = impl_from_IUnknown(iface); HRESULT hr;
- TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out); + TRACE("filter %p %s, iid %s, out %p.\n", filter, debugstr_w(filter->name), debugstr_guid(iid), out);
*out = NULL;
@@ -289,12 +289,13 @@ static ULONG WINAPI filter_Release(IBaseFilter *iface) return IUnknown_Release(filter->outer_unk); }
-static HRESULT WINAPI filter_GetClassID(IBaseFilter * iface, CLSID * pClsid) +static HRESULT WINAPI filter_GetClassID(IBaseFilter *iface, CLSID *clsid) { - struct strmbase_filter *This = impl_from_IBaseFilter(iface); - TRACE("(%p)->(%p)\n", This, pClsid); + struct strmbase_filter *filter = impl_from_IBaseFilter(iface);
- *pClsid = This->clsid; + TRACE("filter %p %s, clsid %p.\n", filter, debugstr_w(filter->name), clsid); + + *clsid = filter->clsid;
return S_OK; } @@ -304,7 +305,7 @@ static HRESULT WINAPI filter_Stop(IBaseFilter *iface) struct strmbase_filter *filter = impl_from_IBaseFilter(iface); HRESULT hr = S_OK;
- TRACE("filter %p.\n", filter); + TRACE("filter %p %s.\n", filter, debugstr_w(filter->name));
EnterCriticalSection(&filter->csFilter);
@@ -325,7 +326,7 @@ static HRESULT WINAPI filter_Pause(IBaseFilter *iface) struct strmbase_filter *filter = impl_from_IBaseFilter(iface); HRESULT hr = S_OK;
- TRACE("filter %p.\n", filter); + TRACE("filter %p %s.\n", filter, debugstr_w(filter->name));
EnterCriticalSection(&filter->csFilter);
@@ -346,7 +347,7 @@ static HRESULT WINAPI filter_Run(IBaseFilter *iface, REFERENCE_TIME start) struct strmbase_filter *filter = impl_from_IBaseFilter(iface); HRESULT hr = S_OK;
- TRACE("filter %p, start %s.\n", filter, debugstr_time(start)); + TRACE("filter %p %s, start %s.\n", filter, debugstr_w(filter->name), debugstr_time(start));
EnterCriticalSection(&filter->csFilter);
@@ -367,7 +368,7 @@ static HRESULT WINAPI filter_GetState(IBaseFilter *iface, DWORD timeout, FILTER_ struct strmbase_filter *filter = impl_from_IBaseFilter(iface); HRESULT hr = S_OK;
- TRACE("filter %p, timeout %u, state %p.\n", filter, timeout, state); + TRACE("filter %p %s, timeout %u, state %p.\n", filter, debugstr_w(filter->name), timeout, state);
EnterCriticalSection(&filter->csFilter);
@@ -384,7 +385,7 @@ static HRESULT WINAPI filter_SetSyncSource(IBaseFilter *iface, IReferenceClock * { struct strmbase_filter *filter = impl_from_IBaseFilter(iface);
- TRACE("filter %p, clock %p.\n", filter, clock); + TRACE("filter %p %s, clock %p.\n", filter, debugstr_w(filter->name), clock);
EnterCriticalSection(&filter->csFilter);
@@ -403,7 +404,7 @@ static HRESULT WINAPI filter_GetSyncSource(IBaseFilter *iface, IReferenceClock * { struct strmbase_filter *filter = impl_from_IBaseFilter(iface);
- TRACE("filter %p, clock %p.\n", filter, clock); + TRACE("filter %p %s, clock %p.\n", filter, debugstr_w(filter->name), clock);
EnterCriticalSection(&filter->csFilter);
@@ -420,20 +421,20 @@ static HRESULT WINAPI filter_EnumPins(IBaseFilter *iface, IEnumPins **enum_pins) { struct strmbase_filter *filter = impl_from_IBaseFilter(iface);
- TRACE("iface %p, enum_pins %p.\n", iface, enum_pins); + TRACE("filter %p %s, enum_pins %p.\n", filter, debugstr_w(filter->name), enum_pins);
return enum_pins_create(filter, enum_pins); }
static HRESULT WINAPI filter_FindPin(IBaseFilter *iface, const WCHAR *id, IPin **ret) { - struct strmbase_filter *This = impl_from_IBaseFilter(iface); + struct strmbase_filter *filter = impl_from_IBaseFilter(iface); struct strmbase_pin *pin; unsigned int i;
- TRACE("(%p)->(%s, %p)\n", This, debugstr_w(id), ret); + TRACE("filter %p %s, id %s, ret %p.\n", filter, debugstr_w(filter->name), debugstr_w(id), ret);
- for (i = 0; (pin = This->ops->filter_get_pin(This, i)); ++i) + for (i = 0; (pin = filter->ops->filter_get_pin(filter, i)); ++i) { if (!lstrcmpW(id, pin->name)) { @@ -449,7 +450,7 @@ static HRESULT WINAPI filter_QueryFilterInfo(IBaseFilter *iface, FILTER_INFO *in { struct strmbase_filter *filter = impl_from_IBaseFilter(iface);
- TRACE("filter %p, info %p.\n", filter, info); + TRACE("filter %p %s, info %p.\n", filter, debugstr_w(filter->name), info);
lstrcpyW(info->achName, filter->name); info->pGraph = filter->graph; @@ -464,7 +465,7 @@ static HRESULT WINAPI filter_JoinFilterGraph(IBaseFilter *iface, IFilterGraph *g { struct strmbase_filter *filter = impl_from_IBaseFilter(iface);
- TRACE("filter %p, graph %p, name %s.\n", filter, graph, debugstr_w(name)); + TRACE("filter %p %s, graph %p, name %s.\n", filter, debugstr_w(filter->name), graph, debugstr_w(name));
EnterCriticalSection(&filter->csFilter);
@@ -480,9 +481,12 @@ static HRESULT WINAPI filter_JoinFilterGraph(IBaseFilter *iface, IFilterGraph *g return S_OK; }
-static HRESULT WINAPI filter_QueryVendorInfo(IBaseFilter *iface, WCHAR **pVendorInfo) +static HRESULT WINAPI filter_QueryVendorInfo(IBaseFilter *iface, WCHAR **info) { - TRACE("(%p)->(%p)\n", iface, pVendorInfo); + struct strmbase_filter *filter = impl_from_IBaseFilter(iface); + + TRACE("filter %p %s, info %p.\n", filter, debugstr_w(filter->name), info); + return E_NOTIMPL; }
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/strmbase/pin.c | 118 ++++++++++++++++++++++++++------------------ 1 file changed, 70 insertions(+), 48 deletions(-)
diff --git a/dlls/strmbase/pin.c b/dlls/strmbase/pin.c index fd74a409556..6b84c9d1f18 100644 --- a/dlls/strmbase/pin.c +++ b/dlls/strmbase/pin.c @@ -300,7 +300,7 @@ static HRESULT WINAPI pin_ConnectedTo(IPin * iface, IPin ** ppPin) struct strmbase_pin *This = impl_from_IPin(iface); HRESULT hr;
- TRACE("(%p)->(%p)\n", This, ppPin); + TRACE("pin %p %s:%s, peer %p.\n", This, debugstr_w(This->filter->name), debugstr_w(This->name), ppPin);
EnterCriticalSection(&This->filter->csFilter); { @@ -326,7 +326,7 @@ static HRESULT WINAPI pin_ConnectionMediaType(IPin *iface, AM_MEDIA_TYPE *pmt) struct strmbase_pin *This = impl_from_IPin(iface); HRESULT hr;
- TRACE("(%p)->(%p)\n", This, pmt); + TRACE("pin %p %s:%s, pmt %p.\n", This, debugstr_w(This->filter->name), debugstr_w(This->name), pmt);
EnterCriticalSection(&This->filter->csFilter); { @@ -351,7 +351,7 @@ static HRESULT WINAPI pin_QueryPinInfo(IPin *iface, PIN_INFO *info) { struct strmbase_pin *pin = impl_from_IPin(iface);
- TRACE("pin %p, info %p.\n", pin, info); + TRACE("pin %p %s:%s, info %p.\n", pin, debugstr_w(pin->filter->name), debugstr_w(pin->name), info);
info->dir = pin->dir; IBaseFilter_AddRef(info->pFilter = &pin->filter->IBaseFilter_iface); @@ -364,7 +364,7 @@ static HRESULT WINAPI pin_QueryDirection(IPin *iface, PIN_DIRECTION *dir) { struct strmbase_pin *pin = impl_from_IPin(iface);
- TRACE("pin %p, dir %p.\n", pin, dir); + TRACE("pin %p %s:%s, dir %p.\n", pin, debugstr_w(pin->filter->name), debugstr_w(pin->name), dir);
*dir = pin->dir;
@@ -375,7 +375,7 @@ static HRESULT WINAPI pin_QueryId(IPin *iface, WCHAR **id) { struct strmbase_pin *pin = impl_from_IPin(iface);
- TRACE("pin %p, id %p.\n", pin, id); + TRACE("pin %p %s:%s, id %p.\n", pin, debugstr_w(pin->filter->name), debugstr_w(pin->name), id);
if (!(*id = CoTaskMemAlloc((lstrlenW(pin->name) + 1) * sizeof(WCHAR)))) return E_OUTOFMEMORY; @@ -385,14 +385,14 @@ static HRESULT WINAPI pin_QueryId(IPin *iface, WCHAR **id) return S_OK; }
-static HRESULT WINAPI pin_QueryAccept(IPin *iface, const AM_MEDIA_TYPE *pmt) +static HRESULT WINAPI pin_QueryAccept(IPin *iface, const AM_MEDIA_TYPE *mt) { - struct strmbase_pin *This = impl_from_IPin(iface); + struct strmbase_pin *pin = impl_from_IPin(iface);
- TRACE("(%p)->(%p)\n", iface, pmt); - strmbase_dump_media_type(pmt); + TRACE("pin %p %s:%s, mt %p.\n", pin, debugstr_w(pin->filter->name), debugstr_w(pin->name), mt); + strmbase_dump_media_type(mt);
- return (This->pFuncsTable->pin_query_accept(This, pmt) == S_OK ? S_OK : S_FALSE); + return (pin->pFuncsTable->pin_query_accept(pin, mt) == S_OK ? S_OK : S_FALSE); }
static HRESULT WINAPI pin_EnumMediaTypes(IPin *iface, IEnumMediaTypes **enum_media_types) @@ -401,7 +401,8 @@ static HRESULT WINAPI pin_EnumMediaTypes(IPin *iface, IEnumMediaTypes **enum_med AM_MEDIA_TYPE mt; HRESULT hr;
- TRACE("iface %p, enum_media_types %p.\n", iface, enum_media_types); + TRACE("pin %p %s:%s, enum_media_types %p.\n", pin, debugstr_w(pin->filter->name), + debugstr_w(pin->name), enum_media_types);
if (FAILED(hr = pin->pFuncsTable->pin_get_media_type(pin, 0, &mt))) return hr; @@ -411,11 +412,12 @@ static HRESULT WINAPI pin_EnumMediaTypes(IPin *iface, IEnumMediaTypes **enum_med return enum_media_types_create(pin, enum_media_types); }
-static HRESULT WINAPI pin_QueryInternalConnections(IPin *iface, IPin **apPin, ULONG *cPin) +static HRESULT WINAPI pin_QueryInternalConnections(IPin *iface, IPin **pins, ULONG *count) { - struct strmbase_pin *This = impl_from_IPin(iface); + struct strmbase_pin *pin = impl_from_IPin(iface);
- TRACE("(%p)->(%p, %p)\n", This, apPin, cPin); + TRACE("pin %p %s:%s, pins %p, count %p.\n", pin, debugstr_w(pin->filter->name), + debugstr_w(pin->name), pins, count);
return E_NOTIMPL; /* to tell caller that all input pins connected to all output pins */ } @@ -432,7 +434,8 @@ static HRESULT WINAPI source_Connect(IPin *iface, IPin *pReceivePin, const AM_ME HRESULT hr; struct strmbase_source *This = impl_source_from_IPin(iface);
- TRACE("(%p)->(%p, %p)\n", This, pReceivePin, pmt); + TRACE("pin %p %s:%s, peer %p, mt %p.\n", This, debugstr_w(This->pin.filter->name), + debugstr_w(This->pin.name), pReceivePin, pmt); strmbase_dump_media_type(pmt);
if (!pReceivePin) @@ -518,9 +521,13 @@ static HRESULT WINAPI source_Connect(IPin *iface, IPin *pReceivePin, const AM_ME return hr; }
-static HRESULT WINAPI source_ReceiveConnection(IPin *iface, IPin *pin, const AM_MEDIA_TYPE *pmt) +static HRESULT WINAPI source_ReceiveConnection(IPin *iface, IPin *peer, const AM_MEDIA_TYPE *mt) { - ERR("(%p)->(%p, %p) incoming connection on an output pin!\n", iface, pin, pmt); + struct strmbase_source *pin = impl_source_from_IPin(iface); + + WARN("pin %p %s:%s, peer %p, mt %p, unexpected call.\n", pin, + debugstr_w(pin->pin.filter->name), debugstr_w(pin->pin.name), peer, mt); + return E_UNEXPECTED; }
@@ -529,7 +536,7 @@ static HRESULT WINAPI source_Disconnect(IPin *iface) HRESULT hr; struct strmbase_source *This = impl_source_from_IPin(iface);
- TRACE("(%p)->()\n", This); + TRACE("pin %p %s:%s.\n", This, debugstr_w(This->pin.filter->name), debugstr_w(This->pin.name));
EnterCriticalSection(&This->pin.filter->csFilter); { @@ -563,7 +570,9 @@ static HRESULT WINAPI source_Disconnect(IPin *iface)
static HRESULT WINAPI source_EndOfStream(IPin *iface) { - TRACE("(%p)->()\n", iface); + struct strmbase_source *pin = impl_source_from_IPin(iface); + + WARN("pin %p %s:%s, unexpected call.\n", pin, debugstr_w(pin->pin.filter->name), debugstr_w(pin->pin.name));
/* not supposed to do anything in an output pin */
@@ -572,7 +581,9 @@ static HRESULT WINAPI source_EndOfStream(IPin *iface)
static HRESULT WINAPI source_BeginFlush(IPin *iface) { - TRACE("(%p)->()\n", iface); + struct strmbase_source *pin = impl_source_from_IPin(iface); + + WARN("pin %p %s:%s, unexpected call.\n", pin, debugstr_w(pin->pin.filter->name), debugstr_w(pin->pin.name));
/* not supposed to do anything in an output pin */
@@ -581,7 +592,9 @@ static HRESULT WINAPI source_BeginFlush(IPin *iface)
static HRESULT WINAPI source_EndFlush(IPin *iface) { - TRACE("(%p)->()\n", iface); + struct strmbase_source *pin = impl_source_from_IPin(iface); + + WARN("pin %p %s:%s, unexpected call.\n", pin, debugstr_w(pin->pin.filter->name), debugstr_w(pin->pin.name));
/* not supposed to do anything in an output pin */
@@ -590,8 +603,11 @@ static HRESULT WINAPI source_EndFlush(IPin *iface)
static HRESULT WINAPI source_NewSegment(IPin * iface, REFERENCE_TIME start, REFERENCE_TIME stop, double rate) { - TRACE("iface %p, start %s, stop %s, rate %.16e.\n", - iface, debugstr_time(start), debugstr_time(stop), rate); + struct strmbase_source *pin = impl_source_from_IPin(iface); + + TRACE("pin %p %s:%s, start %s, stop %s, rate %.16e.\n", pin, debugstr_w(pin->pin.filter->name), + debugstr_w(pin->pin.name), debugstr_time(start), debugstr_time(stop), rate); + return S_OK; }
@@ -792,9 +808,13 @@ static struct strmbase_sink *impl_sink_from_IPin(IPin *iface) return CONTAINING_RECORD(iface, struct strmbase_sink, pin.IPin_iface); }
-static HRESULT WINAPI sink_Connect(IPin *iface, IPin *pin, const AM_MEDIA_TYPE *pmt) +static HRESULT WINAPI sink_Connect(IPin *iface, IPin *peer, const AM_MEDIA_TYPE *mt) { - ERR("(%p)->(%p, %p) outgoing connection on an input pin!\n", iface, pin, pmt); + struct strmbase_sink *pin = impl_sink_from_IPin(iface); + + WARN("pin %p %s:%s, peer %p, mt %p, unexpected call.\n", pin, debugstr_w(pin->pin.name), + debugstr_w(pin->pin.filter->name), peer, mt); + return E_UNEXPECTED; }
@@ -805,7 +825,8 @@ static HRESULT WINAPI sink_ReceiveConnection(IPin *iface, IPin *pReceivePin, con PIN_DIRECTION pindirReceive; HRESULT hr = S_OK;
- TRACE("(%p)->(%p, %p)\n", This, pReceivePin, pmt); + TRACE("pin %p %s:%s, peer %p, mt %p.\n", This, debugstr_w(This->pin.filter->name), + debugstr_w(This->pin.name), pReceivePin, pmt); strmbase_dump_media_type(pmt);
if (!pmt) @@ -858,7 +879,7 @@ static HRESULT WINAPI sink_Disconnect(IPin *iface) struct strmbase_sink *pin = impl_sink_from_IPin(iface); HRESULT hr;
- TRACE("pin %p.\n", pin); + TRACE("pin %p %s:%s.\n", pin, debugstr_w(pin->pin.filter->name), debugstr_w(pin->pin.name));
EnterCriticalSection(&pin->pin.filter->csFilter);
@@ -891,7 +912,7 @@ static HRESULT WINAPI sink_EndOfStream(IPin *iface) struct strmbase_sink *This = impl_sink_from_IPin(iface); HRESULT hr = S_OK;
- TRACE("(%p)->()\n", This); + TRACE("pin %p %s:%s.\n", This, debugstr_w(This->pin.filter->name), debugstr_w(This->pin.name));
if (This->pFuncsTable->sink_eos) return This->pFuncsTable->sink_eos(This); @@ -916,7 +937,7 @@ static HRESULT WINAPI sink_BeginFlush(IPin *iface) struct strmbase_sink *pin = impl_sink_from_IPin(iface); HRESULT hr;
- TRACE("pin %p.\n", pin); + TRACE("pin %p %s:%s.\n", pin, debugstr_w(pin->pin.filter->name), debugstr_w(pin->pin.name));
EnterCriticalSection(&pin->pin.filter->csFilter);
@@ -942,7 +963,7 @@ static HRESULT WINAPI sink_EndFlush(IPin * iface) struct strmbase_sink *pin = impl_sink_from_IPin(iface); HRESULT hr;
- TRACE("pin %p.\n", pin); + TRACE("pin %p %s:%s.\n", pin, debugstr_w(pin->pin.filter->name), debugstr_w(pin->pin.name));
EnterCriticalSection(&pin->pin.filter->csFilter);
@@ -975,8 +996,8 @@ static HRESULT WINAPI sink_NewSegment(IPin *iface, REFERENCE_TIME start, REFEREN struct strmbase_sink *pin = impl_sink_from_IPin(iface); newsegmentargs args;
- TRACE("iface %p, start %s, stop %s, rate %.16e.\n", - iface, debugstr_time(start), debugstr_time(stop), rate); + TRACE("pin %p %s:%s, start %s, stop %s, rate %.16e.\n", pin, debugstr_w(pin->pin.filter->name), + debugstr_w(pin->pin.name), debugstr_time(start), debugstr_time(stop), rate);
if (pin->pFuncsTable->sink_new_segment) return pin->pFuncsTable->sink_new_segment(pin, start, stop, rate); @@ -1042,7 +1063,8 @@ static HRESULT WINAPI MemInputPin_GetAllocator(IMemInputPin * iface, IMemAllocat { struct strmbase_sink *This = impl_from_IMemInputPin(iface);
- TRACE("(%p/%p)->(%p)\n", This, iface, ppAllocator); + TRACE("pin %p %s:%s, allocator %p.\n", This, debugstr_w(This->pin.filter->name), + debugstr_w(This->pin.name), ppAllocator);
*ppAllocator = This->pAllocator; if (*ppAllocator) @@ -1055,7 +1077,8 @@ static HRESULT WINAPI MemInputPin_NotifyAllocator(IMemInputPin * iface, IMemAllo { struct strmbase_sink *This = impl_from_IMemInputPin(iface);
- TRACE("(%p/%p)->(%p, %d)\n", This, iface, pAllocator, bReadOnly); + TRACE("pin %p %s:%s, allocator %p, read_only %d.\n", This, debugstr_w(This->pin.filter->name), + debugstr_w(This->pin.name), pAllocator, bReadOnly);
if (bReadOnly) FIXME("Read only flag not handled yet!\n"); @@ -1079,36 +1102,35 @@ static HRESULT WINAPI MemInputPin_NotifyAllocator(IMemInputPin * iface, IMemAllo return S_OK; }
-static HRESULT WINAPI MemInputPin_GetAllocatorRequirements(IMemInputPin * iface, ALLOCATOR_PROPERTIES * pProps) +static HRESULT WINAPI MemInputPin_GetAllocatorRequirements(IMemInputPin *iface, ALLOCATOR_PROPERTIES *props) { - struct strmbase_sink *This = impl_from_IMemInputPin(iface); + struct strmbase_sink *pin = impl_from_IMemInputPin(iface);
- TRACE("(%p/%p)->(%p)\n", This, iface, pProps); + TRACE("pin %p %s:%s, props %p.\n", pin, debugstr_w(pin->pin.filter->name), + debugstr_w(pin->pin.name), props);
/* override this method if you have any specific requirements */
return E_NOTIMPL; }
-static HRESULT WINAPI MemInputPin_Receive(IMemInputPin * iface, IMediaSample * pSample) +static HRESULT WINAPI MemInputPin_Receive(IMemInputPin *iface, IMediaSample *sample) { - struct strmbase_sink *This = impl_from_IMemInputPin(iface); + struct strmbase_sink *pin = impl_from_IMemInputPin(iface); HRESULT hr = S_FALSE;
- /* this trace commented out for performance reasons */ - /*TRACE("(%p/%p)->(%p)\n", This, iface, pSample);*/ - if (This->pFuncsTable->pfnReceive) - hr = This->pFuncsTable->pfnReceive(This, pSample); + TRACE("pin %p %s:%s, sample %p.\n", pin, debugstr_w(pin->pin.filter->name), + debugstr_w(pin->pin.name), sample); + + if (pin->pFuncsTable->pfnReceive) + hr = pin->pFuncsTable->pfnReceive(pin, sample); return hr; }
static HRESULT WINAPI MemInputPin_ReceiveMultiple(IMemInputPin * iface, IMediaSample ** pSamples, LONG nSamples, LONG *nSamplesProcessed) { - struct strmbase_sink *This = impl_from_IMemInputPin(iface); HRESULT hr = S_OK;
- TRACE("(%p/%p)->(%p, %d, %p)\n", This, iface, pSamples, nSamples, nSamplesProcessed); - for (*nSamplesProcessed = 0; *nSamplesProcessed < nSamples; (*nSamplesProcessed)++) { hr = IMemInputPin_Receive(iface, pSamples[*nSamplesProcessed]); @@ -1121,9 +1143,9 @@ static HRESULT WINAPI MemInputPin_ReceiveMultiple(IMemInputPin * iface, IMediaSa
static HRESULT WINAPI MemInputPin_ReceiveCanBlock(IMemInputPin * iface) { - struct strmbase_sink *This = impl_from_IMemInputPin(iface); + struct strmbase_sink *pin = impl_from_IMemInputPin(iface);
- TRACE("(%p/%p)->()\n", This, iface); + TRACE("pin %p %s:%s.\n", pin, debugstr_w(pin->pin.filter->name), debugstr_w(pin->pin.name));
return S_OK; }