/*****************************************************************************
* Module descriptor
*****************************************************************************/
-#define CACHING_TEXT N_("Caching value in ms")
-#define CACHING_LONGTEXT N_( \
- "Allows you to modify the default caching value for sdi capture " \
- "streams. This value should be set in millisecond units." )
#define LINK_TEXT N_("Link #")
#define LINK_LONGTEXT N_( \
"Allows you to set the desired link of the board for the capture (starting at 0)." )
vlc_module_begin()
set_description( N_("SDI Input") )
- set_shortname( N_("sdi") )
+ set_shortname( N_("SDI") )
set_category( CAT_INPUT )
set_subcategory( SUBCAT_INPUT_ACCESS )
- add_integer( "linsys-sdi-caching", DEFAULT_PTS_DELAY / 1000,
- CACHING_TEXT, CACHING_LONGTEXT, true )
add_integer( "linsys-sdi-link", 0,
LINK_TEXT, LINK_LONGTEXT, true )
p_demux->pf_control = Control;
p_sys = p_demux->p_sys;
- /* Update default_pts to a suitable value for sdi access */
- var_Create( p_demux, "linsys-sdi-caching", VLC_VAR_INTEGER|VLC_VAR_DOINHERIT );
-
p_sys->i_link = var_InheritInteger( p_demux, "linsys-sdi-link" );
if( InitCapture( p_demux ) != VLC_SUCCESS )
case DEMUX_GET_PTS_DELAY:
pi64 = (int64_t*)va_arg( args, int64_t * );
- *pi64 = (int64_t)var_GetInteger( p_demux, "linsys-sdi-caching" ) * 1000;
+ *pi64 = INT64_C(1000)
+ * var_InheritInteger( p_demux, "live-caching" );
return VLC_SUCCESS;
/* TODO implement others */
PROT_READ, MAP_SHARED, p_sys->i_fd,
i * i_bufmemsize )) == MAP_FAILED )
{
- msg_Err( p_demux, "couldn't mmap(%d): %s", i, strerror(errno) );
+ msg_Err( p_demux, "couldn't mmap(%d): %m", i );
free( p_sys->pp_buffers );
return VLC_EGENERIC;
}
if ( poll( &pfd, 1, READ_TIMEOUT ) < 0 )
{
- msg_Warn( p_demux, "couldn't poll(): %s", strerror(errno) );
+ msg_Warn( p_demux, "couldn't poll(): %m" );
return VLC_EGENERIC;
}
unsigned int i_val;
if ( ioctl( p_sys->i_fd, SDI_IOC_RXGETEVENTS, &i_val ) < 0 )
- msg_Warn( p_demux, "couldn't SDI_IOC_RXGETEVENTS %s", strerror(errno) );
+ msg_Warn( p_demux, "couldn't SDI_IOC_RXGETEVENTS %m" );
else
{
if ( i_val & SDI_EVENT_RX_BUFFER )
if ( ioctl( p_sys->i_fd, SDI_IOC_DQBUF, p_sys->i_current_buffer ) < 0 )
{
- msg_Warn( p_demux, "couldn't SDI_IOC_DQBUF %s", strerror(errno) );
+ msg_Warn( p_demux, "couldn't SDI_IOC_DQBUF %m" );
return VLC_EGENERIC;
}
if ( ioctl( p_sys->i_fd, SDI_IOC_QBUF, p_sys->i_current_buffer ) < 0 )
{
- msg_Warn( p_demux, "couldn't SDI_IOC_QBUF %s", strerror(errno) );
+ msg_Warn( p_demux, "couldn't SDI_IOC_QBUF %m" );
return VLC_EGENERIC;
}