- more changes to allow CI runs on this project
This commit is contained in:
parent
228e2d7829
commit
7d4933b066
|
|
@ -1,5 +1,7 @@
|
|||
project(rtphone)
|
||||
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
|
||||
macro(configure_msvc_runtime)
|
||||
if(MSVC)
|
||||
# Default to statically-linked runtime.
|
||||
|
|
@ -59,11 +61,25 @@ set (USE_AMR_CODEC OFF CACHE BOOL "Use AMR codec. Requires libraries.")
|
|||
set (USE_EVS_CODEC OFF CACHE BOOL "Use EVS codec.")
|
||||
set (OPENSSL_SSL ssl CACHE STRING "Pointer to ssl library")
|
||||
set (OPENSSL_CRYPTO crypto CACHE STRING "Pointer to crypto library")
|
||||
set (OPENSSL_INCLUDE "/usr/local/include/openssl" CACHE STRING "Pointer to OpenSSL include files")
|
||||
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
message ("Using ssl library at ${OPENSSL_SSL}")
|
||||
message ("Using crypto library at ${OPENSSL_CRYPTO}")
|
||||
message ("Using OpenSSL include files from ${OPENSSL_INCLUDE}")
|
||||
|
||||
if (CMAKE_SYSTEM MATCHES "Windows*")
|
||||
add_definitions(-DTARGET_WIN)
|
||||
endif()
|
||||
|
||||
if (CMAKE_SYSTEM MATCHES "Linux*")
|
||||
add_definitions(-DTARGET_LINUX)
|
||||
endif()
|
||||
|
||||
if (CMAKE_SYSTEM MATCHES "Darwin*")
|
||||
add_definitions(-DTARGET_OSX)
|
||||
endif()
|
||||
|
||||
set (RTPHONE_SOURCES
|
||||
${rtphone_engine}/media/MT_Statistics.cpp
|
||||
|
|
@ -94,10 +110,39 @@ set (RTPHONE_SOURCES
|
|||
${rtphone_engine}/endpoint/EP_Session.cpp
|
||||
)
|
||||
|
||||
add_library(rtphone STATIC ${RTPHONE_SOURCES})
|
||||
set (RTPHONE_HEADERS
|
||||
${rtphone_engine}/media/MT_Statistics.h
|
||||
${rtphone_engine}/media/MT_WebRtc.h
|
||||
${rtphone_engine}/media/MT_Stream.h
|
||||
${rtphone_engine}/media/MT_SrtpHelper.h
|
||||
${rtphone_engine}/media/MT_SingleAudioStream.h
|
||||
${rtphone_engine}/media/MT_NativeRtpSender.h
|
||||
${rtphone_engine}/media/MT_Dtmf.h
|
||||
${rtphone_engine}/media/MT_CodecList.h
|
||||
${rtphone_engine}/media/MT_Codec.h
|
||||
${rtphone_engine}/media/MT_Box.h
|
||||
${rtphone_engine}/media/MT_AudioStream.h
|
||||
${rtphone_engine}/media/MT_AudioReceiver.h
|
||||
${rtphone_engine}/media/MT_AudioCodec.h
|
||||
${rtphone_engine}/media/MT_SevanaMos.h
|
||||
${rtphone_engine}/media/MT_AmrCodec.h
|
||||
${rtphone_engine}/media/MT_EvsCodec.h
|
||||
${rtphone_engine}/media/MT_CngHelper.h
|
||||
${rtphone_engine}/agent/Agent_Impl.h
|
||||
${rtphone_engine}/agent/Agent_AudioManager.h
|
||||
${rtphone_engine}/endpoint/EP_Account.h
|
||||
${rtphone_engine}/endpoint/EP_AudioProvider.h
|
||||
${rtphone_engine}/endpoint/EP_DataProvider.h
|
||||
${rtphone_engine}/endpoint/EP_Engine.h
|
||||
${rtphone_engine}/endpoint/EP_NetworkQueue.h
|
||||
${rtphone_engine}/endpoint/EP_Observer.h
|
||||
${rtphone_engine}/endpoint/EP_Session.h
|
||||
)
|
||||
add_library(rtphone STATIC ${RTPHONE_SOURCES} ${RTPHONE_HEADERS})
|
||||
|
||||
add_subdirectory(${rtphone_engine}/helper)
|
||||
add_subdirectory(${rtphone_engine}/audio)
|
||||
add_subdirectory(${rtphone_engine}/media)
|
||||
add_subdirectory(${rtphone_libs}/resiprocate)
|
||||
add_subdirectory(${rtphone_libs}/ice)
|
||||
add_subdirectory(${rtphone_libs}/jrtplib/src)
|
||||
|
|
@ -116,9 +161,9 @@ set(LIBS ice_stack jrtplib g729_codec gsm_codec
|
|||
|
||||
if (CMAKE_SYSTEM MATCHES "Win*")
|
||||
set (LIBS ${LIBS} opus )
|
||||
else (CMAKE_SYSTEM MATCHES "Win*")
|
||||
else ()
|
||||
set (LIBS ${LIBS} dl opus uuid)
|
||||
endif (CMAKE_SYSTEM MATCHES "Win*")
|
||||
endif ()
|
||||
|
||||
if (USE_AMR_CODEC)
|
||||
set(LIBS ${LIBS} opencore-amrnb opencore-amrwb)
|
||||
|
|
@ -134,6 +179,11 @@ target_link_libraries(rtphone
|
|||
target_include_directories(rtphone
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/engine>
|
||||
PRIVATE ../../libs/speex/include ../../libs ../)
|
||||
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/libs/
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/libs/speex/include
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/libs/opus/include/
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/libs/json
|
||||
)
|
||||
|
||||
configure_msvc_runtime()
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@
|
|||
#define LOG_SUBSYSTEM "AudioProvider"
|
||||
|
||||
AudioProvider::AudioProvider(UserAgent& agent, MT::Terminal& terminal)
|
||||
:mUserAgent(agent), mTerminal(terminal), mState(0),
|
||||
mRemoteTelephoneCodec(0), mRemoteNoSdp(false)
|
||||
:mUserAgent(agent), mTerminal(terminal), mState(0),
|
||||
mRemoteTelephoneCodec(0), mRemoteNoSdp(false)
|
||||
{
|
||||
mActive = mfActive;
|
||||
mRemoteState = msSendRecv;
|
||||
|
|
|
|||
|
|
@ -13,24 +13,28 @@ add_definitions(-DHAVE_STDINT_H -DHAVE_UINT64_T)
|
|||
|
||||
if(CMAKE_SYSTEM MATCHES "Linux*")
|
||||
add_definitions(-DHAVE_NETINET_IN_H)
|
||||
endif(CMAKE_SYSTEM MATCHES "Linux*")
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM MATCHES "Darwin*")
|
||||
# OS X Specific flags
|
||||
add_definitions(-DHAVE_NETINET_IN_H)
|
||||
endif(CMAKE_SYSTEM MATCHES "Darwin*")
|
||||
endif()
|
||||
|
||||
if (CMAKE_SYSTEM MATCHES "Win*")
|
||||
if (CMAKE_SYSTEM MATCHES "Windows*")
|
||||
# Windows Specific flags - MSVC expected
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS -DHAVE_WINSOCK2_H
|
||||
-D_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS -DUNICODE -D_UNICODE )
|
||||
endif(CMAKE_SYSTEM MATCHES "Win*")
|
||||
endif()
|
||||
|
||||
add_library(media_lib ${MEDIA_LIB_SOURCES})
|
||||
|
||||
target_include_directories(media_lib PRIVATE ../../libs/
|
||||
../ ../../libs/srtp/include
|
||||
../../libs/srtp/crypto/include
|
||||
../../libs/webrtc)
|
||||
target_include_directories(media_lib
|
||||
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../libs/
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../libs/srtp/include
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../libs/srtp/crypto/include
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../libs/webrtc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../libs/opus/include/
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -24,3 +24,5 @@ set (GSM_SOURCES
|
|||
)
|
||||
|
||||
add_library(gsm_codec ${GSM_SOURCES})
|
||||
target_include_directories(gsm_codec PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_compile_definitions(gsm_codec PUBLIC HAS_STDLIB_H HAS_STRING_H)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
|
||||
#include "config.h"
|
||||
//#include "config.h"
|
||||
|
||||
|
||||
#ifdef HAS_STDLIB_H
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
|
||||
#include "config.h"
|
||||
//#include "config.h"
|
||||
|
||||
#ifdef HAS_STRING_H
|
||||
#include <string.h>
|
||||
|
|
|
|||
|
|
@ -307,4 +307,11 @@ SET (RUTIL_SOURCES
|
|||
|
||||
|
||||
add_library(resiprocate ${ARES_SOURCES} ${RUTIL_SOURCES} ${STACK_SOURCES} ${DUM_SOURCES})
|
||||
|
||||
target_include_directories(resiprocate PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/contrib/ares
|
||||
/usr/local/include
|
||||
)
|
||||
target_compile_definitions(resiprocate PUBLIC -DUSE_ARES -DUSE_SSL)
|
||||
#add_library(resiprocate_lite ${RUTIL_SOURCES} ${STACK_SOURCES})
|
||||
|
|
|
|||
|
|
@ -20,3 +20,8 @@ set (SPEEXDSP_SOURCES
|
|||
)
|
||||
|
||||
add_library(speexdsp ${SPEEXDSP_SOURCES})
|
||||
target_compile_definitions(speexdsp PUBLIC -DUSE_KISS_FFT -DFIXED_POINT)
|
||||
|
||||
target_include_directories(speexdsp PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/libspeexdsp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
|
|
|
|||
|
|
@ -35,3 +35,7 @@ set (SRTP_SOURCES
|
|||
)
|
||||
|
||||
add_library(srtp ${SRTP_SOURCES})
|
||||
target_include_directories(srtp PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/crypto/include
|
||||
)
|
||||
|
|
|
|||
|
|
@ -173,3 +173,9 @@ set (WEBRTC_SOURCES
|
|||
)
|
||||
|
||||
add_library(webrtc ${WEBRTC_SOURCES})
|
||||
|
||||
target_include_directories(webrtc PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/signal_processing_library
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/utility
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue