From d23ce6ed1e6bdaf1f764697ed87b8ee703baf3e4 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Thu, 21 Jan 2016 17:06:03 +0100 Subject: [PATCH 1/6] Update ortp and ms2 submodules. --- mediastreamer2 | 2 +- oRTP | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mediastreamer2 b/mediastreamer2 index 09acc3caa..5a4ae4dc0 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 09acc3caa022de1357144e0ae7e13143ed396d55 +Subproject commit 5a4ae4dc04a597636f66c2e9a8cb80b15159273d diff --git a/oRTP b/oRTP index 424807194..93a9eac89 160000 --- a/oRTP +++ b/oRTP @@ -1 +1 @@ -Subproject commit 424807194f472f929cd3d7b3d59f54d668897a6e +Subproject commit 93a9eac89b0500ef97e2bc83428af3d8cb314530 From ba58c9f03851e8381d781a38d93911d025bf9271 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Thu, 21 Jan 2016 17:06:59 +0100 Subject: [PATCH 2/6] Support build for Windows 10 with CMake. --- CMakeLists.txt | 3 +++ coreapi/CMakeLists.txt | 8 +++---- tester/CMakeLists.txt | 34 +++++++++++++++++++++++---- tester/liblinphone_tester_windows.cpp | 2 +- tester/liblinphone_tester_windows.h | 2 +- 5 files changed, 38 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7e86c8270..cc9f7e543 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -231,6 +231,9 @@ if(NOT MSVC) list(APPEND STRICT_OPTIONS_CPP "-Werror" "-fno-strict-aliasing") endif() endif() +if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + list(APPEND STRICT_OPTIONS_CPP "/wd4996") +endif() if(STRICT_OPTIONS_CPP) list(REMOVE_DUPLICATES STRICT_OPTIONS_CPP) endif() diff --git a/coreapi/CMakeLists.txt b/coreapi/CMakeLists.txt index ba5277382..bd855d7e2 100644 --- a/coreapi/CMakeLists.txt +++ b/coreapi/CMakeLists.txt @@ -20,7 +20,7 @@ # ############################################################################ -if(MSVC AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone") +if(MSVC AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone" AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") find_library(LIBGCC NAMES gcc) find_library(LIBMINGWEX NAMES mingwex) endif() @@ -165,10 +165,10 @@ endif() if(ENABLE_TUNNEL) list(APPEND LIBS ${TUNNEL_LIBRARIES}) endif() -if(MSVC AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone") +if(MSVC AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone" AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") list(APPEND LIBS ${LIBGCC} ${LIBMINGWEX}) endif() -if(WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone") +if(WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone" AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") list(APPEND LIBS shlwapi) endif() if(INTL_FOUND) @@ -195,7 +195,7 @@ if(IOS) target_link_libraries(linphone "-framework Foundation" "-framework AVFoundation") endif() add_dependencies(linphone liblinphone-git-version) -if(WIN32 AND CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone") +if(WIN32 AND CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone" AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") set_target_properties(linphone PROPERTIES PREFIX "lib") endif() if(ICONV_FOUND) diff --git a/tester/CMakeLists.txt b/tester/CMakeLists.txt index 7ed25ecaa..cacb65dee 100644 --- a/tester/CMakeLists.txt +++ b/tester/CMakeLists.txt @@ -50,11 +50,13 @@ set(SOURCE_FILES apply_compile_flags(SOURCE_FILES "CPP" "C") -#executable must be available on root path, not host one -find_program(SIPP_PROGRAM NAMES sipp sipp.exe ONLY_CMAKE_FIND_ROOT_PATH) -if(SIPP_PROGRAM) - add_definitions(-DHAVE_SIPP=1) - add_definitions(-DSIPP_COMMAND="${SIPP_PROGRAM}") +if(NOT IOS OR NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + # Executable must be available on root path, not host one + find_program(SIPP_PROGRAM NAMES sipp sipp.exe ONLY_CMAKE_FIND_ROOT_PATH) + if(SIPP_PROGRAM) + add_definitions(-DHAVE_SIPP=1) + add_definitions(-DSIPP_COMMAND="${SIPP_PROGRAM}") + endif() endif() add_definitions(-DBC_CONFIG_FILE="config.h") @@ -73,6 +75,28 @@ if(IOS) DESTINATION include/linphone PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ ) +elseif(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + add_library(linphone_tester_static STATIC ${SOURCE_FILES}) + target_include_directories(linphone_tester_static PUBLIC ${CUNIT_INCLUDE_DIRS} PRIVATE common) + target_link_libraries(linphone_tester_static linphone ${CUNIT_LIBRARIES}) + + set(RUNTIME_COMPONENT_SOURCES + liblinphone_tester_windows.cpp + liblinphone_tester_windows.h + ) + add_library(linphone_tester_runtime MODULE ${RUNTIME_COMPONENT_SOURCES}) + target_include_directories(linphone_tester_runtime PRIVATE common) + target_compile_options(linphone_tester_runtime PRIVATE "/wd4996") + target_link_libraries(linphone_tester_runtime linphone_tester_static) + set_target_properties(linphone_tester_runtime PROPERTIES VS_WINRT_COMPONENT TRUE) + + install(TARGETS linphone_tester_runtime + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE + ) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/linphone_tester_runtime.winmd" DESTINATION bin) else() add_executable(liblinphone_tester ${SOURCE_FILES}) set_target_properties(liblinphone_tester PROPERTIES LINKER_LANGUAGE CXX) diff --git a/tester/liblinphone_tester_windows.cpp b/tester/liblinphone_tester_windows.cpp index 838ea52be..790f696c8 100644 --- a/tester/liblinphone_tester_windows.cpp +++ b/tester/liblinphone_tester_windows.cpp @@ -2,7 +2,7 @@ #include "liblinphone_tester_windows.h" -using namespace liblinphone_tester_runtime_component; +using namespace linphone_tester_runtime; using namespace Platform; using namespace Windows::Foundation; using namespace Windows::Storage; diff --git a/tester/liblinphone_tester_windows.h b/tester/liblinphone_tester_windows.h index d45a90fce..c7701143c 100644 --- a/tester/liblinphone_tester_windows.h +++ b/tester/liblinphone_tester_windows.h @@ -3,7 +3,7 @@ #include "linphonecore.h" #include "liblinphone_tester.h" -namespace liblinphone_tester_runtime_component +namespace linphone_tester_runtime { public interface class OutputTraceListener { From 82634eb79503c37bd3120508563aa9d25dc7411a Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Fri, 22 Jan 2016 10:03:48 +0100 Subject: [PATCH 3/6] ringtoneplayer: handle NULL ringtone for iOS too --- coreapi/ringtoneplayer.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/coreapi/ringtoneplayer.c b/coreapi/ringtoneplayer.c index 1955da18d..c1841aae7 100644 --- a/coreapi/ringtoneplayer.c +++ b/coreapi/ringtoneplayer.c @@ -37,7 +37,14 @@ void linphone_ringtoneplayer_destroy(LinphoneRingtonePlayer* rp) { } int linphone_ringtoneplayer_start_with_cb(LinphoneRingtonePlayer* rp, MSSndCard* card, const char* ringtone, int loop_pause_ms, LinphoneRingtonePlayerFunc end_of_ringtone, void * user_data) { - return linphone_ringtoneplayer_ios_start_with_cb(rp, ringtone, loop_pause_ms, end_of_ringtone, user_data); + if (linphone_ringtoneplayer_is_started(rp)) { + ms_message("the local ringtone is already started"); + return 2; + } + if (ringtone){ + return linphone_ringtoneplayer_ios_start_with_cb(rp, ringtone, loop_pause_ms, end_of_ringtone, user_data); + } + return 3; } bool_t linphone_ringtoneplayer_is_started(LinphoneRingtonePlayer* rp) { From d3fb4b4046faae660378af9370db0c6f64b3cfce Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Fri, 22 Jan 2016 10:16:34 +0100 Subject: [PATCH 4/6] Update ms2 submodule. --- mediastreamer2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediastreamer2 b/mediastreamer2 index 5a4ae4dc0..4d25e8a58 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 5a4ae4dc04a597636f66c2e9a8cb80b15159273d +Subproject commit 4d25e8a587138dd74683a177a16b521a7ac1c6a7 From 7547f94a50a4ba1a634f6e525e5cdd9d41babecf Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Fri, 22 Jan 2016 10:29:33 +0100 Subject: [PATCH 5/6] Update ms2 submodule. --- mediastreamer2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediastreamer2 b/mediastreamer2 index 4d25e8a58..687595aef 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 4d25e8a587138dd74683a177a16b521a7ac1c6a7 +Subproject commit 687595aef470a3ee2b83574c04c36b92a99110e8 From 26b0a2018450fb3170a48a7f00f243471efe95bf Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Fri, 22 Jan 2016 10:29:40 +0100 Subject: [PATCH 6/6] Fix Python module build. --- tools/python/apixml2python/handwritten_definitions.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/python/apixml2python/handwritten_definitions.mustache b/tools/python/apixml2python/handwritten_definitions.mustache index 5c8db7305..98bdb1d44 100644 --- a/tools/python/apixml2python/handwritten_definitions.mustache +++ b/tools/python/apixml2python/handwritten_definitions.mustache @@ -72,7 +72,7 @@ static const char * pylinphone_ortp_log_level_to_string(OrtpLogLevel lev) { } } -static void pylinphone_module_log_handler(OrtpLogLevel lev, const char *fmt, va_list args) { +static void pylinphone_module_log_handler(const char *domain, OrtpLogLevel lev, const char *fmt, va_list args) { PyGILState_STATE gstate; PyObject *linphone_module; const char *level;