Commit 474d2d36 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont Committed by Pierre d'Herbemont

libvlc: Export _get/set_nsobject.

parent cc6d6cb6
......@@ -555,6 +555,22 @@ VLC_PUBLIC_API void libvlc_media_player_pause ( libvlc_media_player_t *, libvlc_
*/
VLC_PUBLIC_API void libvlc_media_player_stop ( libvlc_media_player_t *, libvlc_exception_t * );
/**
* Set the agl handler where the media player should render its video output.
*
* \param p_mi the Media Player
* \param drawable the agl handler
* \param p_e an initialized exception pointer
*/
VLC_PUBLIC_API void libvlc_media_player_set_nsobject ( libvlc_media_player_t *p_mi, void * drawable, libvlc_exception_t *p_e );
/**
* Get the agl handler previously set with libvlc_media_player_set_agl().
*
* \return the agl handler or 0 if none where set
*/
VLC_PUBLIC_API uint32_t libvlc_media_player_get_nsobject ( libvlc_media_player_t *p_mi );
/**
* Set the agl handler where the media player should render its video output.
*
......
......@@ -157,6 +157,7 @@ struct libvlc_media_player_t
struct
{
void *hwnd;
void *nsobject;
uint32_t xid;
uint32_t agl;
} drawable;
......
......@@ -633,6 +633,13 @@ void libvlc_media_player_play( libvlc_media_player_t *p_mi,
var_Set( p_input_thread, "drawable-hwnd", val );
}
var_Create( p_input_thread, "drawable-nsobject", VLC_VAR_ADDRESS );
if( p_mi->drawable.nsobject != NULL )
{
vlc_value_t val = { .p_address = p_mi->drawable.nsobject };
var_Set( p_input_thread, "drawable-nsobject", val );
}
var_AddCallback( p_input_thread, "can-seek", input_seekable_changed, p_mi );
var_AddCallback( p_input_thread, "can-pause", input_pausable_changed, p_mi );
var_AddCallback( p_input_thread, "intf-event", input_event_changed, p_mi );
......@@ -718,6 +725,25 @@ void libvlc_media_player_stop( libvlc_media_player_t *p_mi,
}
}
/**************************************************************************
* set_nsobject
**************************************************************************/
void libvlc_media_player_set_nsobject( libvlc_media_player_t *p_mi,
void * drawable,
libvlc_exception_t *p_e )
{
(void) p_e;
p_mi->drawable.nsobject = drawable;
}
/**************************************************************************
* get_agl
**************************************************************************/
uint32_t libvlc_media_player_get_nsobject( libvlc_media_player_t *p_mi )
{
return p_mi->drawable.nsobject;
}
/**************************************************************************
* set_agl
**************************************************************************/
......
......@@ -130,6 +130,7 @@ libvlc_media_player_get_fps
libvlc_media_player_get_hwnd
libvlc_media_player_get_length
libvlc_media_player_get_media
libvlc_media_player_get_nsobject
libvlc_media_player_get_position
libvlc_media_player_get_rate
libvlc_media_player_get_state
......@@ -154,6 +155,7 @@ libvlc_media_player_set_chapter
libvlc_media_player_set_drawable
libvlc_media_player_set_hwnd
libvlc_media_player_set_media
libvlc_media_player_set_nsobject
libvlc_media_player_set_position
libvlc_media_player_set_rate
libvlc_media_player_set_time
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment