]> git.sesse.net Git - vlc/blobdiff - include/vlc_services_discovery.h
wma_fixed: raise priority above avcodec float decoder
[vlc] / include / vlc_services_discovery.h
index d647b61543c515f125304d7ef3a57a20187d90e2..7094defa2b1966fbae665f286658e5c47e3868d0 100644 (file)
 #ifndef VLC_SERVICES_DISCOVERY_H_
 #define VLC_SERVICES_DISCOVERY_H_
 
+#include <vlc_input.h>
+#include <vlc_events.h>
+#include <vlc_probe.h>
+
 /**
  * \file
  * This file functions and structures for service discovery in vlc
@@ -37,9 +41,6 @@ extern "C" {
  * @{
  */
 
-#include <vlc_input.h>
-#include <vlc_events.h>
-
 struct services_discovery_t
 {
     VLC_COMMON_MEMBERS
@@ -56,7 +57,9 @@ struct services_discovery_t
 
 /* Get the services discovery modules names to use in Create(), in a null
  * terminated string array. Array and string must be freed after use. */
-VLC_EXPORT( char **, vlc_sd_GetNames, ( char ***pppsz_longnames ) );
+VLC_EXPORT( char **, vlc_sd_GetNames, ( vlc_object_t *, char *** ) );
+#define vlc_sd_GetNames(obj, pln) \
+        vlc_sd_GetNames(VLC_OBJECT(obj), pln)
 
 /* Creation of a service_discovery object */
 VLC_EXPORT( services_discovery_t *, vlc_sd_Create, ( vlc_object_t * ) );
@@ -86,6 +89,22 @@ VLC_EXPORT( vlc_event_manager_t *,  services_discovery_EventManager, ( services_
 VLC_EXPORT( void,                   services_discovery_AddItem, ( services_discovery_t * p_this, input_item_t * p_item, const char * psz_category ) );
 VLC_EXPORT( void,                   services_discovery_RemoveItem, ( services_discovery_t * p_this, input_item_t * p_item ) );
 
+
+/* SD probing */
+
+VLC_EXPORT(int, vlc_sd_probe_Add, (vlc_probe_t *, const char *, const char *));
+
+#define VLC_SD_PROBE_SUBMODULE \
+    add_submodule() \
+        set_capability( "services probe", 100 ) \
+        set_callbacks( vlc_sd_probe_Open, NULL )
+
+#define VLC_SD_PROBE_HELPER(name, longname) \
+static int vlc_sd_probe_Open (vlc_object_t *obj) \
+{ \
+    return vlc_sd_probe_Add ((struct vlc_probe_t *)obj, name, longname); \
+}
+
 /** @} */
 # ifdef __cplusplus
 }