From 95f50d5b438b77545deebea92dcf779e3cc97e79 Mon Sep 17 00:00:00 2001 From: Dmytro Bogovych Date: Sun, 16 Oct 2022 17:08:57 +0300 Subject: [PATCH] - add primitive CI script --- run_ci.sh | 23 +++++++++ src/engine/helper/HL_Rtp.cpp | 79 ----------------------------- src/engine/helper/HL_Rtp.h | 1 - src/libs/jrtplib/src/CMakeLists.txt | 2 +- 4 files changed, 24 insertions(+), 81 deletions(-) create mode 100755 run_ci.sh diff --git a/run_ci.sh b/run_ci.sh new file mode 100755 index 00000000..5ff5277c --- /dev/null +++ b/run_ci.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +SEND_MSG="/var/ci/conformance_ci/send_telegram_message.py" + +mkdir -p build +cd build + +# Configure +cmake ../src +if [ $? -ne 0 ]; then + /usr/bin/python3 $SEND_MSG "rtphone cmake failed. $BUILD_URL" + exit 1 +fi + +# Build +make -j2 + +if [ $? -ne 0 ]; then + /usr/bin/python3 $SEND_MSG "rtphone build failed. $BUILD_URL" + exit 1 +fi + +/usr/bin/python3 $SEND_MSG "rtphone builds ok. $BUILD_URL" diff --git a/src/engine/helper/HL_Rtp.cpp b/src/engine/helper/HL_Rtp.cpp index f0cdd252..000d9b92 100644 --- a/src/engine/helper/HL_Rtp.cpp +++ b/src/engine/helper/HL_Rtp.cpp @@ -184,82 +184,3 @@ void RtpDump::flush() } #endif - -#ifndef EXTERNAL_MEDIA_STREAM_ID -// -------------- MediaStreamId -------------------- -bool MediaStreamId::operator < (const MediaStreamId& right) const -{ - if (mSsrcIsId) - return std::tie(mSSRC, mSource, mDestination) < std::tie(right.mSSRC, right.mSource, right.mDestination); - else - return std::tie(mSource, mDestination) < std::tie(right.mSource, right.mDestination); - -} - -bool MediaStreamId::operator == (const MediaStreamId& right) const -{ - if (mSsrcIsId) - return std::tie(mSSRC, mSource, mDestination) == std::tie(right.mSSRC, right.mSource, right.mDestination); - else - return std::tie(mSource, mDestination) == std::tie(right.mSource, right.mDestination); -} - -std::string MediaStreamId::toString() const -{ - std::ostringstream oss; - oss << "src: " << mSource.toStdString() << - " dst: " << mDestination.toStdString() << - " ssrc: " << StringHelper::toHex(mSSRC); - return oss.str(); -} - - -void writeToJson(const MediaStreamId& id, std::ostringstream& oss) -{ - oss << " \"src\": \"" << id.mSource.toStdString() << "\"," << std::endl - << " \"dst\": \"" << id.mDestination.toStdString() << "\"," << std::endl - << " \"ssrc\": \"" << StringHelper::toHex(id.mSSRC) << "\"," << std::endl -#if !defined(USE_NULL_UUID) - << " \"link_id\": \"" << id.mLinkId.toString() << "\"" << std::endl -#endif - ; -} - -std::string MediaStreamId::getDetectDescription() const -{ - std::ostringstream oss; - oss << "{\"event\": \"stream_detected\"," << std::endl; - writeToJson(*this, oss); - oss << "}"; - - return oss.str(); -} - -std::string MediaStreamId::getFinishDescription() const -{ - std::ostringstream oss; - oss << "{" << std::endl - << " \"event\": \"stream_finished\", " << std::endl; - writeToJson(*this, oss); - oss << "}"; - - return oss.str(); -} - -MediaStreamId& MediaStreamId::operator = (const MediaStreamId& src) -{ - this->mDestination = src.mDestination; - this->mSource = src.mSource; - this->mLinkId = src.mLinkId; - this->mSSRC = src.mSSRC; - this->mSsrcIsId = src.mSsrcIsId; - - return *this; -} - -std::ostream& operator << (std::ostream& output, const MediaStreamId& id) -{ - return (output << id.toString()); -} -#endif - diff --git a/src/engine/helper/HL_Rtp.h b/src/engine/helper/HL_Rtp.h index bee1918e..30aee94c 100644 --- a/src/engine/helper/HL_Rtp.h +++ b/src/engine/helper/HL_Rtp.h @@ -72,5 +72,4 @@ public: }; #endif - #endif diff --git a/src/libs/jrtplib/src/CMakeLists.txt b/src/libs/jrtplib/src/CMakeLists.txt index ced840bb..e96fc82a 100644 --- a/src/libs/jrtplib/src/CMakeLists.txt +++ b/src/libs/jrtplib/src/CMakeLists.txt @@ -95,4 +95,4 @@ target_include_directories(jrtplib PUBLIC .) set_property(TARGET jrtplib PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") - +target_include_directories(jrtplib PUBLIC .)