VLC  3.0.0-git
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Files | Typedefs | Functions
LibVLC media discovery

LibVLC media discovery finds available media via various means. More...

Collaboration diagram for LibVLC media discovery:

Files

file  libvlc_media_discoverer.h
 LibVLC media discovery external API.
 

Typedefs

typedef struct
libvlc_media_discoverer_t 
libvlc_media_discoverer_t
 

Functions

LIBVLC_DEPRECATED LIBVLC_API
libvlc_media_discoverer_t
libvlc_media_discoverer_new_from_name (libvlc_instance_t *p_inst, const char *psz_name)
 
LIBVLC_API
libvlc_media_discoverer_t
libvlc_media_discoverer_new (libvlc_instance_t *p_inst, const char *psz_name)
 Create a media discoverer object by name. More...
 
LIBVLC_API int libvlc_media_discoverer_start (libvlc_media_discoverer_t *p_mdis)
 Start media discovery. More...
 
LIBVLC_API void libvlc_media_discoverer_stop (libvlc_media_discoverer_t *p_mdis)
 Stop media discovery. More...
 
LIBVLC_API void libvlc_media_discoverer_release (libvlc_media_discoverer_t *p_mdis)
 Release media discover object. More...
 
LIBVLC_API char * libvlc_media_discoverer_localized_name (libvlc_media_discoverer_t *p_mdis)
 Get media service discover object its localized name. More...
 
LIBVLC_API libvlc_media_list_tlibvlc_media_discoverer_media_list (libvlc_media_discoverer_t *p_mdis)
 Get media service discover media list. More...
 
LIBVLC_API libvlc_event_manager_tlibvlc_media_discoverer_event_manager (libvlc_media_discoverer_t *p_mdis)
 Get event manager from media service discover object. More...
 
LIBVLC_API int libvlc_media_discoverer_is_running (libvlc_media_discoverer_t *p_mdis)
 Query if media service discover object is running. More...
 

Detailed Description

LibVLC media discovery finds available media via various means.

This corresponds to the service discovery functionality in VLC media player. Different plugins find potential medias locally (e.g. user media directory), from peripherals (e.g. video capture device), on the local network (e.g. SAP) or on the Internet (e.g. Internet radios).

Typedef Documentation

Function Documentation

LIBVLC_API libvlc_event_manager_t* libvlc_media_discoverer_event_manager ( libvlc_media_discoverer_t p_mdis)

Get event manager from media service discover object.

Parameters
p_mdismedia service discover object
Returns
event manager object.
LIBVLC_API int libvlc_media_discoverer_is_running ( libvlc_media_discoverer_t p_mdis)

Query if media service discover object is running.

Parameters
p_mdismedia service discover object
Returns
true if running, false if not
LIBVLC_API char* libvlc_media_discoverer_localized_name ( libvlc_media_discoverer_t p_mdis)

Get media service discover object its localized name.

Parameters
p_mdismedia discover object
Returns
localized name
LIBVLC_API libvlc_media_list_t* libvlc_media_discoverer_media_list ( libvlc_media_discoverer_t p_mdis)

Get media service discover media list.

Parameters
p_mdismedia service discover object
Returns
list of media items
LIBVLC_API libvlc_media_discoverer_t* libvlc_media_discoverer_new ( libvlc_instance_t p_inst,
const char *  psz_name 
)

Create a media discoverer object by name.

After this object is created, you should attach to events in order to be notified of the discoverer state. You should also attach to media_list events in order to be notified of new items discovered.

You need to call libvlc_media_discoverer_start() in order to start the discovery.

See also
libvlc_media_discoverer_media_list
libvlc_media_discoverer_event_manager
libvlc_media_discoverer_start
Parameters
p_instlibvlc instance
psz_nameservice name
Returns
media discover object or NULL in case of error
Version
LibVLC 3.0.0 or later
LIBVLC_DEPRECATED LIBVLC_API libvlc_media_discoverer_t* libvlc_media_discoverer_new_from_name ( libvlc_instance_t p_inst,
const char *  psz_name 
)
LIBVLC_API void libvlc_media_discoverer_release ( libvlc_media_discoverer_t p_mdis)

Release media discover object.

If the reference count reaches 0, then the object will be released.

Parameters
p_mdismedia service discover object
LIBVLC_API int libvlc_media_discoverer_start ( libvlc_media_discoverer_t p_mdis)

Start media discovery.

To stop it, call libvlc_media_discoverer_stop() or libvlc_media_discoverer_release() directly.

See also
libvlc_media_discoverer_stop
Parameters
p_mdismedia discover object
Returns
-1 in case of error, 0 otherwise
Version
LibVLC 3.0.0 or later
LIBVLC_API void libvlc_media_discoverer_stop ( libvlc_media_discoverer_t p_mdis)

Stop media discovery.

See also
libvlc_media_discoverer_start
Parameters
p_mdismedia discover object
Version
LibVLC 3.0.0 or later