VLC  3.0.0-git
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
LibVLC VLM
LibVLC
Collaboration diagram for LibVLC VLM:

Functions

LIBVLC_API void libvlc_vlm_release (libvlc_instance_t *p_instance)
 Release the vlm instance related to the given libvlc_instance_t.
LIBVLC_API int libvlc_vlm_add_broadcast (libvlc_instance_t *p_instance, const char *psz_name, const char *psz_input, const char *psz_output, int i_options, const char *const *ppsz_options, int b_enabled, int b_loop)
 Add a broadcast, with one input.
LIBVLC_API int libvlc_vlm_add_vod (libvlc_instance_t *p_instance, const char *psz_name, const char *psz_input, int i_options, const char *const *ppsz_options, int b_enabled, const char *psz_mux)
 Add a vod, with one input.
LIBVLC_API int libvlc_vlm_del_media (libvlc_instance_t *p_instance, const char *psz_name)
 Delete a media (VOD or broadcast).
LIBVLC_API int libvlc_vlm_set_enabled (libvlc_instance_t *p_instance, const char *psz_name, int b_enabled)
 Enable or disable a media (VOD or broadcast).
LIBVLC_API int libvlc_vlm_set_output (libvlc_instance_t *p_instance, const char *psz_name, const char *psz_output)
 Set the output for a media.
LIBVLC_API int libvlc_vlm_set_input (libvlc_instance_t *p_instance, const char *psz_name, const char *psz_input)
 Set a media's input MRL.
LIBVLC_API int libvlc_vlm_add_input (libvlc_instance_t *p_instance, const char *psz_name, const char *psz_input)
 Add a media's input MRL.
LIBVLC_API int libvlc_vlm_set_loop (libvlc_instance_t *p_instance, const char *psz_name, int b_loop)
 Set a media's loop status.
LIBVLC_API int libvlc_vlm_set_mux (libvlc_instance_t *p_instance, const char *psz_name, const char *psz_mux)
 Set a media's vod muxer.
LIBVLC_API int libvlc_vlm_change_media (libvlc_instance_t *p_instance, const char *psz_name, const char *psz_input, const char *psz_output, int i_options, const char *const *ppsz_options, int b_enabled, int b_loop)
 Edit the parameters of a media.
LIBVLC_API int libvlc_vlm_play_media (libvlc_instance_t *p_instance, const char *psz_name)
 Play the named broadcast.
LIBVLC_API int libvlc_vlm_stop_media (libvlc_instance_t *p_instance, const char *psz_name)
 Stop the named broadcast.
LIBVLC_API int libvlc_vlm_pause_media (libvlc_instance_t *p_instance, const char *psz_name)
 Pause the named broadcast.
LIBVLC_API int libvlc_vlm_seek_media (libvlc_instance_t *p_instance, const char *psz_name, float f_percentage)
 Seek in the named broadcast.
LIBVLC_API const char * libvlc_vlm_show_media (libvlc_instance_t *p_instance, const char *psz_name)
 Return information about the named media as a JSON string representation.
LIBVLC_API float libvlc_vlm_get_media_instance_position (libvlc_instance_t *p_instance, const char *psz_name, int i_instance)
 Get vlm_media instance position by name or instance id.
LIBVLC_API int libvlc_vlm_get_media_instance_time (libvlc_instance_t *p_instance, const char *psz_name, int i_instance)
 Get vlm_media instance time by name or instance id.
LIBVLC_API int libvlc_vlm_get_media_instance_length (libvlc_instance_t *p_instance, const char *psz_name, int i_instance)
 Get vlm_media instance length by name or instance id.
LIBVLC_API int libvlc_vlm_get_media_instance_rate (libvlc_instance_t *p_instance, const char *psz_name, int i_instance)
 Get vlm_media instance playback rate by name or instance id.
LIBVLC_API libvlc_event_manager_tlibvlc_vlm_get_event_manager (libvlc_instance_t *p_instance)
 Get libvlc_event_manager from a vlm media.

Detailed Description

Function Documentation

LIBVLC_API int libvlc_vlm_add_broadcast ( libvlc_instance_t p_instance,
const char *  psz_name,
const char *  psz_input,
const char *  psz_output,
int  i_options,
const char *const *  ppsz_options,
int  b_enabled,
int  b_loop 
)

Add a broadcast, with one input.

Parameters
p_instancethe instance
psz_namethe name of the new broadcast
psz_inputthe input MRL
psz_outputthe output MRL (the parameter to the "sout" variable)
i_optionsnumber of additional options
ppsz_optionsadditional options
b_enabledboolean for enabling the new broadcast
b_loopShould this broadcast be played in loop ?
Returns
0 on success, -1 on error
LIBVLC_API int libvlc_vlm_add_input ( libvlc_instance_t p_instance,
const char *  psz_name,
const char *  psz_input 
)

Add a media's input MRL.

This will add the specified one.

Parameters
p_instancethe instance
psz_namethe media to work on
psz_inputthe input MRL
Returns
0 on success, -1 on error
LIBVLC_API int libvlc_vlm_add_vod ( libvlc_instance_t p_instance,
const char *  psz_name,
const char *  psz_input,
int  i_options,
const char *const *  ppsz_options,
int  b_enabled,
const char *  psz_mux 
)

Add a vod, with one input.

Parameters
p_instancethe instance
psz_namethe name of the new vod media
psz_inputthe input MRL
i_optionsnumber of additional options
ppsz_optionsadditional options
b_enabledboolean for enabling the new vod
psz_muxthe muxer of the vod media
Returns
0 on success, -1 on error
LIBVLC_API int libvlc_vlm_change_media ( libvlc_instance_t p_instance,
const char *  psz_name,
const char *  psz_input,
const char *  psz_output,
int  i_options,
const char *const *  ppsz_options,
int  b_enabled,
int  b_loop 
)

Edit the parameters of a media.

This will delete all existing inputs and add the specified one.

Parameters
p_instancethe instance
psz_namethe name of the new broadcast
psz_inputthe input MRL
psz_outputthe output MRL (the parameter to the "sout" variable)
i_optionsnumber of additional options
ppsz_optionsadditional options
b_enabledboolean for enabling the new broadcast
b_loopShould this broadcast be played in loop ?
Returns
0 on success, -1 on error
LIBVLC_API int libvlc_vlm_del_media ( libvlc_instance_t p_instance,
const char *  psz_name 
)

Delete a media (VOD or broadcast).

Parameters
p_instancethe instance
psz_namethe media to delete
Returns
0 on success, -1 on error
LIBVLC_API libvlc_event_manager_t* libvlc_vlm_get_event_manager ( libvlc_instance_t p_instance)

Get libvlc_event_manager from a vlm media.

The p_event_manager is immutable, so you don't have to hold the lock

Parameters
p_instancea libvlc instance
Returns
libvlc_event_manager
LIBVLC_API int libvlc_vlm_get_media_instance_length ( libvlc_instance_t p_instance,
const char *  psz_name,
int  i_instance 
)

Get vlm_media instance length by name or instance id.

Parameters
p_instancea libvlc instance
psz_namename of vlm media instance
i_instanceinstance id
Returns
length of media item or -1 on error
LIBVLC_API float libvlc_vlm_get_media_instance_position ( libvlc_instance_t p_instance,
const char *  psz_name,
int  i_instance 
)

Get vlm_media instance position by name or instance id.

Parameters
p_instancea libvlc instance
psz_namename of vlm media instance
i_instanceinstance id
Returns
position as float or -1. on error
LIBVLC_API int libvlc_vlm_get_media_instance_rate ( libvlc_instance_t p_instance,
const char *  psz_name,
int  i_instance 
)

Get vlm_media instance playback rate by name or instance id.

Parameters
p_instancea libvlc instance
psz_namename of vlm media instance
i_instanceinstance id
Returns
playback rate or -1 on error
LIBVLC_API int libvlc_vlm_get_media_instance_time ( libvlc_instance_t p_instance,
const char *  psz_name,
int  i_instance 
)

Get vlm_media instance time by name or instance id.

Parameters
p_instancea libvlc instance
psz_namename of vlm media instance
i_instanceinstance id
Returns
time as integer or -1 on error
LIBVLC_API int libvlc_vlm_pause_media ( libvlc_instance_t p_instance,
const char *  psz_name 
)

Pause the named broadcast.

Parameters
p_instancethe instance
psz_namethe name of the broadcast
Returns
0 on success, -1 on error
LIBVLC_API int libvlc_vlm_play_media ( libvlc_instance_t p_instance,
const char *  psz_name 
)

Play the named broadcast.

Parameters
p_instancethe instance
psz_namethe name of the broadcast
Returns
0 on success, -1 on error
LIBVLC_API void libvlc_vlm_release ( libvlc_instance_t p_instance)

Release the vlm instance related to the given libvlc_instance_t.

Parameters
p_instancethe instance
LIBVLC_API int libvlc_vlm_seek_media ( libvlc_instance_t p_instance,
const char *  psz_name,
float  f_percentage 
)

Seek in the named broadcast.

Parameters
p_instancethe instance
psz_namethe name of the broadcast
f_percentagethe percentage to seek to
Returns
0 on success, -1 on error
LIBVLC_API int libvlc_vlm_set_enabled ( libvlc_instance_t p_instance,
const char *  psz_name,
int  b_enabled 
)

Enable or disable a media (VOD or broadcast).

Parameters
p_instancethe instance
psz_namethe media to work on
b_enabledthe new status
Returns
0 on success, -1 on error
LIBVLC_API int libvlc_vlm_set_input ( libvlc_instance_t p_instance,
const char *  psz_name,
const char *  psz_input 
)

Set a media's input MRL.

This will delete all existing inputs and add the specified one.

Parameters
p_instancethe instance
psz_namethe media to work on
psz_inputthe input MRL
Returns
0 on success, -1 on error
LIBVLC_API int libvlc_vlm_set_loop ( libvlc_instance_t p_instance,
const char *  psz_name,
int  b_loop 
)

Set a media's loop status.

Parameters
p_instancethe instance
psz_namethe media to work on
b_loopthe new status
Returns
0 on success, -1 on error
LIBVLC_API int libvlc_vlm_set_mux ( libvlc_instance_t p_instance,
const char *  psz_name,
const char *  psz_mux 
)

Set a media's vod muxer.

Parameters
p_instancethe instance
psz_namethe media to work on
psz_muxthe new muxer
Returns
0 on success, -1 on error
LIBVLC_API int libvlc_vlm_set_output ( libvlc_instance_t p_instance,
const char *  psz_name,
const char *  psz_output 
)

Set the output for a media.

Parameters
p_instancethe instance
psz_namethe media to work on
psz_outputthe output MRL (the parameter to the "sout" variable)
Returns
0 on success, -1 on error
LIBVLC_API const char* libvlc_vlm_show_media ( libvlc_instance_t p_instance,
const char *  psz_name 
)

Return information about the named media as a JSON string representation.

This function is mainly intended for debugging use, if you want programmatic access to the state of a vlm_media_instance_t, please use the corresponding libvlc_vlm_get_media_instance_xxx -functions. Currently there are no such functions available for vlm_media_t though.

Parameters
p_instancethe instance
psz_namethe name of the media, if the name is an empty string, all media is described
Returns
string with information about named media, or NULL on error
LIBVLC_API int libvlc_vlm_stop_media ( libvlc_instance_t p_instance,
const char *  psz_name 
)

Stop the named broadcast.

Parameters
p_instancethe instance
psz_namethe name of the broadcast
Returns
0 on success, -1 on error