Postby chouquette » 21 Aug 2018 14:51
Hi,
I'm not sure how things are done in python, but the basic way to discover a renderer in C is:
- use libvlc_renderer_discoverer_list_get to get a list of available discoverers
- use the name in the information structure that gets returned to instantiate a discoverer using libvlc_renderer_discoverer_new
- Attach yourself to the renderer discoverer event manager: libvlc_renderer_discoverer_event_manager & libvlc_event_attach. The events you should be interested in are renderer_discoverer_item_added and renderer_discoverer_item_deleted
- Start the newly create discoverer using libvlc_renderer_discoverer_start, this will cause libvlc to invoke your event handlers, that you registered in the previous step
- If/when a renderer gets discovered, you can set it to be the currently used renderer by using libvlc_media_player_set_renderer
I don't know the python API but I'd expect it to be similar in term of naming, and to release the resources automatically.
Good luck!