VLC 4.0.0-dev
|
LibVLC renderer discoverer finds available renderers available on the local network. More...
Files | |
file | libvlc_renderer_discoverer.h |
LibVLC renderer discoverer external API. | |
Data Structures | |
struct | libvlc_rd_description_t |
Renderer discoverer description. More... | |
Macros | |
#define | LIBVLC_RENDERER_CAN_AUDIO 0x0001 |
The renderer can render audio. | |
#define | LIBVLC_RENDERER_CAN_VIDEO 0x0002 |
The renderer can render video. | |
Typedefs | |
typedef struct libvlc_renderer_discoverer_t | libvlc_renderer_discoverer_t |
typedef struct libvlc_rd_description_t | libvlc_rd_description_t |
Renderer discoverer description. | |
typedef struct libvlc_renderer_item_t | libvlc_renderer_item_t |
Renderer item. | |
LibVLC renderer discoverer finds available renderers available on the local network.
#define LIBVLC_RENDERER_CAN_AUDIO 0x0001 |
The renderer can render audio.
#define LIBVLC_RENDERER_CAN_VIDEO 0x0002 |
The renderer can render video.
typedef struct libvlc_rd_description_t libvlc_rd_description_t |
Renderer discoverer description.
typedef struct libvlc_renderer_discoverer_t libvlc_renderer_discoverer_t |
typedef struct libvlc_renderer_item_t libvlc_renderer_item_t |
Renderer item.
This struct is passed by a libvlc_event_t when a new renderer is added or deleted.
An item is valid until the libvlc_RendererDiscovererItemDeleted event is called with the same pointer.
LIBVLC_API libvlc_event_manager_t * libvlc_renderer_discoverer_event_manager | ( | libvlc_renderer_discoverer_t * | p_rd | ) |
Get the event manager of the renderer discoverer.
The possible events to attach are libvlc_RendererDiscovererItemAdded and libvlc_RendererDiscovererItemDeleted.
The libvlc_renderer_item_t struct passed to event callbacks is owned by VLC, users should take care of holding/releasing this struct for their internal usage.
LIBVLC_API size_t libvlc_renderer_discoverer_list_get | ( | libvlc_instance_t * | p_inst, |
libvlc_rd_description_t *** | ppp_services | ||
) |
Get media discoverer services.
p_inst | libvlc instance |
ppp_services | address to store an allocated array of renderer discoverer services (must be freed with libvlc_renderer_list_release() by the caller) [OUT] |
LIBVLC_API void libvlc_renderer_discoverer_list_release | ( | libvlc_rd_description_t ** | pp_services, |
size_t | i_count | ||
) |
Release an array of media discoverer services.
pp_services | array to release |
i_count | number of elements in the array |
LIBVLC_API libvlc_renderer_discoverer_t * libvlc_renderer_discoverer_new | ( | libvlc_instance_t * | p_inst, |
const char * | psz_name | ||
) |
Create a renderer discoverer object by name.
After this object is created, you should attach to events in order to be notified of the discoverer events.
You need to call libvlc_renderer_discoverer_start() in order to start the discovery.
p_inst | libvlc instance |
psz_name | service name; use libvlc_renderer_discoverer_list_get() to get a list of the discoverer names available in this libVLC instance |
LIBVLC_API void libvlc_renderer_discoverer_release | ( | libvlc_renderer_discoverer_t * | p_rd | ) |
Release a renderer discoverer object.
p_rd | renderer discoverer object |
LIBVLC_API int libvlc_renderer_discoverer_start | ( | libvlc_renderer_discoverer_t * | p_rd | ) |
Start renderer discovery.
To stop it, call libvlc_renderer_discoverer_stop() or libvlc_renderer_discoverer_release() directly.
p_rd | renderer discoverer object |
LIBVLC_API void libvlc_renderer_discoverer_stop | ( | libvlc_renderer_discoverer_t * | p_rd | ) |
Stop renderer discovery.
p_rd | renderer discoverer object |
LIBVLC_API int libvlc_renderer_item_flags | ( | const libvlc_renderer_item_t * | p_item | ) |
Get the flags of a renderer item.
LIBVLC_API libvlc_renderer_item_t * libvlc_renderer_item_hold | ( | libvlc_renderer_item_t * | p_item | ) |
Hold a renderer item, i.e.
creates a new reference
This functions need to called from the libvlc_RendererDiscovererItemAdded callback if the libvlc user wants to use this item after. (for display or for passing it to the mediaplayer for example).
LIBVLC_API const char * libvlc_renderer_item_icon_uri | ( | const libvlc_renderer_item_t * | p_item | ) |
Get the icon uri of a renderer item.
LIBVLC_API const char * libvlc_renderer_item_name | ( | const libvlc_renderer_item_t * | p_item | ) |
Get the human readable name of a renderer item.
LIBVLC_API void libvlc_renderer_item_release | ( | libvlc_renderer_item_t * | p_item | ) |
Releases a renderer item, i.e.
decrements its reference counter
LIBVLC_API const char * libvlc_renderer_item_type | ( | const libvlc_renderer_item_t * | p_item | ) |
Get the type (not translated) of a renderer item.
For now, the type can only be "chromecast" ("upnp", "airplay" may come later).