Browse Source

intf: move linked-list head to libvlc_priv_t

For the playlist_t => vlc_playlist_t transition.
pull/85/head
Thomas Guillem 7 years ago
parent
commit
40acc0491a
  1. 8
      src/interface/interface.c
  2. 1
      src/libvlc.c
  3. 1
      src/libvlc.h
  4. 1
      src/playlist_legacy/playlist_internal.h

8
src/interface/interface.c

@ -93,6 +93,7 @@ static int intf_CreateInternal( libvlc_int_t *libvlc, playlist_t *playlist,
if (!playlist)
return VLC_EGENERIC;
}
libvlc_priv_t *priv = libvlc_priv(vlc_object_instance(playlist));
/* Allocate structure */
intf_thread_t *p_intf = vlc_custom_create( playlist, sizeof( *p_intf ),
@ -135,8 +136,8 @@ static int intf_CreateInternal( libvlc_int_t *libvlc, playlist_t *playlist,
}
vlc_mutex_lock( &lock );
p_intf->p_next = pl_priv( playlist )->interface;
pl_priv( playlist )->interface = p_intf;
p_intf->p_next = priv->interface;
priv->interface = p_intf;
vlc_mutex_unlock( &lock );
return VLC_SUCCESS;
@ -309,13 +310,14 @@ int libvlc_InternalAddIntf(libvlc_int_t *libvlc, const char *name)
*/
void intf_DestroyAll(libvlc_int_t *libvlc)
{
libvlc_priv_t *priv = libvlc_priv(libvlc);
playlist_t *playlist;
vlc_mutex_lock(&lock);
playlist = libvlc_priv(libvlc)->playlist;
if (playlist != NULL)
{
intf_thread_t *intf, **pp = &(pl_priv(playlist)->interface);
intf_thread_t *intf, **pp = &priv->interface;
while ((intf = *pp) != NULL)
{

1
src/libvlc.c

@ -94,6 +94,7 @@ libvlc_int_t * libvlc_InternalCreate( void )
return NULL;
priv = libvlc_priv (p_libvlc);
priv->interface = NULL;
priv->playlist = NULL;
priv->main_playlist = NULL;
priv->p_vlm = NULL;

1
src/libvlc.h

@ -186,6 +186,7 @@ typedef struct libvlc_priv_t
vlm_t *p_vlm; ///< the VLM singleton (or NULL)
vlc_dialog_provider *p_dialog_provider; ///< dialog provider
vlc_keystore *p_memory_keystore; ///< memory keystore
struct intf_thread_t *interface; ///< Linked-list of interfaces
struct playlist_t *playlist; ///< Playlist for interfaces
vlc_playlist_t *main_playlist;
struct input_preparser_t *parser; ///< Input item meta data handler

1
src/playlist_legacy/playlist_internal.h

@ -43,7 +43,6 @@ void playlist_ServicesDiscoveryKillAll( playlist_t *p_playlist );
typedef struct playlist_private_t
{
playlist_t public_data;
struct intf_thread_t *interface; /**< Linked-list of interfaces */
void *input_tree; /**< Search tree for input item
to playlist item mapping */

Loading…
Cancel
Save