[PATCH 4/4] qedit: Build without -DWINE_NO_LONG_TYPES.

Zebediah Figura zfigura at codeweavers.com
Tue Feb 8 20:04:44 CST 2022


Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
 dlls/qedit/Makefile.in     |  1 -
 dlls/qedit/mediadet.c      | 40 ++++++++++++++--------------
 dlls/qedit/samplegrabber.c | 14 ++++++----
 dlls/qedit/timeline.c      | 54 +++++++++++++++++++-------------------
 4 files changed, 56 insertions(+), 53 deletions(-)

diff --git a/dlls/qedit/Makefile.in b/dlls/qedit/Makefile.in
index 7b0eea3c592..f9b6f5c3ed9 100644
--- a/dlls/qedit/Makefile.in
+++ b/dlls/qedit/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
 MODULE    = qedit.dll
 IMPORTS   = strmiids strmbase uuid oleaut32 ole32 advapi32
 
diff --git a/dlls/qedit/mediadet.c b/dlls/qedit/mediadet.c
index cdf2ea8ee5b..ad7ebfba442 100644
--- a/dlls/qedit/mediadet.c
+++ b/dlls/qedit/mediadet.c
@@ -79,7 +79,7 @@ static HRESULT get_filter_info(IMoniker *moniker, GUID *clsid, VARIANT *var)
 
     if (FAILED(hr = IMoniker_BindToStorage(moniker, NULL, NULL, &IID_IPropertyBag, (void **)&prop_bag)))
     {
-        ERR("Failed to get property bag, hr %#x.\n", hr);
+        ERR("Failed to get property bag, hr %#lx.\n", hr);
         return hr;
     }
 
@@ -87,7 +87,7 @@ static HRESULT get_filter_info(IMoniker *moniker, GUID *clsid, VARIANT *var)
     V_VT(var) = VT_BSTR;
     if (FAILED(hr = IPropertyBag_Read(prop_bag, L"CLSID", var, NULL)))
     {
-        ERR("Failed to get CLSID, hr %#x.\n", hr);
+        ERR("Failed to get CLSID, hr %#lx.\n", hr);
         IPropertyBag_Release(prop_bag);
         return hr;
     }
@@ -95,7 +95,7 @@ static HRESULT get_filter_info(IMoniker *moniker, GUID *clsid, VARIANT *var)
     VariantClear(var);
 
     if (FAILED(hr = IPropertyBag_Read(prop_bag, L"FriendlyName", var, NULL)))
-        ERR("Failed to get name, hr %#x.\n", hr);
+        ERR("Failed to get name, hr %#lx.\n", hr);
 
     IPropertyBag_Release(prop_bag);
     return hr;
@@ -135,20 +135,20 @@ static HRESULT find_splitter(MediaDetImpl *detector)
 
     if (FAILED(hr = IBaseFilter_EnumPins(detector->source, &enum_pins)))
     {
-        ERR("Failed to enumerate source pins, hr %#x.\n", hr);
+        ERR("Failed to enumerate source pins, hr %#lx.\n", hr);
         return hr;
     }
     hr = IEnumPins_Next(enum_pins, 1, &source_pin, NULL);
     IEnumPins_Release(enum_pins);
     if (hr != S_OK)
     {
-        ERR("Failed to get source pin, hr %#x.\n", hr);
+        ERR("Failed to get source pin, hr %#lx.\n", hr);
         return hr;
     }
 
     if (FAILED(hr = get_pin_media_type(source_pin, &mt)))
     {
-        ERR("Failed to get media type, hr %#x.\n", hr);
+        ERR("Failed to get media type, hr %#lx.\n", hr);
         IPin_Release(source_pin);
         return hr;
     }
@@ -248,28 +248,28 @@ static HRESULT WINAPI MediaDet_inner_QueryInterface(IUnknown *iface, REFIID riid
 
 static ULONG WINAPI MediaDet_inner_AddRef(IUnknown *iface)
 {
-    MediaDetImpl *This = impl_from_IUnknown(iface);
-    ULONG ref = InterlockedIncrement(&This->ref);
+    MediaDetImpl *detector = impl_from_IUnknown(iface);
+    ULONG refcount = InterlockedIncrement(&detector->ref);
 
-    TRACE("(%p) new ref = %u\n", This, ref);
+    TRACE("%p increasing refcount to %lu.\n", detector, refcount);
 
-    return ref;
+    return refcount;
 }
 
 static ULONG WINAPI MediaDet_inner_Release(IUnknown *iface)
 {
-    MediaDetImpl *This = impl_from_IUnknown(iface);
-    ULONG ref = InterlockedDecrement(&This->ref);
+    MediaDetImpl *detector = impl_from_IUnknown(iface);
+    ULONG refcount = InterlockedIncrement(&detector->ref);
 
-    TRACE("(%p) new ref = %u\n", This, ref);
+    TRACE("%p increasing refcount to %lu.\n", detector, refcount);
 
-    if (ref == 0)
+    if (!refcount)
     {
-        MD_cleanup(This);
-        CoTaskMemFree(This);
+        MD_cleanup(detector);
+        CoTaskMemFree(detector);
     }
 
-    return ref;
+    return refcount;
 }
 
 static const IUnknownVtbl mediadet_vtbl =
@@ -464,7 +464,7 @@ static HRESULT WINAPI MediaDet_put_CurrentStream(IMediaDet* iface, LONG newVal)
     MediaDetImpl *This = impl_from_IMediaDet(iface);
     HRESULT hr;
 
-    TRACE("(%p)->(%d)\n", This, newVal);
+    TRACE("detector %p, index %ld.\n", This, newVal);
 
     if (This->num_streams == -1)
     {
@@ -623,7 +623,7 @@ static HRESULT WINAPI MediaDet_GetBitmapBits(IMediaDet* iface,
                                              LONG Width, LONG Height)
 {
     MediaDetImpl *This = impl_from_IMediaDet(iface);
-    FIXME("(%p)->(%f %p %p %d %d): not implemented!\n", This, StreamTime, pBufferSize, pBuffer,
+    FIXME("(%p)->(%.16e %p %p %ld %ld): not implemented!\n", This, StreamTime, pBufferSize, pBuffer,
           Width, Height);
     return E_NOTIMPL;
 }
@@ -633,7 +633,7 @@ static HRESULT WINAPI MediaDet_WriteBitmapBits(IMediaDet* iface,
                                                LONG Height, BSTR Filename)
 {
     MediaDetImpl *This = impl_from_IMediaDet(iface);
-    FIXME("(%p)->(%f %d %d %p): not implemented!\n", This, StreamTime, Width, Height, Filename);
+    FIXME("(%p)->(%.16e %ld %ld %p): not implemented!\n", This, StreamTime, Width, Height, Filename);
     return E_NOTIMPL;
 }
 
diff --git a/dlls/qedit/samplegrabber.c b/dlls/qedit/samplegrabber.c
index d1b974d3d5d..a89229c4447 100644
--- a/dlls/qedit/samplegrabber.c
+++ b/dlls/qedit/samplegrabber.c
@@ -163,7 +163,7 @@ static void SampleGrabber_callback(struct sample_grabber *This, IMediaSample *sa
 		ref = IMediaSample_Release(sample) + 1 - ref;
 		if (ref)
 		{
-		    ERR("(%p) Callback referenced sample %p by %u\n", This, sample, ref);
+		    ERR("(%p) Callback referenced sample %p by %lu\n", This, sample, ref);
 		    /* ugly as hell but some apps are sooo buggy */
 		    while (ref--)
 			IMediaSample_Release(sample);
@@ -181,7 +181,7 @@ static void SampleGrabber_callback(struct sample_grabber *This, IMediaSample *sa
         case -1:
             break;
         default:
-            FIXME("unsupported method %d\n", This->grabberMethod);
+            FIXME("Unknown method %ld.\n", This->grabberMethod);
             /* do not bother us again */
             This->grabberMethod = -1;
     }
@@ -315,7 +315,9 @@ static HRESULT WINAPI
 SampleGrabber_ISampleGrabber_SetCallback(ISampleGrabber *iface, ISampleGrabberCB *cb, LONG whichMethod)
 {
     struct sample_grabber *This = impl_from_ISampleGrabber(iface);
-    TRACE("(%p)->(%p, %u)\n", This, cb, whichMethod);
+
+    TRACE("filter %p, callback %p, method %ld.\n", This, cb, whichMethod);
+
     if (This->grabberIface)
         ISampleGrabberCB_Release(This->grabberIface);
     This->grabberIface = cb;
@@ -413,7 +415,9 @@ SampleGrabber_IMemInputPin_ReceiveMultiple(IMemInputPin *iface, IMediaSample **s
 {
     struct sample_grabber *This = impl_from_IMemInputPin(iface);
     LONG idx;
-    TRACE("(%p)->(%p, %u, %p) output = %p, grabber = %p\n", This, samples, nSamples, nProcessed, This->source.pMemInputPin, This->grabberIface);
+
+    TRACE("filter %p, samples %p, count %lu, ret_count %p.\n", This, samples, nSamples, nProcessed);
+
     if (!samples || !nProcessed)
         return E_POINTER;
     if ((This->filter.state != State_Running) || (This->oneShot == OneShot_Past))
@@ -615,7 +619,7 @@ static HRESULT WINAPI sample_grabber_source_DecideAllocator(struct strmbase_sour
         if (FAILED(hr = IFilterGraph_QueryInterface(filter->filter.graph,
                 &IID_IFilterGraph2, (void **)&graph)))
         {
-            ERR("Failed to get IFilterGraph2 interface, hr %#x.\n", hr);
+            ERR("Failed to get IFilterGraph2 interface, hr %#lx.\n", hr);
             return hr;
         }
 
diff --git a/dlls/qedit/timeline.c b/dlls/qedit/timeline.c
index 3a4ed5c017e..c084ecc6c2e 100644
--- a/dlls/qedit/timeline.c
+++ b/dlls/qedit/timeline.c
@@ -97,25 +97,25 @@ static HRESULT WINAPI Timeline_QueryInterface(IUnknown *iface, REFIID riid, void
 
 static ULONG WINAPI Timeline_AddRef(IUnknown *iface)
 {
-    TimelineImpl *This = impl_from_IUnknown(iface);
-    ULONG ref = InterlockedIncrement(&This->ref);
+    TimelineImpl *timeline = impl_from_IUnknown(iface);
+    ULONG refcount = InterlockedIncrement(&timeline->ref);
 
-    TRACE("(%p) new ref = %u\n", This, ref);
+    TRACE("%p increasing refcount to %lu.\n", timeline, refcount);
 
-    return ref;
+    return refcount;
 }
 
 static ULONG WINAPI Timeline_Release(IUnknown *iface)
 {
-    TimelineImpl *This = impl_from_IUnknown(iface);
-    ULONG ref = InterlockedDecrement(&This->ref);
+    TimelineImpl *timeline = impl_from_IUnknown(iface);
+    ULONG refcount = InterlockedDecrement(&timeline->ref);
 
-    TRACE("(%p) new ref = %u\n", This, ref);
+    TRACE("%p decreasing refcount to %lu.\n", timeline, refcount);
 
-    if (ref == 0)
-        CoTaskMemFree(This);
+    if (!refcount)
+        CoTaskMemFree(timeline);
 
-    return ref;
+    return refcount;
 }
 
 static const IUnknownVtbl timeline_vtbl =
@@ -201,7 +201,7 @@ static HRESULT WINAPI Timeline_IAMTimeline_RemGroupFromList(IAMTimeline *iface,
 static HRESULT WINAPI Timeline_IAMTimeline_GetGroup(IAMTimeline *iface, IAMTimelineObj **group, LONG index)
 {
     TimelineImpl *This = impl_from_IAMTimeline(iface);
-    FIXME("(%p)->(%p,%d): not implemented!\n", This, group, index);
+    FIXME("(%p)->(%p,%ld): not implemented!\n", This, group, index);
     return E_NOTIMPL;
 }
 
@@ -229,7 +229,7 @@ static HRESULT WINAPI Timeline_IAMTimeline_GetInsertMode(IAMTimeline *iface, LON
 static HRESULT WINAPI Timeline_IAMTimeline_SetInsertMode(IAMTimeline *iface, LONG mode)
 {
     TimelineImpl *This = impl_from_IAMTimeline(iface);
-    FIXME("(%p)->(%d): not implemented!\n", This, mode);
+    FIXME("(%p)->(%ld): not implemented!\n", This, mode);
     return E_NOTIMPL;
 }
 
@@ -317,7 +317,7 @@ static HRESULT WINAPI Timeline_IAMTimeline_GetCountOfType(IAMTimeline *iface, LO
                                                           LONG *value_with_comps, TIMELINE_MAJOR_TYPE type)
 {
     TimelineImpl *This = impl_from_IAMTimeline(iface);
-    FIXME("(%p)->(%d,%p,%p,%04x): not implemented!\n", This, group, value, value_with_comps, type);
+    FIXME("(%p)->(%ld,%p,%p,%#x): not implemented!\n", This, group, value, value_with_comps, type);
     return E_NOTIMPL;
 }
 
@@ -325,7 +325,7 @@ static HRESULT WINAPI Timeline_IAMTimeline_ValidateSourceNames(IAMTimeline *ifac
                                                                LONG_PTR notify_event)
 {
     TimelineImpl *This = impl_from_IAMTimeline(iface);
-    FIXME("(%p)->(%d,%p,%lx): not implemented!\n", This, flags, override, notify_event);
+    FIXME("(%p)->(%ld,%p,%#Ix): not implemented!\n", This, flags, override, notify_event);
     return E_NOTIMPL;
 }
 
@@ -475,25 +475,25 @@ static HRESULT WINAPI TimelineObj_QueryInterface(IAMTimelineObj *iface, REFIID r
 
 static ULONG WINAPI TimelineObj_AddRef(IAMTimelineObj *iface)
 {
-    TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
-    ULONG ref = InterlockedIncrement(&This->ref);
+    TimelineObjImpl *obj = impl_from_IAMTimelineObj(iface);
+    ULONG refcount = InterlockedIncrement(&obj->ref);
 
-    TRACE("(%p) new ref = %u\n", This, ref);
+    TRACE("%p increasing refcount to %lu.\n", obj, refcount);
 
-    return ref;
+    return refcount;
 }
 
 static ULONG WINAPI TimelineObj_Release(IAMTimelineObj *iface)
 {
-    TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
-    ULONG ref = InterlockedDecrement(&This->ref);
+    TimelineObjImpl *obj = impl_from_IAMTimelineObj(iface);
+    ULONG refcount = InterlockedDecrement(&obj->ref);
 
-    TRACE("(%p) new ref = %u\n", This, ref);
+    TRACE("%p decreasing refcount to %lu.\n", obj, refcount);
 
-    if (!ref)
-        CoTaskMemFree(This);
+    if (!refcount)
+        CoTaskMemFree(obj);
 
-    return ref;
+    return refcount;
 }
 
 static HRESULT WINAPI TimelineObj_GetStartStop(IAMTimelineObj *iface, REFERENCE_TIME *start, REFERENCE_TIME *stop)
@@ -629,7 +629,7 @@ static HRESULT WINAPI TimelineObj_GetUserID(IAMTimelineObj *iface, LONG *id)
 static HRESULT WINAPI TimelineObj_SetUserID(IAMTimelineObj *iface, LONG id)
 {
     TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
-    FIXME("(%p)->(%d): not implemented!\n", This, id);
+    FIXME("(%p)->(%ld): not implemented!\n", This, id);
     return E_NOTIMPL;
 }
 
@@ -664,7 +664,7 @@ static HRESULT WINAPI TimelineObj_GetUserData(IAMTimelineObj *iface, BYTE *data,
 static HRESULT WINAPI TimelineObj_SetUserData(IAMTimelineObj *iface, BYTE *data, LONG size)
 {
     TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
-    FIXME("(%p)->(%p,%d): not implemented!\n", This, data, size);
+    FIXME("(%p)->(%p,%ld): not implemented!\n", This, data, size);
     return E_NOTIMPL;
 }
 
@@ -912,7 +912,7 @@ static HRESULT WINAPI timelinegrp_GetPreviewMode(IAMTimelineGroup *iface, BOOL *
 static HRESULT WINAPI timelinegrp_SetMediaTypeForVB(IAMTimelineGroup *iface, LONG type)
 {
     TimelineObjImpl *This = impl_from_IAMTimelineGroup(iface);
-    FIXME("(%p)->(%d)\n", This, type);
+    FIXME("(%p)->(%ld)\n", This, type);
     return E_NOTIMPL;
 }
 
-- 
2.34.1




More information about the wine-devel mailing list