"properly configured. Use a comma separated list of interface modules. " \
"(common values are: logger, sap, rc, http)")
-vlc_module_begin();
- set_shortname( N_("NT Service"));
- set_description( N_("Windows Service interface") );
- set_category( CAT_INTERFACE );
- set_subcategory( SUBCAT_INTERFACE_CONTROL );
+vlc_module_begin ()
+ set_shortname( N_("NT Service"))
+ set_description( N_("Windows Service interface") )
+ set_category( CAT_INTERFACE )
+ set_subcategory( SUBCAT_INTERFACE_CONTROL )
add_bool( "ntservice-install", 0, NULL,
- INSTALL_TEXT, INSTALL_LONGTEXT, true );
+ INSTALL_TEXT, INSTALL_LONGTEXT, true )
add_bool( "ntservice-uninstall", 0, NULL,
- UNINSTALL_TEXT, UNINSTALL_LONGTEXT, true );
+ UNINSTALL_TEXT, UNINSTALL_LONGTEXT, true )
add_string ( "ntservice-name", VLCSERVICENAME, NULL,
- NAME_TEXT, NAME_LONGTEXT, true );
+ NAME_TEXT, NAME_LONGTEXT, true )
add_string ( "ntservice-options", NULL, NULL,
- OPTIONS_TEXT, OPTIONS_LONGTEXT, true );
+ OPTIONS_TEXT, OPTIONS_LONGTEXT, true )
add_string ( "ntservice-extraintf", NULL, NULL,
- EXTRAINTF_TEXT, EXTRAINTF_LONGTEXT, true );
+ EXTRAINTF_TEXT, EXTRAINTF_LONGTEXT, true )
- set_capability( "interface", 0 );
- set_callbacks( Activate, Close );
-vlc_module_end();
+ set_capability( "interface", 0 )
+ set_callbacks( Activate, Close )
+vlc_module_end ()
struct intf_sys_t
{
{
intf_thread_t *p_intf = (intf_thread_t*)p_this;
- /* Only works on NT/2K/XP */
- if( !IS_WINNT ) return VLC_EGENERIC;
-
p_intf->pf_run = Run;
return VLC_SUCCESS;
}
free( p_intf->p_sys->psz_service );
- /* Stop and destroy the interfaces we spawned */
- while( (p_extraintf = vlc_object_find(p_intf, VLC_OBJECT_INTF, FIND_CHILD)))
- {
- intf_StopThread( p_extraintf );
- vlc_object_detach( p_extraintf );
- vlc_object_release( p_extraintf );
- vlc_object_release( p_extraintf );
- }
-
/* Make sure we exit (In case other interfaces have been spawned) */
- vlc_object_kill( p_intf->p_libvlc );
+ libvlc_Quit( p_intf->p_libvlc );
vlc_restorecancel( canc );
}
*psz_parser = '\0';
psz_parser++;
}
- psz_temp = (char *)malloc( strlen(psz_module) + sizeof(",none") );
- if( psz_temp )
+
+ if( asprintf( &psz_temp, "%s,none", psz_module ) != -1 )
{
intf_thread_t *p_new_intf;
- sprintf( psz_temp, "%s,none", psz_module );
/* Try to create the interface */
p_new_intf = intf_Create( p_intf, psz_temp );