- rtphone project builds now

This commit is contained in:
2019-06-10 20:16:37 +03:00
parent 7d4933b066
commit e7d015c110
25 changed files with 11300 additions and 8 deletions

View File

@@ -99,6 +99,7 @@ void AudioProvider::updateSdpOffer(resip::SdpContents::Session::Medium& sdp, Sdp
else
sdp.addAttribute("crypto", resip::Data(createCryptoAttribute(mSrtpSuite)));
}
#if defined(USE_RESIP_INTEGRATION)
// Use CodecListPriority mCodecPriority adapter to work with codec priorities
if (mAvailableCodecs.empty())
@@ -113,6 +114,7 @@ void AudioProvider::updateSdpOffer(resip::SdpContents::Session::Medium& sdp, Sdp
if (mRemoteTelephoneCodec)
sdp.addCodec(resip::SdpContents::Session::Codec::TelephoneEvent);
}
#endif
// Publish stream state
const char* attr = nullptr;
@@ -224,9 +226,10 @@ bool AudioProvider::processSdpOffer(const resip::SdpContents::Session::Medium& m
for (int localIndex=0; localIndex<mCodecPriority.count(mTerminal.codeclist()); localIndex++)
{
MT::Codec::Factory& factory = mCodecPriority.codecAt(mTerminal.codeclist(), localIndex);
#if defined(USE_RESIP_INTEGRATION)
if ((pt = factory.processSdp(media.codecs(), sdpDirection)) != -1)
mAvailableCodecs.push_back(RemoteCodec(&factory, pt));
#endif
}
if (!mAvailableCodecs.size())

View File

@@ -4,13 +4,12 @@ project (media_lib)
set (CMAKE_CXX_STANDARD 11)
set (CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
# Produce PIC code always
set (CMAKE_POSITION_INDEPENDENT_CODE ON)
set (USE_RESIP_INTEGRATION CACHE BOOL FALSE "Integrate with resip structures")
file(GLOB MEDIA_LIB_SOURCES "*.cpp" "*.h")
# SRTP requires this
add_definitions(-DHAVE_STDINT_H -DHAVE_UINT64_T)
if(CMAKE_SYSTEM MATCHES "Linux*")
add_definitions(-DHAVE_NETINET_IN_H)
endif()
@@ -35,6 +34,10 @@ target_include_directories(media_lib
${CMAKE_CURRENT_SOURCE_DIR}/../../libs/srtp/crypto/include
${CMAKE_CURRENT_SOURCE_DIR}/../../libs/webrtc
${CMAKE_CURRENT_SOURCE_DIR}/../../libs/opus/include/
${CMAKE_CURRENT_SOURCE_DIR}/../../libs/resiprocate/
)
if (USE_RESIP_INTEGRATION)
target_compile_definitions(media_lib PUBLIC -DUSE_RESIP_INTEGRATION)
endif()