diff --git a/core/AmSession.cpp b/core/AmSession.cpp index da43b5b5..4ef51f84 100644 --- a/core/AmSession.cpp +++ b/core/AmSession.cpp @@ -393,6 +393,13 @@ void AmSession::on_stop() clearAudio(); } +void AmSession::setStopped(bool wakeup) { + sess_stopped.set(true); + if (wakeup) + AmSessionContainer::instance()->postEvent(getLocalTag(), + new AmEvent(0)); +} + void AmSession::destroy() { DBG("AmSession::destroy()\n"); diff --git a/core/AmSession.h b/core/AmSession.h index 8bf39a27..f0351d48 100644 --- a/core/AmSession.h +++ b/core/AmSession.h @@ -310,8 +310,10 @@ public: * Signals the session it should stop. * This will cause the session to be able * to exit the main loop. + * If wakeup is set, a bogus event will + * be sent to wake up the session. */ - void setStopped() { sess_stopped.set(true); } + void setStopped(bool wakeup = false); /** * Has the session already been stopped ? diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt new file mode 100644 index 00000000..8f4cc7e6 --- /dev/null +++ b/core/CMakeLists.txt @@ -0,0 +1,60 @@ + +set (sems_SRCS + AmAdvancedAudio.cpp + AmApi.cpp + AmArg.cpp + AmAudio.cpp + AmAudioFile.cpp + AmAudioMixIn.cpp + AmB2ABSession.cpp + AmB2BSession.cpp + AmBufferedAudio.cpp + AmCachedAudioFile.cpp + AmCallWatcher.cpp + AmConferenceChannel.cpp + AmConferenceStatus.cpp + AmConfig.cpp + AmConfigReader.cpp + AmDtmfDetector.cpp + AmEvent.cpp + AmEventDispatcher.cpp + AmEventQueue.cpp + AmIcmpWatcher.cpp + AmJitterBuffer.cpp + AmMediaProcessor.cpp + AmMultiPartyMixer.cpp + AmPlaylist.cpp + AmPlayoutBuffer.cpp + AmPlugIn.cpp + AmPrecodedFile.cpp + AmPromptCollection.cpp + AmRingTone.cpp + AmRtpAudio.cpp + AmRtpPacket.cpp + AmRtpReceiver.cpp + AmRtpStream.cpp + AmSdp.cpp + AmServer.cpp + AmSession.cpp + AmSessionContainer.cpp + AmSipDialog.cpp + AmSipDispatcher.cpp + AmSipMsg.cpp + AmThread.cpp + AmUAC.cpp + AmUtils.cpp + AmZRTP.cpp + LowcFE.cpp + log.cpp + sems.cpp +) + +include_directories (${SEMS_SOURCE_DIR}/core/ampi) +include_directories (${SEMS_SOURCE_DIR}/core/amci) + +configure_file( config.h.cmake ${SEMS_SOURCE_DIR}/core/config.h ) + +add_executable (sems ${sems_SRCS}) +target_link_libraries(sems ${CMAKE_DL_LIBS} pthread stdc++ m) + +add_subdirectory (plug-in) diff --git a/core/plug-in/CMakeLists.txt b/core/plug-in/CMakeLists.txt new file mode 100644 index 00000000..f419ae7c --- /dev/null +++ b/core/plug-in/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory (wav) diff --git a/core/plug-in/wav/CMakeLists.txt b/core/plug-in/wav/CMakeLists.txt new file mode 100644 index 00000000..c08706a4 --- /dev/null +++ b/core/plug-in/wav/CMakeLists.txt @@ -0,0 +1,11 @@ +set (wav_SRCS + g711.c + wav.c + wav_hdr.c +) + +add_library(wav SHARED ${wav_SRCS}) +set_target_properties(wav PROPERTIES OUTPUT_NAME "wav") +set_target_properties(wav PROPERTIES PREFIX "") +target_link_libraries(wav ${CMAKE_DL_LIBS} pthread stdc++ m) +