Commit 8db2ddf9 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Added linphone_player_get_is_video_available

parent acf741f9
......@@ -31,6 +31,7 @@ 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 bool_t _local_player_is_video_available(LinphonePlayer *obj);
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) {
......@@ -58,6 +59,7 @@ LinphonePlayer *linphone_core_create_local_player(LinphoneCore *lc, const char *
obj->close = _local_player_close;
obj->destroy = _local_player_destroy;
obj->set_window_id = _local_player_set_window_id;
obj->is_video_available = _local_player_is_video_available;
ms_media_player_set_eof_callback((MSMediaPlayer *)obj->impl, _local_player_eof_callback, obj);
return obj;
}
......@@ -107,6 +109,10 @@ static void _local_player_set_window_id(LinphonePlayer *obj, void* window_id) {
ms_media_player_set_window_id((MSMediaPlayer *)obj->impl, window_id);
}
static bool_t _local_player_is_video_available(LinphonePlayer *obj) {
return ms_media_player_get_is_video_available((MSMediaPlayer *)obj->impl);
}
static void _local_player_eof_callback(void *user_data) {
LinphonePlayer *obj = (LinphonePlayer *)user_data;
......
......@@ -129,6 +129,10 @@ void linphone_player_set_window_id(LinphonePlayer *obj, void* window_id){
obj->set_window_id(obj, window_id);
}
bool_t linphone_player_get_is_video_available(LinphonePlayer *obj) {
return obj->is_video_available(obj);
}
void linphone_player_destroy(LinphonePlayer *obj) {
_linphone_player_destroy(obj);
}
......
......@@ -620,6 +620,7 @@ struct _LinphonePlayer{
void (*close)(LinphonePlayer* player);
void (*destroy)(LinphonePlayer *player);
void (*set_window_id)(LinphonePlayer *player, void* window_id);
bool_t (*is_video_available)(LinphonePlayer *player);
void *impl;
LinphonePlayerCbs *callbacks; // Deprecated, use a list of Cbs instead
LinphoneCore *core;
......
......@@ -146,6 +146,13 @@ LINPHONE_PUBLIC void linphone_player_close(LinphonePlayer *player);
*/
LINPHONE_PUBLIC void linphone_player_set_window_id(LinphonePlayer *player, void *window_id);
/**
* Returns whether the file has video and if it can be displayed
* @param player #LinphonePlayer object @notnil
* @return TRUE if file has video and it can be displayed, FALSE otherwise
*/
LINPHONE_PUBLIC bool_t linphone_player_get_is_video_available(LinphonePlayer *player);
/**
* 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