VLC  3.0.15
Functions | Variables
interface.c File Reference
Include dependency graph for interface.c:

Functions

static int AddIntfCallback (vlc_object_t *, char const *, vlc_value_t, vlc_value_t, void *)
 
int intf_Create (playlist_t *playlist, const char *chain)
 Create and start an interface. More...
 
static playlist_tintf_GetPlaylist (libvlc_int_t *libvlc)
 Creates the playlist if necessary, and return a pointer to it. More...
 
int intf_InsertItem (libvlc_int_t *libvlc, const char *mrl, unsigned optc, const char *const *optv, unsigned flags)
 Inserts an item in the playlist. More...
 
void libvlc_InternalPlay (libvlc_int_t *libvlc)
 
int libvlc_InternalAddIntf (libvlc_int_t *libvlc, const char *name)
 Starts an interface plugin. More...
 
void intf_DestroyAll (libvlc_int_t *libvlc)
 Stops and destroys all interfaces, then the playlist. More...
 

Variables

static vlc_mutex_t lock = PTHREAD_MUTEX_INITIALIZER
 

Detailed Description

This file contains functions related to interface management

Function Documentation

◆ AddIntfCallback()

static int AddIntfCallback ( vlc_object_t obj,
char const *  var,
vlc_value_t  old,
vlc_value_t  cur,
void *  data 
)
static

◆ intf_DestroyAll()

void intf_DestroyAll ( libvlc_int_t libvlc)

◆ intf_GetPlaylist()

static playlist_t* intf_GetPlaylist ( libvlc_int_t libvlc)
static

Creates the playlist if necessary, and return a pointer to it.

Note
The playlist is not reference-counted. So the pointer is only valid until intf_DestroyAll() destroys interfaces.

References libvlc_priv(), lock, libvlc_priv_t::playlist, playlist_Create(), vlc_mutex_lock(), vlc_mutex_unlock(), and VLC_OBJECT.

Referenced by intf_InsertItem(), and libvlc_InternalAddIntf().

◆ intf_InsertItem()

int intf_InsertItem ( libvlc_int_t libvlc,
const char *  mrl,
unsigned  optc,
const char *const *  optv,
unsigned  flags 
)

Inserts an item in the playlist.

This function is used during initialization. Unlike playlist_Add() and variants, it inserts an item to the beginning of the playlist. That is meant to compensate for the reverse parsing order of the command line.

Note
This function may not be called at the same time as intf_DestroyAll().

< No error

References input_item_AddOptions(), input_item_New, input_item_Release(), intf_GetPlaylist(), playlist_t::p_playing, playlist_Lock(), playlist_NodeAddInput(), playlist_Unlock(), unlikely, and VLC_SUCCESS.

Referenced by GetFilenames(), and libvlc_InternalInit().

◆ libvlc_InternalAddIntf()

int libvlc_InternalAddIntf ( libvlc_int_t libvlc,
const char *  name 
)

Starts an interface plugin.

< Not enough memory

< No error

References _, intf_Create(), intf_GetPlaylist(), msg_Err, msg_Info, name, unlikely, var_InheritString, VLC_ENOMEM, and VLC_SUCCESS.

Referenced by libvlc_InternalInit(), and system_ConfigureDbus().

◆ libvlc_InternalPlay()

void libvlc_InternalPlay ( libvlc_int_t libvlc)

Variable Documentation

◆ lock

vlc_mutex_t lock = PTHREAD_MUTEX_INITIALIZER
static