Commit acf741f9 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Added player_set_window_id

parent f5ec7565
......@@ -30,6 +30,7 @@ static int _local_player_get_duration(LinphonePlayer *obj);
static int _local_player_get_current_position(LinphonePlayer *obj);
static void _local_player_close(LinphonePlayer *obj);
static void _local_player_destroy(LinphonePlayer *obj);
static void _local_player_set_window_id(LinphonePlayer *obj, void* window_id);
static void _local_player_eof_callback(void *user_data);
LinphonePlayer *linphone_core_create_local_player(LinphoneCore *lc, const char *sound_card_name, const char *video_display_name, void *window_id) {
......@@ -56,6 +57,7 @@ LinphonePlayer *linphone_core_create_local_player(LinphoneCore *lc, const char *
obj->get_position = _local_player_get_current_position;
obj->close = _local_player_close;
obj->destroy = _local_player_destroy;
obj->set_window_id = _local_player_set_window_id;
ms_media_player_set_eof_callback((MSMediaPlayer *)obj->impl, _local_player_eof_callback, obj);
return obj;
}
......@@ -101,6 +103,10 @@ static void _local_player_close(LinphonePlayer *obj) {
ms_media_player_close((MSMediaPlayer *)obj->impl);
}
static void _local_player_set_window_id(LinphonePlayer *obj, void* window_id) {
ms_media_player_set_window_id((MSMediaPlayer *)obj->impl, window_id);
}
static void _local_player_eof_callback(void *user_data) {
LinphonePlayer *obj = (LinphonePlayer *)user_data;
......
......@@ -125,6 +125,10 @@ void linphone_player_close(LinphonePlayer *obj){
obj->close(obj);
}
void linphone_player_set_window_id(LinphonePlayer *obj, void* window_id){
obj->set_window_id(obj, window_id);
}
void linphone_player_destroy(LinphonePlayer *obj) {
_linphone_player_destroy(obj);
}
......
......@@ -619,6 +619,7 @@ struct _LinphonePlayer{
int (*get_position)(LinphonePlayer *player);
void (*close)(LinphonePlayer* player);
void (*destroy)(LinphonePlayer *player);
void (*set_window_id)(LinphonePlayer *player, void* window_id);
void *impl;
LinphonePlayerCbs *callbacks; // Deprecated, use a list of Cbs instead
LinphoneCore *core;
......
......@@ -139,6 +139,13 @@ LINPHONE_PUBLIC int linphone_player_get_current_position(LinphonePlayer *player)
*/
LINPHONE_PUBLIC void linphone_player_close(LinphonePlayer *player);
/**
* Sets a window id to be used to display video if any.
* @param player #LinphonePlayer object @notnil
* @param window_id The window id pointer to use. @maybenil
*/
LINPHONE_PUBLIC void linphone_player_set_window_id(LinphonePlayer *player, void *window_id);
/**
* Returns the #LinphoneCore object managing this player's call, if any.
* @param player #LinphonePlayer object @notnil
......
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