diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index 0be4be5b0..c95adbc4f 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -603,10 +603,10 @@ void linphone_player_destroy(LinphonePlayer *obj); * @param lc A LinphoneCore object * @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 + * @param window_id Id of the drawing window. Depend of video out * @return A pointer on the new instance. NULL if faild. */ -LINPHONE_PUBLIC LinphonePlayer *linphone_core_create_local_player(LinphoneCore *lc, MSSndCard *snd_card, const char *video_out, void *window_id); +LINPHONE_PUBLIC LinphonePlayer *linphone_core_create_local_player(LinphoneCore *lc, MSSndCard *snd_card, const char *video_out, unsigned long window_id); /** * @brief Check whether Matroksa format is supported by the player diff --git a/coreapi/linphonecore_jni.cc b/coreapi/linphonecore_jni.cc index 241f130cc..8abf9c4cd 100644 --- a/coreapi/linphonecore_jni.cc +++ b/coreapi/linphonecore_jni.cc @@ -5326,7 +5326,7 @@ extern "C" jlong Java_org_linphone_core_LinphoneCoreImpl_createLocalPlayer(JNIEn return 0; } window_ref = env->NewGlobalRef(window); - LinphonePlayer *player = linphone_core_create_local_player((LinphoneCore *)ptr, snd_card, "MSAndroidDisplay", window_ref); + LinphonePlayer *player = linphone_core_create_local_player((LinphoneCore *)ptr, NULL, "MSAndroidDisplay", (unsigned long)window_ref); if(player == NULL) { ms_error("Fails to create a player"); if(window_ref) env->DeleteGlobalRef(window_ref); diff --git a/coreapi/localplayer.c b/coreapi/localplayer.c index ad06e1751..964c1c920 100644 --- a/coreapi/localplayer.c +++ b/coreapi/localplayer.c @@ -32,9 +32,9 @@ static void _local_player_close(LinphonePlayer *obj); static void _local_player_destroy(LinphonePlayer *obj); static void _local_player_eof_callback(void *user_data); -LinphonePlayer *linphone_core_create_local_player(LinphoneCore *lc, MSSndCard *snd_card, const char *video_out, void *window_id) { +LinphonePlayer *linphone_core_create_local_player(LinphoneCore *lc, MSSndCard *snd_card, const char *video_out, unsigned long window_id) { LinphonePlayer *obj = ms_new0(LinphonePlayer, 1); - if(snd_card == NULL) snd_card = lc->sound_conf.play_sndcard; + if(snd_card == NULL) snd_card = lc->sound_conf.ring_sndcard; if(video_out == NULL) video_out = linphone_core_get_video_display_filter(lc); obj->impl = ms_media_player_new(snd_card, video_out, window_id); obj->open = _local_player_open; diff --git a/mediastreamer2 b/mediastreamer2 index d344de5fe..cebd5a0e1 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit d344de5fe5875b219bc19aa0fa76380986a70fa2 +Subproject commit cebd5a0e1d1aa69cc2721a82a4d6514288abe7c7 diff --git a/tester/player_tester.c b/tester/player_tester.c index 17e692d23..be0b47284 100644 --- a/tester/player_tester.c +++ b/tester/player_tester.c @@ -18,23 +18,23 @@ #include "liblinphone_tester.h" -static const char *_get_default_video_renderer(void){ -#ifdef WIN32 - return "MSDrawDibDisplay"; -#elif defined(ANDROID) - return "MSAndroidDisplay"; -#elif __APPLE__ && !defined(__ios) - return "MSOSXGLDisplay"; -#elif defined (HAVE_XV) - return "MSX11Video"; -#elif defined(HAVE_GL) - return "MSGLXVideo"; -#elif defined(__ios) - return "IOSDisplay"; -#else - return "MSVideoOut"; -#endif -} +//static const char *_get_default_video_renderer(void){ +//#ifdef WIN32 +// return "MSDrawDibDisplay"; +//#elif defined(ANDROID) +// return "MSAndroidDisplay"; +//#elif __APPLE__ && !defined(__ios) +// return "MSOSXGLDisplay"; +//#elif defined (HAVE_XV) +// return "MSX11Video"; +//#elif defined(HAVE_GL) +// return "MSGLXVideo"; +//#elif defined(__ios) +// return "IOSDisplay"; +//#else +// return "MSVideoOut"; +//#endif +//} static bool_t wait_for_eof(bool_t *eof, int *time,int time_refresh, int timeout) { while(*time < timeout && !*eof) { @@ -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_local_player(lc_manager->lc, ms_snd_card_manager_get_default_card(ms_snd_card_manager_get()), _get_default_video_renderer(), NULL); + player = linphone_core_create_local_player(lc_manager->lc, ms_snd_card_manager_get_default_card(ms_snd_card_manager_get()), "MSX11Video", 0); CU_ASSERT_PTR_NOT_NULL(player); if(player == NULL) goto fail; @@ -84,7 +84,7 @@ static void play_file(const char *filename, bool_t unsupported_format) { } static void playing_test(void) { - play_file("sounds/hello_opus_h264.mkv", !linphone_local_player_matroska_supported()); + play_file("/home/francois/Téléchargements/test_linphone.mkv", !linphone_local_player_matroska_supported()); } test_t player_tests[] = {