Zebediah Figura : qcap: Use strmbase_dump_media_type() where appropriate.
Alexandre Julliard
julliard at winehq.org
Mon Oct 7 17:02:15 CDT 2019
Module: wine
Branch: master
Commit: e1150b8632c3195c334dd3914855dec880798aa2
URL: https://source.winehq.org/git/wine.git/?a=commit;h=e1150b8632c3195c334dd3914855dec880798aa2
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Sat Oct 5 19:18:52 2019 -0500
qcap: Use strmbase_dump_media_type() where appropriate.
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/qcap/Makefile.in | 1 -
dlls/qcap/avico.c | 2 --
dlls/qcap/avimux.c | 3 ---
dlls/qcap/enummedia.c | 44 --------------------------------------------
dlls/qcap/qcap_main.h | 2 --
dlls/qcap/smartteefilter.c | 1 -
dlls/qcap/v4l.c | 2 --
dlls/qcap/vfwcapture.c | 11 +++++++----
8 files changed, 7 insertions(+), 59 deletions(-)
diff --git a/dlls/qcap/Makefile.in b/dlls/qcap/Makefile.in
index 12cc9171fb..cb33e07c8d 100644
--- a/dlls/qcap/Makefile.in
+++ b/dlls/qcap/Makefile.in
@@ -9,7 +9,6 @@ C_SRCS = \
avimux.c \
capturegraph.c \
dllfunc.c \
- enummedia.c \
enumpins.c \
filter.c \
mediatype.c \
diff --git a/dlls/qcap/avico.c b/dlls/qcap/avico.c
index ea98b2a655..95e51f6e63 100644
--- a/dlls/qcap/avico.c
+++ b/dlls/qcap/avico.c
@@ -325,7 +325,6 @@ static HRESULT WINAPI AVICompressorIn_ReceiveConnection(IPin *iface,
HRESULT hres;
TRACE("(%p)->(%p AM_MEDIA_TYPE(%p))\n", This, pConnector, pmt);
- dump_AM_MEDIA_TYPE(pmt);
hres = BaseInputPinImpl_ReceiveConnection(iface, pConnector, pmt);
if(FAILED(hres))
@@ -382,7 +381,6 @@ static HRESULT sink_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYPE
DWORD res;
TRACE("(%p)->(AM_MEDIA_TYPE(%p))\n", base, pmt);
- dump_AM_MEDIA_TYPE(pmt);
if(!IsEqualIID(&pmt->majortype, &MEDIATYPE_Video))
return S_FALSE;
diff --git a/dlls/qcap/avimux.c b/dlls/qcap/avimux.c
index 596016cf77..8f7fe13285 100644
--- a/dlls/qcap/avimux.c
+++ b/dlls/qcap/avimux.c
@@ -1165,7 +1165,6 @@ static HRESULT WINAPI AviMuxOut_AttemptConnection(struct strmbase_source *base,
HRESULT hr;
TRACE("(%p)->(%p AM_MEDIA_TYPE(%p))\n", base, pReceivePin, pmt);
- dump_AM_MEDIA_TYPE(pmt);
hr = IPin_QueryDirection(pReceivePin, &dir);
if(hr==S_OK && dir!=PINDIR_INPUT)
@@ -1260,7 +1259,6 @@ static HRESULT WINAPI AviMuxOut_Connect(IPin *iface,
int i;
TRACE("(%p)->(%p AM_MEDIA_TYPE(%p))\n", This, pReceivePin, pmt);
- dump_AM_MEDIA_TYPE(pmt);
hr = BaseOutputPinImpl_Connect(iface, pReceivePin, pmt);
if(FAILED(hr))
@@ -1537,7 +1535,6 @@ static HRESULT WINAPI AviMuxIn_ReceiveConnection(IPin *iface,
HRESULT hr;
TRACE("pin %p, pConnector %p, pmt %p.\n", avimuxin, pConnector, pmt);
- dump_AM_MEDIA_TYPE(pmt);
if(!pmt)
return E_POINTER;
diff --git a/dlls/qcap/enummedia.c b/dlls/qcap/enummedia.c
deleted file mode 100644
index 45552e16a4..0000000000
--- a/dlls/qcap/enummedia.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Implementation of IEnumMediaTypes Interface
- *
- * Copyright 2003 Robert Shearman
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-#include <stdarg.h>
-
-#define COBJMACROS
-
-#include "windef.h"
-#include "winbase.h"
-#include "wtypes.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "dshow.h"
-
-#include "qcap_main.h"
-
-#include "wine/debug.h"
-
-WINE_DEFAULT_DEBUG_CHANNEL(qcap);
-
-void dump_AM_MEDIA_TYPE(const AM_MEDIA_TYPE * pmt)
-{
- if (!pmt)
- return;
- TRACE("\t%s\n\t%s\n\t...\n\t%s\n", debugstr_guid(&pmt->majortype),
- debugstr_guid(&pmt->subtype), debugstr_guid(&pmt->formattype));
-}
diff --git a/dlls/qcap/qcap_main.h b/dlls/qcap/qcap_main.h
index 0e767bd08c..ab02dbb9ab 100644
--- a/dlls/qcap/qcap_main.h
+++ b/dlls/qcap/qcap_main.h
@@ -39,6 +39,4 @@ extern IUnknown * WINAPI QCAP_createInfinitePinTeeFilter(IUnknown *pUnkOuter, HR
extern IUnknown * WINAPI QCAP_createSmartTeeFilter(IUnknown *pUnkOuter, HRESULT *phr) DECLSPEC_HIDDEN;
extern IUnknown * WINAPI QCAP_createAudioInputMixerPropertyPage(IUnknown *pUnkOuter, HRESULT *phr) DECLSPEC_HIDDEN;
-void dump_AM_MEDIA_TYPE(const AM_MEDIA_TYPE * pmt) DECLSPEC_HIDDEN;
-
#endif /* _QCAP_MAIN_H_DEFINED */
diff --git a/dlls/qcap/smartteefilter.c b/dlls/qcap/smartteefilter.c
index 26f3255967..a4d0a435ef 100644
--- a/dlls/qcap/smartteefilter.c
+++ b/dlls/qcap/smartteefilter.c
@@ -124,7 +124,6 @@ static HRESULT sink_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYPE
{
SmartTeeFilter *This = impl_from_strmbase_pin(base);
TRACE("(%p, AM_MEDIA_TYPE(%p))\n", This, pmt);
- dump_AM_MEDIA_TYPE(pmt);
if (!pmt)
return VFW_E_TYPE_NOT_ACCEPTED;
/* We'll take any media type, but the output pins will later
diff --git a/dlls/qcap/v4l.c b/dlls/qcap/v4l.c
index c9102accb8..cdab38052b 100644
--- a/dlls/qcap/v4l.c
+++ b/dlls/qcap/v4l.c
@@ -135,7 +135,6 @@ HRESULT qcap_driver_check_format(Capture *device, const AM_MEDIA_TYPE *mt)
{
HRESULT hr;
TRACE("device %p, mt %p.\n", device, mt);
- dump_AM_MEDIA_TYPE(mt);
if (!mt)
return E_POINTER;
@@ -251,7 +250,6 @@ HRESULT qcap_driver_get_format(const Capture *capBox, AM_MEDIA_TYPE ** mT)
vi->bmiHeader.biXPelsPerMeter = 100;
vi->bmiHeader.biYPelsPerMeter = 100;
mT[0]->pbFormat = (void *)vi;
- dump_AM_MEDIA_TYPE(mT[0]);
return S_OK;
}
diff --git a/dlls/qcap/vfwcapture.c b/dlls/qcap/vfwcapture.c
index 6fbe721a31..0be0914836 100644
--- a/dlls/qcap/vfwcapture.c
+++ b/dlls/qcap/vfwcapture.c
@@ -205,7 +205,8 @@ AMStreamConfig_SetFormat(IAMStreamConfig *iface, AM_MEDIA_TYPE *pmt)
HRESULT hr;
VfwCapture *This = impl_from_IAMStreamConfig(iface);
- TRACE("(%p): %p->%p\n", iface, pmt, pmt ? pmt->pbFormat : NULL);
+ TRACE("filter %p, mt %p.\n", This, pmt);
+ strmbase_dump_media_type(pmt);
if (This->filter.state != State_Stopped)
{
@@ -219,8 +220,6 @@ AMStreamConfig_SetFormat(IAMStreamConfig *iface, AM_MEDIA_TYPE *pmt)
return E_POINTER;
}
- dump_AM_MEDIA_TYPE(pmt);
-
if (This->source.pin.peer)
{
hr = IPin_QueryAccept(This->source.pin.peer, pmt);
@@ -244,9 +243,13 @@ static HRESULT WINAPI
AMStreamConfig_GetFormat( IAMStreamConfig *iface, AM_MEDIA_TYPE **pmt )
{
VfwCapture *This = impl_from_IAMStreamConfig(iface);
+ HRESULT hr;
TRACE("%p -> (%p)\n", iface, pmt);
- return qcap_driver_get_format(This->driver_info, pmt);
+ hr = qcap_driver_get_format(This->driver_info, pmt);
+ if (SUCCEEDED(hr))
+ strmbase_dump_media_type(*pmt);
+ return hr;
}
static HRESULT WINAPI
More information about the wine-cvs
mailing list