[vlc-devel] commit: mediadirs: dummy probing support ( Rémi Denis-Courmont )
git version control
git at videolan.org
Tue Dec 22 10:44:58 CET 2009
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Dec 22 11:44:18 2009 +0200| [220742efe219472d937cdda92b8c5062f04ddfcd] | committer: Rémi Denis-Courmont
mediadirs: dummy probing support
Maybe we should check the directories do exist first?
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=220742efe219472d937cdda92b8c5062f04ddfcd
---
modules/services_discovery/mediadirs.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/modules/services_discovery/mediadirs.c b/modules/services_discovery/mediadirs.c
index bfecfd7..1dd4ce8 100644
--- a/modules/services_discovery/mediadirs.c
+++ b/modules/services_discovery/mediadirs.c
@@ -61,6 +61,8 @@ OPEN_MODULE( Picture )
#undef OPEN_MODULE
+static int vlc_sd_probe_Open( vlc_object_t * );
+
vlc_module_begin ()
set_category( CAT_PLAYLIST )
set_subcategory( SUBCAT_PLAYLIST_SD )
@@ -85,6 +87,7 @@ vlc_module_begin ()
set_callbacks( OpenPicture, Close )
add_shortcut( "picture_dir" )
+ VLC_SD_PROBE_SUBMODULE
vlc_module_end ()
@@ -347,3 +350,12 @@ enum type_e fileType( services_discovery_t *p_sd, const char* psz_file )
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") );
+}
More information about the vlc-devel
mailing list