Commit dccd9472 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

vlc_sd_GetNames: add object parameter

parent f2d0e53b
...@@ -56,7 +56,9 @@ struct services_discovery_t ...@@ -56,7 +56,9 @@ struct services_discovery_t
/* Get the services discovery modules names to use in Create(), in a null /* Get the services discovery modules names to use in Create(), in a null
* terminated string array. Array and string must be freed after use. */ * 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 */ /* Creation of a service_discovery object */
VLC_EXPORT( services_discovery_t *, vlc_sd_Create, ( vlc_object_t * ) ); VLC_EXPORT( services_discovery_t *, vlc_sd_Create, ( vlc_object_t * ) );
......
...@@ -419,7 +419,7 @@ ...@@ -419,7 +419,7 @@
o_tc_sortColumn = nil; o_tc_sortColumn = nil;
char ** ppsz_name; char ** ppsz_name;
char ** ppsz_services = vlc_sd_GetNames( &ppsz_name ); char ** ppsz_services = vlc_sd_GetNames( VLCIntf, &ppsz_name );
if( !ppsz_services ) if( !ppsz_services )
{ {
pl_Release( VLCIntf ); pl_Release( VLCIntf );
......
...@@ -255,7 +255,7 @@ void PLSelector::createItems() ...@@ -255,7 +255,7 @@ void PLSelector::createItems()
msrc->setExpanded( true ); msrc->setExpanded( true );
char **ppsz_longnames; char **ppsz_longnames;
char **ppsz_names = vlc_sd_GetNames( &ppsz_longnames ); char **ppsz_names = vlc_sd_GetNames( THEPL, &ppsz_longnames );
if( !ppsz_names ) if( !ppsz_names )
return; return;
......
...@@ -660,7 +660,7 @@ QMenu *QVLCMenu::SDMenu( intf_thread_t *p_intf, QWidget *parent ) ...@@ -660,7 +660,7 @@ QMenu *QVLCMenu::SDMenu( intf_thread_t *p_intf, QWidget *parent )
menu->setTitle( qtr( I_PL_SD ) ); menu->setTitle( qtr( I_PL_SD ) );
char **ppsz_longnames; char **ppsz_longnames;
char **ppsz_names = vlc_sd_GetNames( &ppsz_longnames ); char **ppsz_names = vlc_sd_GetNames( p_intf, &ppsz_longnames );
if( !ppsz_names ) if( !ppsz_names )
return menu; return menu;
......
...@@ -49,8 +49,10 @@ ...@@ -49,8 +49,10 @@
*****************************************************************************/ *****************************************************************************/
static int vlclua_sd_get_services_names( lua_State *L ) static int vlclua_sd_get_services_names( lua_State *L )
{ {
playlist_t *p_playlist = vlclua_get_playlist_internal( L );
char **ppsz_longnames; char **ppsz_longnames;
char **ppsz_names = vlc_sd_GetNames( &ppsz_longnames ); char **ppsz_names = vlc_sd_GetNames( p_playlist, &ppsz_longnames );
vlclua_release_playlist_internal( p_playlist );
if( !ppsz_names ) if( !ppsz_names )
return 0; return 0;
......
...@@ -50,10 +50,12 @@ static void services_discovery_Destructor ( vlc_object_t *p_obj ); ...@@ -50,10 +50,12 @@ static void services_discovery_Destructor ( vlc_object_t *p_obj );
* That's how the playlist get's Service Discovery information * That's how the playlist get's Service Discovery information
*/ */
#undef vlc_sd_GetNames
/** /**
* Gets the list of available services discovery plugins. * Gets the list of available services discovery plugins.
*/ */
char **vlc_sd_GetNames( char ***pppsz_longnames ) char **vlc_sd_GetNames( vlc_object_t *obj, char ***pppsz_longnames )
{ {
return module_GetModulesNamesForCapability( "services_discovery", return module_GetModulesNamesForCapability( "services_discovery",
pppsz_longnames ); pppsz_longnames );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment