static int Open ( vlc_object_t * );
static void Close( vlc_object_t * );
+#define CARD_INDEX_TEXT N_("Input card to use")
+#define CARD_INDEX_LONGTEXT N_( \
+ "SDI capture card to use, if multiple exist. " \
+ "The cards are numbered from 0." )
+
#define MODE_TEXT N_("Desired input video mode")
#define MODE_LONGTEXT N_( \
"Desired input video mode for SDI captures. " \
set_category( CAT_INPUT )
set_subcategory( SUBCAT_INPUT_ACCESS )
+ add_integer( "sdi-card-index", 0, NULL,
+ CARD_INDEX_TEXT, CARD_INDEX_LONGTEXT, true )
add_string( "sdi-mode", "pal ", NULL,
MODE_TEXT, MODE_LONGTEXT, true )
add_integer( "sdi-caching", DEFAULT_PTS_DELAY / 1000, NULL,
}
HRESULT result;
- result = decklink_iterator->Next( &p_sys->p_card );
+
+ int i_card_index = var_CreateGetInteger( p_demux, "sdi-card-index" );
+ for( int i = 0; i <= i_card_index; ++i )
+ {
+ result = decklink_iterator->Next( &p_sys->p_card );
+ if( result != S_OK )
+ break;
+ }
if( result != S_OK )
{
- msg_Err( p_demux, "No DeckLink PCI cards found" );
+ msg_Err( p_demux, "DeckLink PCI card %d not found", i_card_index );
return VLC_EGENERIC;
}
+ const char *psz_model_name;
+ result = p_sys->p_card->GetModelName( &psz_model_name );
+
+ if( result != S_OK )
+ {
+ msg_Err( p_demux, "Could not get model name" );
+ return VLC_EGENERIC;
+ }
+
+ msg_Dbg( p_demux, "Opened DeckLink PCI card %d (%s)", i_card_index, psz_model_name );
+
if( p_sys->p_card->QueryInterface( IID_IDeckLinkInput, (void**)&p_sys->p_input) != S_OK )
{
msg_Err( p_demux, "Card has no inputs" );