Commit 576844b2 authored by basos g's avatar basos g Committed by Jean-Baptiste Kempf

FIX: DSHOW "none" device open (#2201). Some cleaning

-Fix dshow "none" deivice be recognized as none
 Note that another patch concerning var_optionParse string
 dequoting should be applied for this to be fixed
 ( the concept is not to provide quoted strings to dshow options )
 -Account for the case when BOTH devices could not be opened
   (file an error, instead of seeming to play)
 -Cleaned a little
 -Added dbg and error msgs
 -Added coments

Rev 3
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent ab33b304
...@@ -39,6 +39,41 @@ ...@@ -39,6 +39,41 @@
#include "common.h" #include "common.h"
// Helper function to associate a crossbar pin name with the type.
static const char * GetPhysicalPinName(long lType)
{
switch (lType)
{
case PhysConn_Video_Tuner: return "Video Tuner";
case PhysConn_Video_Composite: return "Video Composite";
case PhysConn_Video_SVideo: return "S-Video";
case PhysConn_Video_RGB: return "Video RGB";
case PhysConn_Video_YRYBY: return "Video YRYBY";
case PhysConn_Video_SerialDigital: return "Video Serial Digital";
case PhysConn_Video_ParallelDigital: return "Video Parallel Digital";
case PhysConn_Video_SCSI: return "Video SCSI";
case PhysConn_Video_AUX: return "Video AUX";
case PhysConn_Video_1394: return "Video 1394";
case PhysConn_Video_USB: return "Video USB";
case PhysConn_Video_VideoDecoder: return "Video Decoder";
case PhysConn_Video_VideoEncoder: return "Video Encoder";
case PhysConn_Audio_Tuner: return "Audio Tuner";
case PhysConn_Audio_Line: return "Audio Line";
case PhysConn_Audio_Mic: return "Audio Microphone";
case PhysConn_Audio_AESDigital: return "Audio AES/EBU Digital";
case PhysConn_Audio_SPDIFDigital: return "Audio S/PDIF";
case PhysConn_Audio_SCSI: return "Audio SCSI";
case PhysConn_Audio_AUX: return "Audio AUX";
case PhysConn_Audio_1394: return "Audio 1394";
case PhysConn_Audio_USB: return "Audio USB";
case PhysConn_Audio_AudioDecoder: return "Audio Decoder";
default: return "Unknown Type";
}
}
/***************************************************************************** /*****************************************************************************
* DeleteCrossbarRoutes * DeleteCrossbarRoutes
*****************************************************************************/ *****************************************************************************/
...@@ -208,9 +243,9 @@ HRESULT FindCrossbarRoutes( vlc_object_t *p_this, access_sys_t *p_sys, ...@@ -208,9 +243,9 @@ HRESULT FindCrossbarRoutes( vlc_object_t *p_this, access_sys_t *p_sys,
// remember connector type // remember connector type
physicalType = inputPinPhysicalType; physicalType = inputPinPhysicalType;
msg_Dbg( p_this, "found existing route for output %ld (type %ld) to input %ld (type %ld)", msg_Dbg( p_this, "found existing route for output %ld (type %s) to input %ld (type %s)",
outputPinIndex, outputPinPhysicalType, inputPinIndex, outputPinIndex, GetPhysicalPinName( outputPinPhysicalType ),
inputPinPhysicalType ); inputPinIndex, GetPhysicalPinName( inputPinPhysicalType ) );
// fall through to for loop, note 'inputPinIndex' is set to the pin we are looking for // fall through to for loop, note 'inputPinIndex' is set to the pin we are looking for
// hence, loop iteration should not wind back // hence, loop iteration should not wind back
...@@ -260,9 +295,9 @@ HRESULT FindCrossbarRoutes( vlc_object_t *p_this, access_sys_t *p_sys, ...@@ -260,9 +295,9 @@ HRESULT FindCrossbarRoutes( vlc_object_t *p_this, access_sys_t *p_sys,
p_sys->crossbar_routes[depth].AudioOutputIndex = outputPinIndexRelated; p_sys->crossbar_routes[depth].AudioOutputIndex = outputPinIndexRelated;
msg_Dbg( p_this, "crossbar at depth %d, found route for " msg_Dbg( p_this, "crossbar at depth %d, found route for "
"output %ld (type %ld) to input %ld (type %ld)", depth, "output %ld (type %s) to input %ld (type %s)", depth,
outputPinIndex, outputPinPhysicalType, inputPinIndex, outputPinIndex, GetPhysicalPinName( outputPinPhysicalType ),
inputPinPhysicalType ); inputPinIndex, GetPhysicalPinName( inputPinPhysicalType ) );
result = S_OK; result = S_OK;
} }
......
This diff is collapsed.
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