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/coreapi/ringtoneplayer.c b/coreapi/ringtoneplayer.c index d628c45fd..fd7e8421f 100644 --- a/coreapi/ringtoneplayer.c +++ b/coreapi/ringtoneplayer.c @@ -38,7 +38,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) { diff --git a/mediastreamer2 b/mediastreamer2 index 2acfebd90..1cacae1df 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 2acfebd906a410425f73c38874ebc8fc718668d0 +Subproject commit 1cacae1df5e9c7788a21c7158aa40337c10753ee diff --git a/oRTP b/oRTP index 424807194..93a9eac89 160000 --- a/oRTP +++ b/oRTP @@ -1 +1 @@ -Subproject commit 424807194f472f929cd3d7b3d59f54d668897a6e +Subproject commit 93a9eac89b0500ef97e2bc83428af3d8cb314530 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 { 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;