[vlc-commits] sd: remove generic "longname" parameter
Rémi Denis-Courmont
git at videolan.org
Tue Nov 15 19:02:05 CET 2016
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Nov 15 19:12:35 2016 +0200| [756a8843b825361a6d4f00efd105c136468304ad] | committer: Rémi Denis-Courmont
sd: remove generic "longname" parameter
This removes the longname parameter from the SD configuration chain
generated while probing SD.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=756a8843b825361a6d4f00efd105c136468304ad
---
include/vlc_services_discovery.h | 3 +--
modules/gui/macosx/VLCMainWindow.m | 4 ++--
modules/services_discovery/mediadirs.c | 10 ++++------
modules/services_discovery/udev.c | 10 ++++------
modules/services_discovery/xcb_apps.c | 2 +-
5 files changed, 12 insertions(+), 17 deletions(-)
diff --git a/include/vlc_services_discovery.h b/include/vlc_services_discovery.h
index 938fcb1..8f8a55b 100644
--- a/include/vlc_services_discovery.h
+++ b/include/vlc_services_discovery.h
@@ -193,8 +193,7 @@ VLC_API int vlc_sd_probe_Add(vlc_probe_t *, const char *, const char *, int cate
#define VLC_SD_PROBE_HELPER(name, longname, cat) \
static int vlc_sd_probe_Open (vlc_object_t *obj) \
{ \
- return vlc_sd_probe_Add ((struct vlc_probe_t *)obj, \
- name "{longname=\"" longname "\"}", \
+ return vlc_sd_probe_Add ((struct vlc_probe_t *)obj, name, \
longname, cat); \
}
diff --git a/modules/gui/macosx/VLCMainWindow.m b/modules/gui/macosx/VLCMainWindow.m
index ceebbe7..6b60dc1 100644
--- a/modules/gui/macosx/VLCMainWindow.m
+++ b/modules/gui/macosx/VLCMainWindow.m
@@ -1169,7 +1169,7 @@ static const float f_min_window_height = 307.;
}
// Note the order: first hide the podcast controls, then show the drop zone
- if ([[item identifier] isEqualToString:@"podcast{longname=\"Podcasts\"}"])
+ if ([[item identifier] isEqualToString:@"podcast"])
[self showPodcastControls];
else
[self hidePodcastControls];
@@ -1314,7 +1314,7 @@ static const float f_min_window_height = 307.;
free(psz_urls);
/* update playlist table */
- if (playlist_IsServicesDiscoveryLoaded(p_playlist, "podcast{longname=\"Podcasts\"}")) {
+ if (playlist_IsServicesDiscoveryLoaded(p_playlist, "podcast")) {
[[[VLCMain sharedInstance] playlist] playlistUpdated];
}
}
diff --git a/modules/services_discovery/mediadirs.c b/modules/services_discovery/mediadirs.c
index 5a219ce..9c76b6b 100644
--- a/modules/services_discovery/mediadirs.c
+++ b/modules/services_discovery/mediadirs.c
@@ -351,11 +351,9 @@ 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{longname=\"My Videos\"}",
- N_("My Videos"), SD_CAT_MYCOMPUTER );
- vlc_sd_probe_Add( probe, "audio_dir{longname=\"My Music\"}",
- N_("My Music"), SD_CAT_MYCOMPUTER );
- vlc_sd_probe_Add( probe, "picture_dir{longname=\"My Pictures\"}",
- N_("My Pictures"), SD_CAT_MYCOMPUTER );
+ vlc_sd_probe_Add( probe, "video_dir", N_("My Videos"), SD_CAT_MYCOMPUTER );
+ vlc_sd_probe_Add( probe, "audio_dir", N_("My Music"), SD_CAT_MYCOMPUTER );
+ vlc_sd_probe_Add( probe, "picture_dir", N_("My Pictures"),
+ SD_CAT_MYCOMPUTER );
return VLC_PROBE_CONTINUE;
}
diff --git a/modules/services_discovery/udev.c b/modules/services_discovery/udev.c
index dac9cef..61f3bfc 100644
--- a/modules/services_discovery/udev.c
+++ b/modules/services_discovery/udev.c
@@ -94,15 +94,13 @@ static int vlc_sd_probe_Open (vlc_object_t *obj)
struct udev_monitor *mon = udev_monitor_new_from_netlink (udev, "udev");
if (mon != NULL)
{
- vlc_sd_probe_Add (probe, "v4l{longname=\"Video capture\"}",
- N_("Video capture"), SD_CAT_DEVICES);
+ vlc_sd_probe_Add (probe, "v4l", N_("Video capture"), SD_CAT_DEVICES);
#ifdef HAVE_ALSA
if (!module_exists ("pulselist"))
- vlc_sd_probe_Add (probe, "alsa{longname=\"Audio capture\"}",
- N_("Audio capture"), SD_CAT_DEVICES);
+ vlc_sd_probe_Add (probe, "alsa", N_("Audio capture"),
+ SD_CAT_DEVICES);
#endif
- vlc_sd_probe_Add (probe, "disc{longname=\"Discs\"}", N_("Discs"),
- SD_CAT_DEVICES);
+ vlc_sd_probe_Add (probe, "disc", N_("Discs"), SD_CAT_DEVICES);
udev_monitor_unref (mon);
}
udev_unref (udev);
diff --git a/modules/services_discovery/xcb_apps.c b/modules/services_discovery/xcb_apps.c
index daea789..70b3c42 100644
--- a/modules/services_discovery/xcb_apps.c
+++ b/modules/services_discovery/xcb_apps.c
@@ -82,7 +82,7 @@ static int vlc_sd_probe_Open (vlc_object_t *obj)
if (xcb_connection_has_error (conn))
return VLC_PROBE_CONTINUE;
xcb_disconnect (conn);
- return vlc_sd_probe_Add (probe, "xcb_apps{longname=\"Screen capture\"}",
+ return vlc_sd_probe_Add (probe, "xcb_apps",
N_("Screen capture"), SD_CAT_DEVICES);
}
More information about the vlc-commits
mailing list