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

playlist: move SD loading/unloading to playlist code...

...instead of libvlc.c. Note that this only concerns the playlist SD.
The LibVLC SD were always dealt with separately.
parent f2b9c723
...@@ -452,16 +452,6 @@ dbus_out: ...@@ -452,16 +452,6 @@ dbus_out:
} }
#endif #endif
/* Add service discovery modules */
psz_modules = var_InheritString( p_libvlc, "services-discovery" );
if( psz_modules )
{
char *p = psz_modules, *m;
while( ( m = strsep( &p, " :," ) ) != NULL )
playlist_ServicesDiscoveryAdd( pl_Get(p_libvlc), m );
free( psz_modules );
}
#ifdef ENABLE_VLM #ifdef ENABLE_VLM
/* Initialize VLM if vlm-conf is specified */ /* Initialize VLM if vlm-conf is specified */
psz_parser = var_CreateGetNonEmptyString( p_libvlc, "vlm-conf" ); psz_parser = var_CreateGetNonEmptyString( p_libvlc, "vlm-conf" );
...@@ -587,14 +577,6 @@ dbus_out: ...@@ -587,14 +577,6 @@ dbus_out:
void libvlc_InternalCleanup( libvlc_int_t *p_libvlc ) void libvlc_InternalCleanup( libvlc_int_t *p_libvlc )
{ {
libvlc_priv_t *priv = libvlc_priv (p_libvlc); libvlc_priv_t *priv = libvlc_priv (p_libvlc);
playlist_t *p_playlist = libvlc_priv (p_libvlc)->p_playlist;
/* Remove all services discovery */
if( p_playlist != NULL )
{
msg_Dbg( p_libvlc, "removing all services discovery tasks" );
playlist_ServicesDiscoveryKillAll( p_playlist );
}
/* Ask the interfaces to stop and destroy them */ /* Ask the interfaces to stop and destroy them */
msg_Dbg( p_libvlc, "removing all interfaces" ); msg_Dbg( p_libvlc, "removing all interfaces" );
...@@ -620,6 +602,7 @@ void libvlc_InternalCleanup( libvlc_int_t *p_libvlc ) ...@@ -620,6 +602,7 @@ void libvlc_InternalCleanup( libvlc_int_t *p_libvlc )
#endif #endif
/* Free playlist now, all threads are gone */ /* Free playlist now, all threads are gone */
playlist_t *p_playlist = libvlc_priv (p_libvlc)->p_playlist;
if( p_playlist != NULL ) if( p_playlist != NULL )
playlist_Destroy( p_playlist ); playlist_Destroy( p_playlist );
......
...@@ -304,6 +304,16 @@ static playlist_t *playlist_Create( vlc_object_t *p_parent ) ...@@ -304,6 +304,16 @@ static playlist_t *playlist_Create( vlc_object_t *p_parent )
/* Thread */ /* Thread */
playlist_Activate (p_playlist); playlist_Activate (p_playlist);
/* Add service discovery modules */
char *mods = var_InheritString( p_playlist, "services-discovery" );
if( mods != NULL )
{
char *p = mods, *m;
while( (m = strsep( &p, " :," )) != NULL )
playlist_ServicesDiscoveryAdd( p_playlist, m );
free( mods );
}
return p_playlist; return p_playlist;
} }
...@@ -318,6 +328,9 @@ void playlist_Destroy( playlist_t *p_playlist ) ...@@ -318,6 +328,9 @@ void playlist_Destroy( playlist_t *p_playlist )
{ {
playlist_private_t *p_sys = pl_priv(p_playlist); playlist_private_t *p_sys = pl_priv(p_playlist);
/* Remove all services discovery */
playlist_ServicesDiscoveryKillAll( p_playlist );
msg_Dbg( p_playlist, "destroying" ); msg_Dbg( p_playlist, "destroying" );
playlist_Deactivate( p_playlist ); playlist_Deactivate( p_playlist );
......
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