AI: Always enable SRT protocol. v7.0.69 (#4460)
Co-authored-by: OSSRS-AI <winlinam@gmail.com>
This commit is contained in:
parent
32dfed43ef
commit
3ca4f0a068
|
|
@ -50,11 +50,7 @@ else
|
|||
srs_undefine_macro "SRS_HDS" $SRS_AUTO_HEADERS_H
|
||||
fi
|
||||
|
||||
if [[ $SRS_SRT == YES ]]; then
|
||||
srs_define_macro "SRS_SRT" $SRS_AUTO_HEADERS_H
|
||||
else
|
||||
srs_undefine_macro "SRS_SRT" $SRS_AUTO_HEADERS_H
|
||||
fi
|
||||
srs_define_macro "SRS_SRT" $SRS_AUTO_HEADERS_H
|
||||
|
||||
if [[ $SRS_CXX11 == YES ]]; then
|
||||
srs_define_macro "SRS_CXX11" $SRS_AUTO_HEADERS_H
|
||||
|
|
|
|||
|
|
@ -680,10 +680,10 @@ fi
|
|||
#####################################################################################
|
||||
# SRT module, https://github.com/ossrs/srs/issues/1147#issuecomment-577469119
|
||||
#####################################################################################
|
||||
if [[ $SRS_SRT == YES && $SRS_USE_SYS_SRT == YES ]]; then
|
||||
if [[ $SRS_USE_SYS_SRT == YES ]]; then
|
||||
echo "Warning: Use system libsrt, without compiling srt."
|
||||
fi
|
||||
if [[ $SRS_SRT == YES && $SRS_USE_SYS_SRT == NO ]]; then
|
||||
if [[ $SRS_USE_SYS_SRT == NO ]]; then
|
||||
# Always disable c++11 for libsrt, because only the srt-app requres it.
|
||||
LIBSRT_OPTIONS="--enable-apps=0 --enable-static=1 --enable-c++11=0"
|
||||
CMAKE_VERSION=$(cmake --version | head -n1 | cut -d' ' -f3)
|
||||
|
|
|
|||
|
|
@ -575,6 +575,12 @@ function apply_auto_options() {
|
|||
SRS_RTC=YES
|
||||
fi
|
||||
|
||||
# Force enable SRT always - SRT support is required
|
||||
if [[ $SRS_SRT != YES ]]; then
|
||||
echo "Warning: SRT support is always enabled. Forcing SRT mode."
|
||||
SRS_SRT=YES
|
||||
fi
|
||||
|
||||
if [[ $SRS_SRTP_ASM == YES && $SRS_NASM == NO ]]; then
|
||||
echo "Disable SRTP-ASM, because NASM is disabled."
|
||||
SRS_SRTP_ASM=NO
|
||||
|
|
|
|||
68
trunk/configure
vendored
68
trunk/configure
vendored
|
|
@ -178,16 +178,14 @@ if [[ $SRS_GPERF_MD == YES ]]; then
|
|||
LibGperfFile="${SRS_OBJS}/gperf/lib/libtcmalloc_debug.a";
|
||||
fi
|
||||
|
||||
# srt code path
|
||||
if [[ $SRS_SRT == YES ]]; then
|
||||
LibSRTRoot="${SRS_OBJS}/srt/include"; LibSRTfile="${SRS_OBJS}/srt/lib/libsrt.a"
|
||||
if [[ $SRS_SHARED_SRT == YES ]]; then LibSRTfile="-L${SRS_OBJS}/srt/lib -lsrt"; fi
|
||||
if [[ $SRS_USE_SYS_SRT == YES ]]; then
|
||||
LibSRTRoot=""; LibSRTfile="libsrt.a"
|
||||
if [[ $SRS_SHARED_SRT == YES ]]; then
|
||||
LibSRTfile="";
|
||||
SrsLinkOptions="${SrsLinkOptions} -lsrt";
|
||||
fi
|
||||
# srt code path - always enabled
|
||||
LibSRTRoot="${SRS_OBJS}/srt/include"; LibSRTfile="${SRS_OBJS}/srt/lib/libsrt.a"
|
||||
if [[ $SRS_SHARED_SRT == YES ]]; then LibSRTfile="-L${SRS_OBJS}/srt/lib -lsrt"; fi
|
||||
if [[ $SRS_USE_SYS_SRT == YES ]]; then
|
||||
LibSRTRoot=""; LibSRTfile="libsrt.a"
|
||||
if [[ $SRS_SHARED_SRT == YES ]]; then
|
||||
LibSRTfile="";
|
||||
SrsLinkOptions="${SrsLinkOptions} -lsrt";
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
@ -266,10 +264,9 @@ MODULE_FILES=("srs_protocol_amf0" "srs_protocol_io" "srs_protocol_conn" "srs_pro
|
|||
"srs_protocol_raw_avc" "srs_protocol_http_stack" "srs_protocol_kbps" "srs_protocol_json"
|
||||
"srs_protocol_format" "srs_protocol_log" "srs_protocol_st" "srs_protocol_http_client"
|
||||
"srs_protocol_http_conn" "srs_protocol_rtmp_conn" "srs_protocol_protobuf")
|
||||
if [[ $SRS_SRT == YES ]]; then
|
||||
MODULE_FILES+=("srs_protocol_srt")
|
||||
ModuleLibIncs+=(${LibSRTRoot})
|
||||
fi
|
||||
# Always include SRT protocol
|
||||
MODULE_FILES+=("srs_protocol_srt")
|
||||
ModuleLibIncs+=(${LibSRTRoot})
|
||||
MODULE_FILES+=("srs_protocol_rtc_stun" "srs_protocol_rtp")
|
||||
if [[ $SRS_RTSP == YES ]]; then
|
||||
MODULE_FILES+=("srs_protocol_rtsp_stack")
|
||||
|
|
@ -300,9 +297,8 @@ MODULE_FILES=("srs_app_server" "srs_app_conn" "srs_app_rtmp_conn" "srs_app_sourc
|
|||
"srs_app_hourglass" "srs_app_dash" "srs_app_fragment" "srs_app_dvr"
|
||||
"srs_app_coworkers" "srs_app_circuit_breaker"
|
||||
"srs_app_stream_token")
|
||||
if [[ $SRS_SRT == YES ]]; then
|
||||
MODULE_FILES+=("srs_app_srt_server" "srs_app_srt_listener" "srs_app_srt_conn" "srs_app_srt_utility" "srs_app_srt_source")
|
||||
fi
|
||||
# Always include SRT app modules
|
||||
MODULE_FILES+=("srs_app_srt_server" "srs_app_srt_listener" "srs_app_srt_conn" "srs_app_srt_utility" "srs_app_srt_source")
|
||||
MODULE_FILES+=("srs_app_rtc_conn" "srs_app_rtc_dtls" "srs_app_rtc_sdp" "srs_app_rtc_network"
|
||||
"srs_app_rtc_queue" "srs_app_rtc_server" "srs_app_rtc_source" "srs_app_rtc_api")
|
||||
if [[ $SRS_RTSP == YES ]]; then
|
||||
|
|
@ -344,19 +340,17 @@ ModuleLibFiles=(${LibSTfile} ${LibSSLfile} ${LibGperfFile} ${LibSrtpFile})
|
|||
if [[ $SRS_FFMPEG_FIT == YES ]]; then
|
||||
ModuleLibFiles+=("${LibFfmpegFile[*]}")
|
||||
fi
|
||||
if [[ $SRS_SRT == YES ]]; then
|
||||
ModuleLibFiles+=("${LibSRTfile[*]}")
|
||||
fi
|
||||
# Always include SRT library files
|
||||
ModuleLibFiles+=("${LibSRTfile[*]}")
|
||||
# all depends objects
|
||||
MODULE_OBJS="${CORE_OBJS[@]} ${KERNEL_OBJS[@]} ${PROTOCOL_OBJS[@]} ${APP_OBJS[@]} ${SERVER_OBJS[@]}"
|
||||
ModuleLibIncs=(${SRS_OBJS} ${LibSTRoot} ${LibGperfRoot} ${LibSSLRoot} ${LibSrtpRoot})
|
||||
if [[ $SRS_FFMPEG_FIT == YES ]]; then
|
||||
ModuleLibIncs+=("${LibFfmpegRoot[*]}")
|
||||
fi
|
||||
if [[ $SRS_SRT == YES ]]; then
|
||||
ModuleLibIncs+=(${LibSRTRoot})
|
||||
MODULE_OBJS="${MODULE_OBJS} ${SRT_OBJS[@]}"
|
||||
fi
|
||||
# Always include SRT libraries
|
||||
ModuleLibIncs+=(${LibSRTRoot})
|
||||
MODULE_OBJS="${MODULE_OBJS} ${SRT_OBJS[@]}"
|
||||
LINK_OPTIONS="${LDFLAGS} ${SrsLinkOptions}${SrsGprofLink}${SrsGperfLink}"
|
||||
#
|
||||
# srs: srs(simple rtmp server) over st(state-threads)
|
||||
|
|
@ -368,9 +362,8 @@ ModuleLibFiles=(${LibSTfile} ${LibSSLfile} ${LibGperfFile} ${LibSrtpFile})
|
|||
if [[ $SRS_FFMPEG_FIT == YES ]]; then
|
||||
ModuleLibFiles+=("${LibFfmpegFile[*]}")
|
||||
fi
|
||||
if [[ $SRS_SRT == YES ]]; then
|
||||
ModuleLibFiles+=("${LibSRTfile[*]}")
|
||||
fi
|
||||
# Always include SRT library files
|
||||
ModuleLibFiles+=("${LibSRTfile[*]}")
|
||||
# For utest on mac.
|
||||
# @see https://github.com/protocolbuffers/protobuf/issues/51#issuecomment-111044468
|
||||
if [[ $SRS_OSX == YES ]]; then
|
||||
|
|
@ -385,9 +378,8 @@ if [[ $SRS_UTEST == YES ]]; then
|
|||
"srs_utest_protocol" "srs_utest_protocol2" "srs_utest_kernel2" "srs_utest_protocol3"
|
||||
"srs_utest_st" "srs_utest_rtc2" "srs_utest_rtc3" "srs_utest_fmp4" "srs_utest_source_lock"
|
||||
"srs_utest_stream_token")
|
||||
if [[ $SRS_SRT == YES ]]; then
|
||||
MODULE_FILES+=("srs_utest_srt")
|
||||
fi
|
||||
# Always include SRT utest
|
||||
MODULE_FILES+=("srs_utest_srt")
|
||||
if [[ $SRS_GB28181 == YES ]]; then
|
||||
MODULE_FILES+=("srs_utest_gb28181")
|
||||
fi
|
||||
|
|
@ -395,16 +387,14 @@ if [[ $SRS_UTEST == YES ]]; then
|
|||
if [[ $SRS_FFMPEG_FIT == YES ]]; then
|
||||
ModuleLibIncs+=("${LibFfmpegRoot[*]}")
|
||||
fi
|
||||
if [[ $SRS_SRT == YES ]]; then
|
||||
ModuleLibIncs+=("${LibSRTRoot[*]}")
|
||||
fi
|
||||
# Always include SRT library includes
|
||||
ModuleLibIncs+=("${LibSRTRoot[*]}")
|
||||
ModuleLibFiles=(${LibSTfile} ${LibSSLfile} ${LibSrtpFile})
|
||||
if [[ $SRS_FFMPEG_FIT == YES ]]; then
|
||||
ModuleLibFiles+=("${LibFfmpegFile[*]}")
|
||||
fi
|
||||
if [[ $SRS_SRT == YES ]]; then
|
||||
ModuleLibFiles+=("${LibSRTfile[*]}")
|
||||
fi
|
||||
# Always include SRT library files
|
||||
ModuleLibFiles+=("${LibSRTfile[*]}")
|
||||
MODULE_DEPENDS=("CORE" "KERNEL" "PROTOCOL" "APP")
|
||||
MODULE_OBJS="${CORE_OBJS[@]} ${KERNEL_OBJS[@]} ${PROTOCOL_OBJS[@]} ${APP_OBJS[@]} ${SRT_OBJS[@]}"
|
||||
LINK_OPTIONS="${LDFLAGS} -lpthread ${SrsLinkOptions}" MODULE_DIR="src/utest" APP_NAME="srs_utest" . $SRS_WORKDIR/auto/utest.sh
|
||||
|
|
@ -636,11 +626,7 @@ else
|
|||
echo -e "${GREEN}Warning: GB28181 is disabled.${BLACK}"
|
||||
fi
|
||||
echo -e "${GREEN}Experiment: HEVC/H.265 is enabled. https://github.com/ossrs/srs/issues/465${BLACK}"
|
||||
if [[ $SRS_SRT == YES ]]; then
|
||||
echo -e "${YELLOW}Experiment: SRT is enabled. https://github.com/ossrs/srs/issues/1147${BLACK}"
|
||||
else
|
||||
echo -e "${GREEN}Warning: SRT is disabled.${BLACK}"
|
||||
fi
|
||||
echo -e "${YELLOW}Experiment: SRT is enabled. https://github.com/ossrs/srs/issues/1147${BLACK}"
|
||||
echo -e "${YELLOW}Experiment: RTC is enabled. https://github.com/ossrs/srs/issues/307${BLACK}"
|
||||
if [[ $SRS_RTSP == YES ]]; then
|
||||
echo -e "${YELLOW}Experiment: RTSP is enabled (requires RTC).${BLACK}"
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ The changelog for SRS.
|
|||
<a name="v7-changes"></a>
|
||||
|
||||
## SRS 7.0 Changelog
|
||||
* v7.0, 2025-08-31, Merge [#4460](https://github.com/ossrs/srs/pull/4460): AI: Always enable SRT protocol. v7.0.69 (#4460)
|
||||
* v7.0, 2025-08-31, Merge [#4459](https://github.com/ossrs/srs/pull/4459): AI: Merge SRT and RTC servers into unified SrsServer. v7.0.68 (#4459)
|
||||
* v7.0, 2025-08-29, Merge [#4457](https://github.com/ossrs/srs/pull/4457): Support IPv6 for all protocols: RTMP, HTTP/HTTPS, WebRTC, SRT, RTSP. v7.0.67 (#4457)
|
||||
* v7.0, 2025-08-28, Merge [#4456](https://github.com/ossrs/srs/pull/4456): AI: Remove cloud CLS and APM. v7.0.66 (#4456)
|
||||
|
|
|
|||
|
|
@ -213,12 +213,10 @@ SrsPithyPrint::SrsPithyPrint(int _stage_id)
|
|||
// for the rtc recv
|
||||
#define SRS_CONSTS_STAGE_RTC_RECV 14
|
||||
|
||||
#ifdef SRS_SRT
|
||||
// the pithy stage for srt play clients.
|
||||
#define SRS_CONSTS_STAGE_SRT_PLAY 15
|
||||
// the pithy stage for srt publish clients.
|
||||
#define SRS_CONSTS_STAGE_SRT_PUBLISH 16
|
||||
#endif
|
||||
|
||||
SrsPithyPrint *SrsPithyPrint::create_rtmp_play()
|
||||
{
|
||||
|
|
@ -290,7 +288,6 @@ SrsPithyPrint *SrsPithyPrint::create_rtc_recv(int fd)
|
|||
return new SrsPithyPrint(fd << 16 | SRS_CONSTS_STAGE_RTC_RECV);
|
||||
}
|
||||
|
||||
#ifdef SRS_SRT
|
||||
SrsPithyPrint *SrsPithyPrint::create_srt_play()
|
||||
{
|
||||
return new SrsPithyPrint(SRS_CONSTS_STAGE_SRT_PLAY);
|
||||
|
|
@ -300,7 +297,6 @@ SrsPithyPrint *SrsPithyPrint::create_srt_publish()
|
|||
{
|
||||
return new SrsPithyPrint(SRS_CONSTS_STAGE_SRT_PUBLISH);
|
||||
}
|
||||
#endif
|
||||
|
||||
SrsPithyPrint::~SrsPithyPrint()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -139,10 +139,8 @@ public:
|
|||
// For RTC sender and receiver, we create printer for each fd.
|
||||
static SrsPithyPrint *create_rtc_send(int fd);
|
||||
static SrsPithyPrint *create_rtc_recv(int fd);
|
||||
#ifdef SRS_SRT
|
||||
static SrsPithyPrint *create_srt_play();
|
||||
static SrsPithyPrint *create_srt_publish();
|
||||
#endif
|
||||
virtual ~SrsPithyPrint();
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -1189,7 +1189,6 @@ srs_error_t SrsRtcPublishStream::initialize(ISrsRequest *r, SrsRtcSourceDescript
|
|||
}
|
||||
|
||||
// Check whether SRT stream is busy.
|
||||
#ifdef SRS_SRT
|
||||
bool srt_server_enabled = _srs_config->get_srt_enabled();
|
||||
bool srt_enabled = _srs_config->get_srt_enabled(r->vhost);
|
||||
if (srt_server_enabled && srt_enabled) {
|
||||
|
|
@ -1202,7 +1201,6 @@ srs_error_t SrsRtcPublishStream::initialize(ISrsRequest *r, SrsRtcSourceDescript
|
|||
return srs_error_new(ERROR_SYSTEM_STREAM_BUSY, "srt stream %s busy", r->get_stream_url().c_str());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Bridge to rtmp
|
||||
#if defined(SRS_FFMPEG_FIT)
|
||||
|
|
|
|||
|
|
@ -1032,7 +1032,6 @@ srs_error_t SrsRtmpConn::acquire_publish(SrsSharedPtr<SrsLiveSource> source)
|
|||
}
|
||||
|
||||
// Check whether SRT stream is busy.
|
||||
#ifdef SRS_SRT
|
||||
bool srt_server_enabled = _srs_config->get_srt_enabled();
|
||||
bool srt_enabled = _srs_config->get_srt_enabled(req->vhost);
|
||||
if (srt_server_enabled && srt_enabled && !info->edge) {
|
||||
|
|
@ -1045,7 +1044,6 @@ srs_error_t SrsRtmpConn::acquire_publish(SrsSharedPtr<SrsLiveSource> source)
|
|||
return srs_error_new(ERROR_SYSTEM_STREAM_BUSY, "srt stream %s busy", req->get_stream_url().c_str());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SRS_RTSP
|
||||
// RTSP only support viewer, so we don't need to check it.
|
||||
|
|
|
|||
|
|
@ -53,11 +53,9 @@ using namespace std;
|
|||
#ifdef SRS_GB28181
|
||||
#include <srs_app_gb28181.hpp>
|
||||
#endif
|
||||
#ifdef SRS_SRT
|
||||
#include <srs_app_srt_conn.hpp>
|
||||
#include <srs_app_srt_server.hpp>
|
||||
#include <srs_app_srt_source.hpp>
|
||||
#endif
|
||||
#ifdef SRS_RTSP
|
||||
#include <srs_app_rtsp_conn.hpp>
|
||||
#include <srs_app_rtsp_source.hpp>
|
||||
|
|
@ -293,9 +291,7 @@ srs_error_t srs_global_initialize()
|
|||
_srs_circuit_breaker = new SrsCircuitBreaker();
|
||||
_srs_hooks = new SrsHttpHooks();
|
||||
|
||||
#ifdef SRS_SRT
|
||||
_srs_srt_sources = new SrsSrtSourceManager();
|
||||
#endif
|
||||
|
||||
_srs_rtc_sources = new SrsRtcSourceManager();
|
||||
_srs_blackhole = new SrsRtcBlackhole();
|
||||
|
|
@ -810,9 +806,7 @@ void SrsServer::destroy()
|
|||
#ifdef SRS_GB28181
|
||||
srs_freep(stream_caster_gb28181_);
|
||||
#endif
|
||||
#ifdef SRS_SRT
|
||||
close_srt_listeners();
|
||||
#endif
|
||||
|
||||
// Cleanup WebRTC components
|
||||
if (true) {
|
||||
|
|
@ -851,9 +845,7 @@ void SrsServer::dispose()
|
|||
#ifdef SRS_GB28181
|
||||
stream_caster_gb28181_->close();
|
||||
#endif
|
||||
#ifdef SRS_SRT
|
||||
close_srt_listeners();
|
||||
#endif
|
||||
|
||||
// Fast stop to notify FFMPEG to quit, wait for a while then fast kill.
|
||||
ingester_->dispose();
|
||||
|
|
@ -889,9 +881,7 @@ void SrsServer::gracefully_dispose()
|
|||
#ifdef SRS_GB28181
|
||||
stream_caster_gb28181_->close();
|
||||
#endif
|
||||
#ifdef SRS_SRT
|
||||
close_srt_listeners();
|
||||
#endif
|
||||
srs_trace("listeners closed");
|
||||
|
||||
// Fast stop to notify FFMPEG to quit, wait for a while then fast kill.
|
||||
|
|
@ -929,7 +919,6 @@ srs_error_t SrsServer::initialize()
|
|||
return srs_error_wrap(err, "init server");
|
||||
}
|
||||
|
||||
#ifdef SRS_SRT
|
||||
if ((err = srs_srt_log_initialize()) != srs_success) {
|
||||
return srs_error_wrap(err, "srt log initialize");
|
||||
}
|
||||
|
|
@ -943,7 +932,6 @@ srs_error_t SrsServer::initialize()
|
|||
if ((err = _srt_eventloop->start()) != srs_success) {
|
||||
return srs_error_wrap(err, "srt poller start");
|
||||
}
|
||||
#endif
|
||||
|
||||
// Initialize WebRTC DTLS certificate
|
||||
if ((err = _srs_rtc_dtls_certificate->initialize()) != srs_success) {
|
||||
|
|
@ -1132,11 +1120,9 @@ srs_error_t SrsServer::run()
|
|||
return srs_error_wrap(err, "live sources");
|
||||
}
|
||||
|
||||
#ifdef SRS_SRT
|
||||
if ((err = _srs_srt_sources->initialize()) != srs_success) {
|
||||
return srs_error_wrap(err, "srt sources");
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((err = _srs_rtc_sources->initialize()) != srs_success) {
|
||||
return srs_error_wrap(err, "rtc sources");
|
||||
|
|
@ -1319,12 +1305,10 @@ srs_error_t SrsServer::listen()
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef SRS_SRT
|
||||
// Listen MPEG-TS over SRT.
|
||||
if ((err = listen_srt_mpegts()) != srs_success) {
|
||||
return srs_error_wrap(err, "srt mpegts listen");
|
||||
}
|
||||
#endif
|
||||
|
||||
// Listen WebRTC UDP.
|
||||
if ((err = listen_rtc_udp()) != srs_success) {
|
||||
|
|
@ -1794,13 +1778,11 @@ void SrsServer::resample_kbps()
|
|||
continue;
|
||||
}
|
||||
|
||||
#ifdef SRS_SRT
|
||||
SrsMpegtsSrtConn *srt = dynamic_cast<SrsMpegtsSrtConn *>(c);
|
||||
if (srt) {
|
||||
stat->kbps_add_delta(c->get_id().c_str(), srt->delta());
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
||||
SrsRtcConnection *rtc = dynamic_cast<SrsRtcConnection *>(c);
|
||||
if (rtc) {
|
||||
|
|
@ -1816,7 +1798,6 @@ void SrsServer::resample_kbps()
|
|||
stat->kbps_sample();
|
||||
}
|
||||
|
||||
#ifdef SRS_SRT
|
||||
srs_error_t SrsServer::listen_srt_mpegts()
|
||||
{
|
||||
srs_error_t err = srs_success;
|
||||
|
|
@ -1913,7 +1894,6 @@ srs_error_t SrsServer::srt_fd_to_resource(srs_srt_t srt_fd, ISrsResource **pr)
|
|||
|
||||
return err;
|
||||
}
|
||||
#endif
|
||||
|
||||
srs_error_t SrsServer::listen_rtc_udp()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -21,10 +21,8 @@
|
|||
#include <srs_app_st.hpp>
|
||||
#include <srs_protocol_st.hpp>
|
||||
|
||||
#ifdef SRS_SRT
|
||||
#include <srs_app_srt_listener.hpp>
|
||||
#include <srs_protocol_srt.hpp>
|
||||
#endif
|
||||
|
||||
class SrsAsyncCallWorker;
|
||||
class SrsUdpMuxListener;
|
||||
|
|
@ -194,10 +192,8 @@ private:
|
|||
// Stream Caster for GB28181.
|
||||
SrsGbListener *stream_caster_gb28181_;
|
||||
#endif
|
||||
#ifdef SRS_SRT
|
||||
// SRT acceptors for MPEG-TS over SRT.
|
||||
std::vector<SrsSrtAcceptor *> srt_acceptors_;
|
||||
#endif
|
||||
// WebRTC UDP listeners for RTC server functionality.
|
||||
std::vector<SrsUdpMuxListener *> rtc_listeners_;
|
||||
// WebRTC async call worker for non-blocking operations.
|
||||
|
|
@ -293,13 +289,11 @@ private:
|
|||
// Resample the server kbs.
|
||||
virtual void resample_kbps();
|
||||
|
||||
#ifdef SRS_SRT
|
||||
// SRT-related methods
|
||||
virtual srs_error_t listen_srt_mpegts();
|
||||
virtual void close_srt_listeners();
|
||||
virtual srs_error_t accept_srt_client(srs_srt_t srt_fd);
|
||||
virtual srs_error_t srt_fd_to_resource(srs_srt_t srt_fd, ISrsResource **pr);
|
||||
#endif
|
||||
|
||||
// WebRTC-related methods
|
||||
virtual srs_error_t listen_rtc_udp();
|
||||
|
|
|
|||
|
|
@ -15,9 +15,7 @@ using namespace std;
|
|||
#include <srs_kernel_utility.hpp>
|
||||
#include <srs_protocol_log.hpp>
|
||||
|
||||
#ifdef SRS_SRT
|
||||
SrsSrtEventLoop *_srt_eventloop = NULL;
|
||||
#endif
|
||||
|
||||
SrsSrtAcceptor::SrsSrtAcceptor(ISrsSrtClientHandler *srt_handler)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,6 +9,6 @@
|
|||
|
||||
#define VERSION_MAJOR 7
|
||||
#define VERSION_MINOR 0
|
||||
#define VERSION_REVISION 68
|
||||
#define VERSION_REVISION 69
|
||||
|
||||
#endif
|
||||
|
|
@ -111,3 +111,21 @@ srs_utime_t SrsWallClock::now()
|
|||
}
|
||||
|
||||
SrsWallClock *_srs_clock = NULL;
|
||||
|
||||
#if defined(SRS_DEBUG) && defined(SRS_DEBUG_STATS)
|
||||
SrsPps *_srs_pps_epoll = NULL;
|
||||
SrsPps *_srs_pps_epoll_zero = NULL;
|
||||
SrsPps *_srs_pps_epoll_shake = NULL;
|
||||
SrsPps *_srs_pps_epoll_spin = NULL;
|
||||
|
||||
SrsPps *_srs_pps_sched_160ms = NULL;
|
||||
SrsPps *_srs_pps_sched_s = NULL;
|
||||
SrsPps *_srs_pps_sched_15ms = NULL;
|
||||
SrsPps *_srs_pps_sched_20ms = NULL;
|
||||
SrsPps *_srs_pps_sched_25ms = NULL;
|
||||
SrsPps *_srs_pps_sched_30ms = NULL;
|
||||
SrsPps *_srs_pps_sched_35ms = NULL;
|
||||
SrsPps *_srs_pps_sched_40ms = NULL;
|
||||
SrsPps *_srs_pps_sched_80ms = NULL;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -34,20 +34,16 @@ using namespace std;
|
|||
#include <srs_app_circuit_breaker.hpp>
|
||||
#include <srs_app_config.hpp>
|
||||
#include <srs_app_log.hpp>
|
||||
#include <srs_app_rtc_conn.hpp>
|
||||
#include <srs_app_server.hpp>
|
||||
#include <srs_app_srt_server.hpp>
|
||||
#include <srs_app_utility.hpp>
|
||||
#include <srs_core_autofree.hpp>
|
||||
#include <srs_core_performance.hpp>
|
||||
#include <srs_kernel_error.hpp>
|
||||
#include <srs_kernel_file.hpp>
|
||||
#include <srs_kernel_utility.hpp>
|
||||
|
||||
#include <srs_app_rtc_conn.hpp>
|
||||
|
||||
#ifdef SRS_SRT
|
||||
#include <srs_app_srt_server.hpp>
|
||||
#include <srs_protocol_srt.hpp>
|
||||
#endif
|
||||
|
||||
// pre-declare
|
||||
srs_error_t run_directly_or_daemon();
|
||||
|
|
@ -269,7 +265,7 @@ void show_macro_features()
|
|||
ss << ", dash:" << "on";
|
||||
ss << ", hls:" << srs_strconv_format_bool(true);
|
||||
ss << ", hds:" << srs_strconv_format_bool(SRS_HDS_BOOL);
|
||||
ss << ", srt:" << srs_strconv_format_bool(SRS_SRT_BOOL);
|
||||
ss << ", srt:" << srs_strconv_format_bool(true);
|
||||
// hc(http callback)
|
||||
ss << ", hc:" << srs_strconv_format_bool(true);
|
||||
// ha(http api)
|
||||
|
|
|
|||
|
|
@ -19,10 +19,8 @@ using namespace std;
|
|||
#include <sys/mman.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef SRS_SRT
|
||||
#include <srs_app_srt_server.hpp>
|
||||
#include <srt/srt.h>
|
||||
#endif
|
||||
|
||||
// Temporary disk config.
|
||||
std::string _srs_tmp_file_prefix = "/tmp/srs-utest-";
|
||||
|
|
@ -44,13 +42,11 @@ const char *_srs_binary = NULL;
|
|||
|
||||
#include <srs_app_st.hpp>
|
||||
|
||||
#ifdef SRS_SRT
|
||||
static void srs_srt_utest_null_log_handler(void *opaque, int level, const char *file, int line,
|
||||
const char *area, const char *message)
|
||||
{
|
||||
// srt null log handler, do no print any log.
|
||||
}
|
||||
#endif
|
||||
|
||||
// Initialize global settings.
|
||||
srs_error_t prepare_main()
|
||||
|
|
@ -73,7 +69,6 @@ srs_error_t prepare_main()
|
|||
srs_freep(_srs_context);
|
||||
_srs_context = new SrsThreadContext();
|
||||
|
||||
#ifdef SRS_SRT
|
||||
if ((err = srs_srt_log_initialize()) != srs_success) {
|
||||
return srs_error_wrap(err, "srt log initialize");
|
||||
}
|
||||
|
|
@ -88,7 +83,6 @@ srs_error_t prepare_main()
|
|||
if ((err = _srt_eventloop->start()) != srs_success) {
|
||||
return srs_error_wrap(err, "srt poller start");
|
||||
}
|
||||
#endif
|
||||
|
||||
return err;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user