From 5d9bbeeffb1cdacfc0d42e40b3c760ceed17e209 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grisez?= Date: Mon, 13 Oct 2014 17:16:40 +0200 Subject: [PATCH] Add a parameter to linphone_core_create_file_player() to specify the id of the drawing window --- coreapi/fileplayer.c | 4 ++-- coreapi/linphonecore.h | 3 ++- mediastreamer2 | 2 +- tester/player_tester.c | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/coreapi/fileplayer.c b/coreapi/fileplayer.c index fc38f93a8..103dd205e 100644 --- a/coreapi/fileplayer.c +++ b/coreapi/fileplayer.c @@ -31,11 +31,11 @@ static int file_player_get_current_position(LinphonePlayer *obj); static void file_player_close(LinphonePlayer *obj); static void file_player_eof_callback(void *user_data); -LinphonePlayer *linphone_core_create_file_player(LinphoneCore *lc, MSSndCard *snd_card, const char *video_out) { +LinphonePlayer *linphone_core_create_file_player(LinphoneCore *lc, MSSndCard *snd_card, const char *video_out, void *window_id) { LinphonePlayer *obj = ms_new0(LinphonePlayer, 1); if(snd_card == NULL) snd_card = lc->sound_conf.play_sndcard; if(video_out == NULL) video_out = linphone_core_get_video_display_filter(lc); - obj->impl = ms_file_player_new(snd_card, video_out); + obj->impl = ms_file_player_new(snd_card, video_out, window_id); obj->open = file_player_open; obj->start = file_player_start; obj->pause = file_player_pause; diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index 753030612..7dd4d8f55 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -602,9 +602,10 @@ void linphone_player_close(LinphonePlayer *obj); * @param lc A LinphoneCore * @param snd_card Playback sound card. If NULL, the sound card set in LinphoneCore will be used * @param video_out Video display. If NULL, the video display set in LinphoneCore will be used + * @param window_id Pointer on the drawing window * @return A pointer on the new instance. NULL if faild. */ -LINPHONE_PUBLIC LinphonePlayer *linphone_core_create_file_player(LinphoneCore *lc, MSSndCard *snd_card, const char *video_out); +LINPHONE_PUBLIC LinphonePlayer *linphone_core_create_file_player(LinphoneCore *lc, MSSndCard *snd_card, const char *video_out, void *window_id); /** * @brief Destroy a file player diff --git a/mediastreamer2 b/mediastreamer2 index f4c48ff76..9de5799b6 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit f4c48ff7699428655446ee41acb92c7a7f300fbb +Subproject commit 9de5799b612449269531ad196012bbd7d480e1c7 diff --git a/tester/player_tester.c b/tester/player_tester.c index 8eae21dcd..7c37a95de 100644 --- a/tester/player_tester.c +++ b/tester/player_tester.c @@ -59,7 +59,7 @@ static void play_file(const char *filename, bool_t unsupported_format) { CU_ASSERT_PTR_NOT_NULL(lc_manager); if(lc_manager == NULL) return; - player = linphone_core_create_file_player(lc_manager->lc, ms_snd_card_manager_get_default_card(ms_snd_card_manager_get()), _get_default_video_renderer()); + player = linphone_core_create_file_player(lc_manager->lc, ms_snd_card_manager_get_default_card(ms_snd_card_manager_get()), _get_default_video_renderer(), NULL); CU_ASSERT_PTR_NOT_NULL(player); if(player == NULL) goto fail;