[vlc-commits] Deprecate playlist_IsServicesDiscoveryLoaded()

Rémi Denis-Courmont git at videolan.org
Mon Jun 20 18:31:56 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Jun 20 19:25:05 2011 +0300| [89f47d484e0b567c7ca13259d161694e18d67b5f] | committer: Rémi Denis-Courmont

Deprecate playlist_IsServicesDiscoveryLoaded()

With the introduction, initially for LUA SD, of the chain syntax to
the services discovery, there is no way to canonicalize the name of
a services discovery object. Thus, they cannot be compared reliably,
and therefore, playlist_IsServicesDiscoveryLoaded() does not operate
correctly. I won't remove it today because too many interfaces call it.
But you should know that this function does _not_ actually work, and I
see no way to fix it (other than remove LUA SD).

Futhermore, this function is fundamentally prone to a race condition,
when it is used to toggle an SD (this is admittedly a minor problem).

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=89f47d484e0b567c7ca13259d161694e18d67b5f
---

 include/vlc_playlist.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/vlc_playlist.h b/include/vlc_playlist.h
index 96b9e63..16ec6c7 100644
--- a/include/vlc_playlist.h
+++ b/include/vlc_playlist.h
@@ -324,7 +324,7 @@ VLC_API int playlist_ServicesDiscoveryAdd(playlist_t *, const char *);
 /** Remove a services discovery module by name */
 VLC_API int playlist_ServicesDiscoveryRemove(playlist_t *, const char *);
 /** Check whether a given SD is loaded */
-VLC_API bool playlist_IsServicesDiscoveryLoaded( playlist_t *,const char *);
+VLC_API bool playlist_IsServicesDiscoveryLoaded( playlist_t *,const char *) VLC_DEPRECATED;
 /** Query a services discovery */
 VLC_API int playlist_ServicesDiscoveryControl( playlist_t *, const char *, int, ... );
 



More information about the vlc-commits mailing list