#undef OPEN_MODULE
+static int vlc_sd_probe_Open( vlc_object_t * );
+
vlc_module_begin ()
set_category( CAT_PLAYLIST )
set_subcategory( SUBCAT_PLAYLIST_SD )
- set_shortname( "Video" )
+ set_shortname( N_("Video") )
set_description( N_("My Videos") )
set_capability( "services_discovery", 10 )
set_callbacks( OpenVideo, Close )
add_shortcut( "video_dir" )
add_submodule ()
- set_shortname( "Audio" )
+ set_shortname( N_("Audio") )
set_description( N_("My Music") )
set_capability( "services_discovery", 10 )
set_callbacks( OpenAudio, Close )
add_shortcut( "audio_dir" )
add_submodule ()
- set_shortname( "Picture")
+ set_shortname( N_("Picture") )
set_description( N_("My Pictures") )
set_capability( "services_discovery", 10 )
set_callbacks( OpenPicture, Close )
add_shortcut( "picture_dir" )
+ VLC_SD_PROBE_SUBMODULE
vlc_module_end ()
enum type_e i_type;
char* psz_dir[2];
- char* psz_var;
+ const char* psz_var;
};
/*****************************************************************************
p_sys->psz_dir[0] = config_GetUserDir( VLC_VIDEOS_DIR );
p_sys->psz_dir[1] = var_CreateGetString( p_sd, "input-record-path" );
- p_sys->psz_var = strdup( "record-file" );
+ p_sys->psz_var = "record-file";
}
else if( p_sys->i_type == Audio )
{
p_sys->psz_dir[0] = config_GetUserDir( VLC_MUSIC_DIR );
p_sys->psz_dir[1] = var_CreateGetString( p_sd, "input-record-path" );
- p_sys->psz_var = strdup( "record-file" );
+ p_sys->psz_var = "record-file";
}
else if( p_sys->i_type == Picture )
{
p_sys->psz_dir[0] = config_GetUserDir( VLC_PICTURES_DIR );
p_sys->psz_dir[1] = var_CreateGetString( p_sd, "snapshot-path" );
- p_sys->psz_var = strdup( "snapshot-file" );
+ p_sys->psz_var = "snapshot-file";
}
else
{
if( vlc_clone( &p_sys->thread, Run, p_sd, VLC_THREAD_PRIORITY_LOW ) )
{
var_DelCallback( p_sd->p_libvlc, p_sys->psz_var, onNewFileAdded, p_sd );
- free( p_sys->psz_var );
free( p_sys->psz_dir[1] );
free( p_sys->psz_dir[0] );
free( p_sys );
var_DelCallback( p_sd->p_libvlc, p_sys->psz_var, onNewFileAdded, p_sd );
- free( p_sys->psz_var );
free( p_sys->psz_dir[1] );
free( p_sys->psz_dir[0] );
free( p_sys );
free( psz_dir );
return i_ret;
}
+
+static int vlc_sd_probe_Open( vlc_object_t *obj )
+{
+ vlc_probe_t *probe = (vlc_probe_t *)obj;
+
+ vlc_sd_probe_Add( probe, "video_dir", N_("My Videos") );
+ vlc_sd_probe_Add( probe, "audio_dir", N_("My Music") );
+ return vlc_sd_probe_Add( probe, "picture_dir", N_("My Pictures") );
+}