- add primitive CI script
This commit is contained in:
parent
691501c405
commit
95f50d5b43
|
|
@ -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"
|
||||||
|
|
@ -184,82 +184,3 @@ void RtpDump::flush()
|
||||||
}
|
}
|
||||||
#endif
|
#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
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -72,5 +72,4 @@ public:
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -95,4 +95,4 @@ target_include_directories(jrtplib PUBLIC .)
|
||||||
|
|
||||||
set_property(TARGET jrtplib PROPERTY
|
set_property(TARGET jrtplib PROPERTY
|
||||||
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||||
|
target_include_directories(jrtplib PUBLIC .)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue