Zebediah Figura : strmbase: Consistently trace the BasePin object.

Alexandre Julliard julliard at winehq.org
Fri May 4 17:10:34 CDT 2018


Module: wine
Branch: master
Commit: c130ec5678fa325fdc00ca804f306860fd809a8f
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=c130ec5678fa325fdc00ca804f306860fd809a8f

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Thu May  3 23:47:14 2018 -0500

strmbase: Consistently trace the BasePin object.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/strmbase/pin.c | 54 ++++++++++++++++++++++++++---------------------------
 1 file changed, 26 insertions(+), 28 deletions(-)

diff --git a/dlls/strmbase/pin.c b/dlls/strmbase/pin.c
index 59a80bd..ef22a57 100644
--- a/dlls/strmbase/pin.c
+++ b/dlls/strmbase/pin.c
@@ -199,7 +199,7 @@ HRESULT WINAPI BasePinImpl_Disconnect(IPin * iface)
     HRESULT hr;
     BasePin *This = impl_from_IPin(iface);
 
-    TRACE("()\n");
+    TRACE("(%p)->()\n", This);
 
     EnterCriticalSection(This->pCritSec);
     {
@@ -224,7 +224,7 @@ HRESULT WINAPI BasePinImpl_ConnectedTo(IPin * iface, IPin ** ppPin)
     HRESULT hr;
     BasePin *This = impl_from_IPin(iface);
 
-    TRACE("(%p)\n", ppPin);
+    TRACE("(%p)->(%p)\n", This, ppPin);
 
     EnterCriticalSection(This->pCritSec);
     {
@@ -250,7 +250,7 @@ HRESULT WINAPI BasePinImpl_ConnectionMediaType(IPin * iface, AM_MEDIA_TYPE * pmt
     HRESULT hr;
     BasePin *This = impl_from_IPin(iface);
 
-    TRACE("(%p/%p)->(%p)\n", This, iface, pmt);
+    TRACE("(%p)->(%p)\n", This, pmt);
 
     EnterCriticalSection(This->pCritSec);
     {
@@ -274,7 +274,7 @@ HRESULT WINAPI BasePinImpl_QueryPinInfo(IPin * iface, PIN_INFO * pInfo)
 {
     BasePin *This = impl_from_IPin(iface);
 
-    TRACE("(%p/%p)->(%p)\n", This, iface, pInfo);
+    TRACE("(%p)->(%p)\n", This, pInfo);
 
     Copy_PinInfo(pInfo, &This->pinInfo);
     IBaseFilter_AddRef(pInfo->pFilter);
@@ -286,7 +286,7 @@ HRESULT WINAPI BasePinImpl_QueryDirection(IPin * iface, PIN_DIRECTION * pPinDir)
 {
     BasePin *This = impl_from_IPin(iface);
 
-    TRACE("(%p/%p)->(%p)\n", This, iface, pPinDir);
+    TRACE("(%p)->(%p)\n", This, pPinDir);
 
     *pPinDir = This->pinInfo.dir;
 
@@ -297,7 +297,7 @@ HRESULT WINAPI BasePinImpl_QueryId(IPin * iface, LPWSTR * Id)
 {
     BasePin *This = impl_from_IPin(iface);
 
-    TRACE("(%p/%p)->(%p)\n", This, iface, Id);
+    TRACE("(%p)->(%p)\n", This, Id);
 
     *Id = CoTaskMemAlloc((strlenW(This->pinInfo.achName) + 1) * sizeof(WCHAR));
     if (!*Id)
@@ -321,7 +321,7 @@ HRESULT WINAPI BasePinImpl_EnumMediaTypes(IPin * iface, IEnumMediaTypes ** ppEnu
 {
     BasePin *This = impl_from_IPin(iface);
 
-    TRACE("(%p/%p)->(%p)\n", This, iface, ppEnum);
+    TRACE("(%p)->(%p)\n", This, ppEnum);
 
     /* override this method to allow enumeration of your types */
 
@@ -332,7 +332,7 @@ HRESULT WINAPI BasePinImpl_QueryInternalConnections(IPin * iface, IPin ** apPin,
 {
     BasePin *This = impl_from_IPin(iface);
 
-    TRACE("(%p/%p)->(%p, %p)\n", This, iface, apPin, cPin);
+    TRACE("(%p)->(%p, %p)\n", This, apPin, cPin);
 
     return E_NOTIMPL; /* to tell caller that all input pins connected to all output pins */
 }
@@ -341,7 +341,7 @@ HRESULT WINAPI BasePinImpl_NewSegment(IPin * iface, REFERENCE_TIME tStart, REFER
 {
     BasePin *This = impl_from_IPin(iface);
 
-    TRACE("(%s, %s, %e)\n", wine_dbgstr_longlong(tStart), wine_dbgstr_longlong(tStop), dRate);
+    TRACE("(%p)->(%s, %s, %e)\n", This, wine_dbgstr_longlong(tStart), wine_dbgstr_longlong(tStop), dRate);
 
     This->tStart = tStart;
     This->tStop = tStop;
@@ -366,7 +366,7 @@ HRESULT WINAPI BaseOutputPinImpl_QueryInterface(IPin * iface, REFIID riid, LPVOI
 {
     BaseOutputPin *This = impl_BaseOutputPin_from_IPin(iface);
 
-    TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppv);
+    TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppv);
 
     *ppv = NULL;
 
@@ -409,7 +409,7 @@ HRESULT WINAPI BaseOutputPinImpl_Connect(IPin * iface, IPin * pReceivePin, const
     HRESULT hr;
     BaseOutputPin *This = impl_BaseOutputPin_from_IPin(iface);
 
-    TRACE("(%p/%p)->(%p, %p)\n", This, iface, pReceivePin, pmt);
+    TRACE("(%p)->(%p, %p)\n", This, pReceivePin, pmt);
     dump_AM_MEDIA_TYPE(pmt);
 
     if (!pReceivePin)
@@ -489,10 +489,9 @@ HRESULT WINAPI BaseOutputPinImpl_Connect(IPin * iface, IPin * pReceivePin, const
     return hr;
 }
 
-HRESULT WINAPI BaseOutputPinImpl_ReceiveConnection(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt)
+HRESULT WINAPI BaseOutputPinImpl_ReceiveConnection(IPin *iface, IPin *pin, const AM_MEDIA_TYPE *pmt)
 {
-    ERR("Incoming connection on an output pin! (%p, %p)\n", pReceivePin, pmt);
-
+    ERR("(%p)->(%p, %p) incoming connection on an output pin!\n", iface, pin, pmt);
     return E_UNEXPECTED;
 }
 
@@ -501,7 +500,7 @@ HRESULT WINAPI BaseOutputPinImpl_Disconnect(IPin * iface)
     HRESULT hr;
     BaseOutputPin *This = impl_BaseOutputPin_from_IPin(iface);
 
-    TRACE("()\n");
+    TRACE("(%p)->()\n", This);
 
     EnterCriticalSection(This->pin.pCritSec);
     {
@@ -528,7 +527,7 @@ HRESULT WINAPI BaseOutputPinImpl_Disconnect(IPin * iface)
 
 HRESULT WINAPI BaseOutputPinImpl_EndOfStream(IPin * iface)
 {
-    TRACE("()\n");
+    TRACE("(%p)->()\n", iface);
 
     /* not supposed to do anything in an output pin */
 
@@ -557,7 +556,7 @@ HRESULT WINAPI BaseOutputPinImpl_GetDeliveryBuffer(BaseOutputPin *This, IMediaSa
 {
     HRESULT hr;
 
-    TRACE("(%p, %p, %p, %x)\n", ppSample, tStart, tStop, dwFlags);
+    TRACE("(%p)->(%p, %p, %p, %x)\n", This, ppSample, tStart, tStop, dwFlags);
 
     if (!This->pin.pConnectedTo)
         hr = VFW_E_NOT_CONNECTED;
@@ -717,7 +716,7 @@ HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(BasePin* iface, IPin * pRecei
     HRESULT hr;
     IMemAllocator * pMemAlloc = NULL;
 
-    TRACE("(%p, %p)\n", pReceivePin, pmt);
+    TRACE("(%p)->(%p, %p)\n", This, pReceivePin, pmt);
     dump_AM_MEDIA_TYPE(pmt);
 
     if ((hr = This->pFuncsTable->base.pfnCheckMediaType(&This->pin, pmt)) != S_OK)
@@ -769,7 +768,7 @@ HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(BasePin* iface, IPin * pRecei
 
 static HRESULT OutputPin_Init(const IPinVtbl *OutputPin_Vtbl, const PIN_INFO * pPinInfo, const BaseOutputPinFuncTable* vtbl,  LPCRITICAL_SECTION pCritSec, BaseOutputPin * pPinImpl)
 {
-    TRACE("\n");
+    TRACE("(%p)\n", pPinImpl);
 
     /* Common attributes */
     pPinImpl->pin.IPin_iface.lpVtbl = OutputPin_Vtbl;
@@ -881,10 +880,9 @@ ULONG WINAPI BaseInputPinImpl_Release(IPin * iface)
     return refCount;
 }
 
-HRESULT WINAPI BaseInputPinImpl_Connect(IPin * iface, IPin * pConnector, const AM_MEDIA_TYPE * pmt)
+HRESULT WINAPI BaseInputPinImpl_Connect(IPin *iface, IPin *pin, const AM_MEDIA_TYPE *pmt)
 {
-    ERR("Outgoing connection on an input pin! (%p, %p)\n", pConnector, pmt);
-
+    ERR("(%p)->(%p, %p) outgoing connection on an input pin!\n", iface, pin, pmt);
     return E_UNEXPECTED;
 }
 
@@ -895,7 +893,7 @@ HRESULT WINAPI BaseInputPinImpl_ReceiveConnection(IPin * iface, IPin * pReceiveP
     PIN_DIRECTION pindirReceive;
     HRESULT hr = S_OK;
 
-    TRACE("(%p, %p)\n", pReceivePin, pmt);
+    TRACE("(%p)->(%p, %p)\n", This, pReceivePin, pmt);
     dump_AM_MEDIA_TYPE(pmt);
 
     EnterCriticalSection(This->pin.pCritSec);
@@ -940,7 +938,7 @@ HRESULT WINAPI BaseInputPinImpl_EndOfStream(IPin * iface)
     HRESULT hr = S_OK;
     BaseInputPin *This = impl_BaseInputPin_from_IPin(iface);
 
-    TRACE("(%p)\n", This);
+    TRACE("(%p)->()\n", This);
 
     EnterCriticalSection(This->pin.pCritSec);
     if (This->flushing)
@@ -963,7 +961,7 @@ HRESULT WINAPI BaseInputPinImpl_BeginFlush(IPin * iface)
 {
     BaseInputPin *This = impl_BaseInputPin_from_IPin(iface);
     HRESULT hr;
-    TRACE("() semi-stub\n");
+    TRACE("(%p) semi-stub\n", This);
 
     EnterCriticalSection(This->pin.pCritSec);
     This->flushing = TRUE;
@@ -983,7 +981,7 @@ HRESULT WINAPI BaseInputPinImpl_EndFlush(IPin * iface)
 {
     BaseInputPin *This = impl_BaseInputPin_from_IPin(iface);
     HRESULT hr;
-    TRACE("(%p)\n", This);
+    TRACE("(%p)->()\n", This);
 
     EnterCriticalSection(This->pin.pCritSec);
     This->flushing = This->end_of_stream = FALSE;
@@ -1011,7 +1009,7 @@ HRESULT WINAPI BaseInputPinImpl_NewSegment(IPin * iface, REFERENCE_TIME tStart,
     BaseInputPin *This = impl_BaseInputPin_from_IPin(iface);
     newsegmentargs args;
 
-    TRACE("(%s, %s, %e)\n", wine_dbgstr_longlong(tStart), wine_dbgstr_longlong(tStop), dRate);
+    TRACE("(%p)->(%s, %s, %e)\n", This, wine_dbgstr_longlong(tStart), wine_dbgstr_longlong(tStop), dRate);
 
     args.tStart = This->pin.tStart = tStart;
     args.tStop = This->pin.tStop = tStop;
@@ -1155,7 +1153,7 @@ static HRESULT InputPin_Init(const IPinVtbl *InputPin_Vtbl, const PIN_INFO * pPi
                              const BaseInputPinFuncTable* vtbl,
                              LPCRITICAL_SECTION pCritSec, IMemAllocator *allocator, BaseInputPin * pPinImpl)
 {
-    TRACE("\n");
+    TRACE("(%p)\n", pPinImpl);
 
     /* Common attributes */
     pPinImpl->pin.refCount = 1;




More information about the wine-cvs mailing list