"Number of input audio channels for SDI captures. " \
"Must be 2, 8 or 16. 0 disables audio input." )
+#define VIDEO_CONNECTION_TEXT N_("Video connection")
+#define VIDEO_CONNECTION_LONGTEXT N_( \
+ "Video connection to use for SDI captures. " \
+ "Valid choices: sdi, hdmi, opticalsdi, component, " \
+ "composite, svideo. " \
+ "Leave blank for card default." )
+
#define ASPECT_RATIO_TEXT N_("Aspect ratio")
#define ASPECT_RATIO_LONGTEXT N_( \
"Aspect ratio (4:3, 16:9). Default assumes square pixels." )
RATE_TEXT, RATE_LONGTEXT, true )
add_integer( "sdi-audio-channels", 2, NULL,
CHANNELS_TEXT, CHANNELS_LONGTEXT, true )
+ add_string( "sdi-video-connection", 0, NULL,
+ VIDEO_CONNECTION_TEXT, VIDEO_CONNECTION_LONGTEXT, true )
add_string( "sdi-aspect-ratio", NULL, NULL,
ASPECT_RATIO_TEXT, ASPECT_RATIO_LONGTEXT, true )
msg_Err( p_demux, "Failed to get configuration interface" );
return VLC_EGENERIC;
}
+
+ char *psz_tmp = var_CreateGetNonEmptyString( p_demux, "sdi-video-connection" );
+ if( psz_tmp )
+ {
+ BMDVideoConnection conn;
+ if ( !strcmp( psz_tmp, "sdi" ) )
+ conn = bmdVideoConnectionSDI;
+ else if ( !strcmp( psz_tmp, "hdmi" ) )
+ conn = bmdVideoConnectionHDMI;
+ else if ( !strcmp( psz_tmp, "opticalsdi" ) )
+ conn = bmdVideoConnectionOpticalSDI;
+ else if ( !strcmp( psz_tmp, "component" ) )
+ conn = bmdVideoConnectionComponent;
+ else if ( !strcmp( psz_tmp, "composite" ) )
+ conn = bmdVideoConnectionComposite;
+ else if ( !strcmp( psz_tmp, "svideo" ) )
+ conn = bmdVideoConnectionSVideo;
+ else
+ {
+ msg_Err( p_demux, "Invalid --sdi-video-connection specified; choose one of " \
+ "sdi, hdmi, opticalsdi, component, composite, or svideo." );
+ return VLC_EGENERIC;
+ }
+ free( psz_tmp );
+
+ msg_Dbg( p_demux, "Setting video input format to 0x%x", conn);
+ result = p_config->SetVideoInputFormat( conn );
+ if( result != S_OK )
+ {
+ msg_Err( p_demux, "Failed to set video input connection" );
+ return VLC_EGENERIC;
+ }
+ }
- char *psz_tmp = var_CreateGetNonEmptyString( p_demux, "sdi-audio-connection" );
+ psz_tmp = var_CreateGetNonEmptyString( p_demux, "sdi-audio-connection" );
if( psz_tmp )
{
BMDAudioConnection conn;