From 4302a97d17b4caf8946a643bca98096092019f4c Mon Sep 17 00:00:00 2001 From: Gildas Bazin Date: Thu, 28 Oct 2004 11:16:06 +0000 Subject: [PATCH] * modules/access/dshow: some more debug messages. --- modules/access/dshow/dshow.cpp | 13 +++++++++++-- modules/access/dshow/filter.cpp | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/modules/access/dshow/dshow.cpp b/modules/access/dshow/dshow.cpp index ed864d9d91..56abcf0b36 100644 --- a/modules/access/dshow/dshow.cpp +++ b/modules/access/dshow/dshow.cpp @@ -1115,7 +1115,7 @@ static size_t EnumDeviceCaps( vlc_object_t *p_this, IBaseFilter *p_filter, AM_MEDIA_TYPE *p_mt; while( p_enummt->Next( 1, &p_mt, NULL ) == S_OK ) { - int i_current_fourcc = GetFourCCFromMediaType(*p_mt); + int i_current_fourcc = GetFourCCFromMediaType( *p_mt ); if( i_current_fourcc && p_mt->majortype == MEDIATYPE_Video ) { int i_current_width = p_mt->pbFormat ? @@ -1188,6 +1188,10 @@ static size_t EnumDeviceCaps( vlc_object_t *p_this, IBaseFilter *p_filter, } else if( i_current_fourcc && p_mt->majortype == MEDIATYPE_Stream ) { + msg_Dbg( p_this, "EnumDeviceCaps: input pin " + "accepts stream format: %4.4s", + (char *)&i_current_fourcc ); + if( ( !i_fourcc || i_fourcc == i_current_fourcc ) && mt_count < mt_max ) { @@ -1199,7 +1203,12 @@ static size_t EnumDeviceCaps( vlc_object_t *p_this, IBaseFilter *p_filter, } else { - msg_Dbg( p_this, "EnumDeviceCaps: input pin: unknown format" ); + char *psz_type = "unknown"; + if( p_mt->majortype == MEDIATYPE_Video ) psz_type = "video"; + if( p_mt->majortype == MEDIATYPE_Audio ) psz_type = "audio"; + if( p_mt->majortype == MEDIATYPE_Stream ) psz_type = "stream"; + msg_Dbg( p_this, "EnumDeviceCaps: input pin: unknown format " + "(%s %4.4s)", psz_type, (char *)&p_mt->subtype ); FreeMediaType( *p_mt ); } CoTaskMemFree( (PVOID)p_mt ); diff --git a/modules/access/dshow/filter.cpp b/modules/access/dshow/filter.cpp index 81d1fd4c3e..06f284ee61 100644 --- a/modules/access/dshow/filter.cpp +++ b/modules/access/dshow/filter.cpp @@ -219,7 +219,7 @@ int GetFourCCFromMediaType( const AM_MEDIA_TYPE &media_type ) if( media_type.majortype == MEDIATYPE_Video ) { /* currently only support this type of video info format */ - if( media_type.formattype == FORMAT_VideoInfo ) + if( 1 /* media_type.formattype == FORMAT_VideoInfo */ ) { /* Packed RGB formats */ if( media_type.subtype == MEDIASUBTYPE_RGB1 ) -- 2.39.5