Commit 99450534 authored by Thomas Guillem's avatar Thomas Guillem

lib: add libvlc_media_player_set_evas_object

Used to pass an Evas_Object * for the future Evas video_output.
parent e8566831
......@@ -551,6 +551,19 @@ LIBVLC_API void libvlc_media_player_set_android_context( libvlc_media_player_t *
void *p_jvm,
void *p_awindow_handler );
/**
* Set the EFL Evas Object.
*
* \version LibVLC 3.0.0 and later.
*
* \param p_mi the media player
* \param p_evas_object a valid EFL Evas Object (Evas_Object)
* \return -1 if an error was detected, 0 otherwise.
*/
LIBVLC_API int libvlc_media_player_set_evas_object( libvlc_media_player_t *p_mi,
void *p_evas_object );
/**
* Callback prototype for audio playback.
* \param data data pointer as passed to libvlc_audio_set_callbacks() [IN]
......
......@@ -177,6 +177,7 @@ libvlc_media_player_set_agl
libvlc_media_player_set_android_context
libvlc_media_player_set_chapter
libvlc_media_player_set_equalizer
libvlc_media_player_set_evas_object
libvlc_media_player_set_hwnd
libvlc_media_player_set_media
libvlc_media_player_set_nsobject
......
......@@ -584,6 +584,9 @@ libvlc_media_player_new( libvlc_instance_t *instance )
var_Create (mp, "android-jvm", VLC_VAR_ADDRESS);
var_Create (mp, "drawable-androidwindow", VLC_VAR_ADDRESS);
#endif
#ifdef HAVE_EVAS
var_Create (mp, "drawable-evasobject", VLC_VAR_ADDRESS);
#endif
var_Create (mp, "keyboard-events", VLC_VAR_BOOL);
var_SetBool (mp, "keyboard-events", true);
......@@ -1173,6 +1176,24 @@ void libvlc_media_player_set_android_context( libvlc_media_player_t *p_mi,
#endif
}
/**************************************************************************
* set_evas_object
**************************************************************************/
int libvlc_media_player_set_evas_object( libvlc_media_player_t *p_mi,
void *p_evas_object )
{
assert (p_mi != NULL);
#ifdef HAVE_EVAS
var_SetString (p_mi, "vout", "evas");
var_SetString (p_mi, "window", "none");
var_SetAddress (p_mi, "drawable-evasobject", p_evas_object);
return 0;
#else
(void) p_mi; (void) p_evas_object;
return -1;
#endif
}
void libvlc_audio_set_callbacks( libvlc_media_player_t *mp,
libvlc_audio_play_cb play_cb,
libvlc_audio_pause_cb pause_cb,
......
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