+
+ 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." );
+ p_config->Release();
+ free( psz_tmp );
+ Close( p_this );
+ 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" );
+ p_config->Release();
+ Close( p_this );
+ return VLC_EGENERIC;
+ }
+ }
+
+ psz_tmp = var_CreateGetNonEmptyString( p_demux, "sdi-audio-connection" );
+ if( psz_tmp )
+ {
+ BMDAudioConnection conn;
+ if ( !strcmp( psz_tmp, "embedded" ) )
+ conn = bmdAudioConnectionEmbedded;
+ else if ( !strcmp( psz_tmp, "aesebu" ) )
+ conn = bmdAudioConnectionAESEBU;
+ else if ( !strcmp( psz_tmp, "analog" ) )
+ conn = bmdAudioConnectionAnalog;
+ else
+ {
+ msg_Err( p_demux, "Invalid --sdi-audio-connection specified; choose one of " \
+ "embedded, aesebu, or analog." );
+ free( psz_tmp );
+ p_config->Release();
+ Close( p_this );
+ return VLC_EGENERIC;
+ }
+ free( psz_tmp );
+
+ msg_Dbg( p_demux, "Setting audio input format to 0x%x", conn);
+ result = p_config->SetAudioInputFormat( conn );
+ if( result != S_OK )
+ {
+ msg_Err( p_demux, "Failed to set audio input connection" );
+ p_config->Release();
+ Close( p_this );
+ return VLC_EGENERIC;
+ }
+ }
+
+ p_config->Release();
+
+ /* Get the list of display modes. */