#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+#include <sys/types.h>
#ifdef HAVE_POLL
# include <poll.h>
#endif
#define MIP_LONGTEXT N_( "IP address of " \
"the master client used for the network synchronisation." )
-vlc_module_begin();
- set_shortname( N_("Network Sync"));
- set_description( N_("Network synchronisation") );
- set_category( CAT_ADVANCED );
- set_subcategory( SUBCAT_ADVANCED_MISC );
+vlc_module_begin ()
+ set_shortname( N_("Network Sync"))
+ set_description( N_("Network synchronisation") )
+ set_category( CAT_ADVANCED )
+ set_subcategory( SUBCAT_ADVANCED_MISC )
- add_bool( "netsync-master", 0, NULL,
- NETSYNC_TEXT, NETSYNC_LONGTEXT, true );
+ add_bool( "netsync-master", false, NULL,
+ NETSYNC_TEXT, NETSYNC_LONGTEXT, true )
add_string( "netsync-master-ip", NULL, NULL, MIP_TEXT, MIP_LONGTEXT,
- true );
+ true )
- set_capability( "interface", 0 );
- set_callbacks( Activate, Close );
-vlc_module_end();
+ set_capability( "interface", 0 )
+ set_callbacks( Activate, Close )
+vlc_module_end ()
/*****************************************************************************
* Local prototypes
intf_thread_t *p_intf = (intf_thread_t*)p_this;
int fd;
- if( config_GetInt( p_intf, "netsync-master" ) <= 0 )
+ if( !var_InheritInteger( p_intf, "netsync-master" ) )
{
- char *psz_master = config_GetPsz( p_intf, "netsync-master-ip" );
+ char *psz_master = var_InheritString( p_intf, "netsync-master-ip" );
if( psz_master == NULL )
{
msg_Err( p_intf, "master address not specified" );