Commit e1150b86 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

qcap: Use strmbase_dump_media_type() where appropriate.

parent c4e3f418
...@@ -9,7 +9,6 @@ C_SRCS = \ ...@@ -9,7 +9,6 @@ C_SRCS = \
avimux.c \ avimux.c \
capturegraph.c \ capturegraph.c \
dllfunc.c \ dllfunc.c \
enummedia.c \
enumpins.c \ enumpins.c \
filter.c \ filter.c \
mediatype.c \ mediatype.c \
......
...@@ -325,7 +325,6 @@ static HRESULT WINAPI AVICompressorIn_ReceiveConnection(IPin *iface, ...@@ -325,7 +325,6 @@ static HRESULT WINAPI AVICompressorIn_ReceiveConnection(IPin *iface,
HRESULT hres; HRESULT hres;
TRACE("(%p)->(%p AM_MEDIA_TYPE(%p))\n", This, pConnector, pmt); TRACE("(%p)->(%p AM_MEDIA_TYPE(%p))\n", This, pConnector, pmt);
dump_AM_MEDIA_TYPE(pmt);
hres = BaseInputPinImpl_ReceiveConnection(iface, pConnector, pmt); hres = BaseInputPinImpl_ReceiveConnection(iface, pConnector, pmt);
if(FAILED(hres)) if(FAILED(hres))
...@@ -382,7 +381,6 @@ static HRESULT sink_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYPE ...@@ -382,7 +381,6 @@ static HRESULT sink_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYPE
DWORD res; DWORD res;
TRACE("(%p)->(AM_MEDIA_TYPE(%p))\n", base, pmt); TRACE("(%p)->(AM_MEDIA_TYPE(%p))\n", base, pmt);
dump_AM_MEDIA_TYPE(pmt);
if(!IsEqualIID(&pmt->majortype, &MEDIATYPE_Video)) if(!IsEqualIID(&pmt->majortype, &MEDIATYPE_Video))
return S_FALSE; return S_FALSE;
......
...@@ -1165,7 +1165,6 @@ static HRESULT WINAPI AviMuxOut_AttemptConnection(struct strmbase_source *base, ...@@ -1165,7 +1165,6 @@ static HRESULT WINAPI AviMuxOut_AttemptConnection(struct strmbase_source *base,
HRESULT hr; HRESULT hr;
TRACE("(%p)->(%p AM_MEDIA_TYPE(%p))\n", base, pReceivePin, pmt); TRACE("(%p)->(%p AM_MEDIA_TYPE(%p))\n", base, pReceivePin, pmt);
dump_AM_MEDIA_TYPE(pmt);
hr = IPin_QueryDirection(pReceivePin, &dir); hr = IPin_QueryDirection(pReceivePin, &dir);
if(hr==S_OK && dir!=PINDIR_INPUT) if(hr==S_OK && dir!=PINDIR_INPUT)
...@@ -1260,7 +1259,6 @@ static HRESULT WINAPI AviMuxOut_Connect(IPin *iface, ...@@ -1260,7 +1259,6 @@ static HRESULT WINAPI AviMuxOut_Connect(IPin *iface,
int i; int i;
TRACE("(%p)->(%p AM_MEDIA_TYPE(%p))\n", This, pReceivePin, pmt); TRACE("(%p)->(%p AM_MEDIA_TYPE(%p))\n", This, pReceivePin, pmt);
dump_AM_MEDIA_TYPE(pmt);
hr = BaseOutputPinImpl_Connect(iface, pReceivePin, pmt); hr = BaseOutputPinImpl_Connect(iface, pReceivePin, pmt);
if(FAILED(hr)) if(FAILED(hr))
...@@ -1537,7 +1535,6 @@ static HRESULT WINAPI AviMuxIn_ReceiveConnection(IPin *iface, ...@@ -1537,7 +1535,6 @@ static HRESULT WINAPI AviMuxIn_ReceiveConnection(IPin *iface,
HRESULT hr; HRESULT hr;
TRACE("pin %p, pConnector %p, pmt %p.\n", avimuxin, pConnector, pmt); TRACE("pin %p, pConnector %p, pmt %p.\n", avimuxin, pConnector, pmt);
dump_AM_MEDIA_TYPE(pmt);
if(!pmt) if(!pmt)
return E_POINTER; return E_POINTER;
......
/*
* 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));
}
...@@ -39,6 +39,4 @@ extern IUnknown * WINAPI QCAP_createInfinitePinTeeFilter(IUnknown *pUnkOuter, HR ...@@ -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_createSmartTeeFilter(IUnknown *pUnkOuter, HRESULT *phr) DECLSPEC_HIDDEN;
extern IUnknown * WINAPI QCAP_createAudioInputMixerPropertyPage(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 */ #endif /* _QCAP_MAIN_H_DEFINED */
...@@ -124,7 +124,6 @@ static HRESULT sink_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYPE ...@@ -124,7 +124,6 @@ static HRESULT sink_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYPE
{ {
SmartTeeFilter *This = impl_from_strmbase_pin(base); SmartTeeFilter *This = impl_from_strmbase_pin(base);
TRACE("(%p, AM_MEDIA_TYPE(%p))\n", This, pmt); TRACE("(%p, AM_MEDIA_TYPE(%p))\n", This, pmt);
dump_AM_MEDIA_TYPE(pmt);
if (!pmt) if (!pmt)
return VFW_E_TYPE_NOT_ACCEPTED; return VFW_E_TYPE_NOT_ACCEPTED;
/* We'll take any media type, but the output pins will later /* We'll take any media type, but the output pins will later
......
...@@ -135,7 +135,6 @@ HRESULT qcap_driver_check_format(Capture *device, const AM_MEDIA_TYPE *mt) ...@@ -135,7 +135,6 @@ HRESULT qcap_driver_check_format(Capture *device, const AM_MEDIA_TYPE *mt)
{ {
HRESULT hr; HRESULT hr;
TRACE("device %p, mt %p.\n", device, mt); TRACE("device %p, mt %p.\n", device, mt);
dump_AM_MEDIA_TYPE(mt);
if (!mt) if (!mt)
return E_POINTER; return E_POINTER;
...@@ -251,7 +250,6 @@ HRESULT qcap_driver_get_format(const Capture *capBox, AM_MEDIA_TYPE ** mT) ...@@ -251,7 +250,6 @@ HRESULT qcap_driver_get_format(const Capture *capBox, AM_MEDIA_TYPE ** mT)
vi->bmiHeader.biXPelsPerMeter = 100; vi->bmiHeader.biXPelsPerMeter = 100;
vi->bmiHeader.biYPelsPerMeter = 100; vi->bmiHeader.biYPelsPerMeter = 100;
mT[0]->pbFormat = (void *)vi; mT[0]->pbFormat = (void *)vi;
dump_AM_MEDIA_TYPE(mT[0]);
return S_OK; return S_OK;
} }
......
...@@ -205,7 +205,8 @@ AMStreamConfig_SetFormat(IAMStreamConfig *iface, AM_MEDIA_TYPE *pmt) ...@@ -205,7 +205,8 @@ AMStreamConfig_SetFormat(IAMStreamConfig *iface, AM_MEDIA_TYPE *pmt)
HRESULT hr; HRESULT hr;
VfwCapture *This = impl_from_IAMStreamConfig(iface); 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) if (This->filter.state != State_Stopped)
{ {
...@@ -219,8 +220,6 @@ AMStreamConfig_SetFormat(IAMStreamConfig *iface, AM_MEDIA_TYPE *pmt) ...@@ -219,8 +220,6 @@ AMStreamConfig_SetFormat(IAMStreamConfig *iface, AM_MEDIA_TYPE *pmt)
return E_POINTER; return E_POINTER;
} }
dump_AM_MEDIA_TYPE(pmt);
if (This->source.pin.peer) if (This->source.pin.peer)
{ {
hr = IPin_QueryAccept(This->source.pin.peer, pmt); hr = IPin_QueryAccept(This->source.pin.peer, pmt);
...@@ -244,9 +243,13 @@ static HRESULT WINAPI ...@@ -244,9 +243,13 @@ static HRESULT WINAPI
AMStreamConfig_GetFormat( IAMStreamConfig *iface, AM_MEDIA_TYPE **pmt ) AMStreamConfig_GetFormat( IAMStreamConfig *iface, AM_MEDIA_TYPE **pmt )
{ {
VfwCapture *This = impl_from_IAMStreamConfig(iface); VfwCapture *This = impl_from_IAMStreamConfig(iface);
HRESULT hr;
TRACE("%p -> (%p)\n", iface, pmt); 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 static HRESULT WINAPI
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment