1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Merge from 4.0release

This commit is contained in:
winlin 2022-06-15 19:21:13 +08:00
commit d525d27e64
8 changed files with 409 additions and 139 deletions

View file

@ -1,14 +1,22 @@
FROM ossrs/srs:dev AS build
ARG ARCH
FROM ${ARCH}ossrs/srs:ubuntu20 AS build
ARG BUILDPLATFORM
ARG TARGETPLATFORM
ARG JOBS=2
ARG SRS_AUTO_PACKAGER
RUN echo "BUILDPLATFORM: $BUILDPLATFORM, TARGETPLATFORM: $TARGETPLATFORM, JOBS: $JOBS, PACKAGER: ${#SRS_AUTO_PACKAGER}"
# https://serverfault.com/questions/949991/how-to-install-tzdata-on-a-ubuntu-docker-image
ENV DEBIAN_FRONTEND noninteractive
# Install depends tools.
RUN yum install -y gcc make gcc-c++ patch unzip perl git
ARG SRS_AUTO_PACKAGER
RUN apt-get update && apt-get install -y gcc make g++ patch unzip perl git
# Build and install SRS.
COPY . /srs
WORKDIR /srs/trunk
RUN ./configure --srt=on --jobs=2 && make -j2 && make install
RUN ./configure --srt=on --jobs=${JOBS} && make -j${JOBS} && make install
# All config files for SRS.
RUN cp -R conf /usr/local/srs/conf && \
@ -22,7 +30,11 @@ RUN cp -R conf /usr/local/srs/conf && \
############################################################
# dist
############################################################
FROM centos:7 AS dist
FROM ${ARCH}ubuntu:focal AS dist
ARG BUILDPLATFORM
ARG TARGETPLATFORM
RUN echo "BUILDPLATFORM: $BUILDPLATFORM, TARGETPLATFORM: $TARGETPLATFORM"
# Expose ports for streaming @see https://github.com/ossrs/srs#ports
EXPOSE 1935 1985 8080 8000/udp 10080/udp

View file

@ -38,6 +38,7 @@ The changelog for SRS.
## SRS 4.0 Changelog
* v4.0, 2022-06-11, For [#3058](https://github.com/ossrs/srs/pull/3058): Docker: Support x86_64, armv7 and aarch64 docker image (#3058). v4.0.252
* v4.0, 2022-03-19, For [#2893](https://github.com/ossrs/srs/pull/2893): SRT: Decouple publish with play url (#2893). v4.0.251
* v4.0, 2022-03-19, Merge [#2908](https://github.com/ossrs/srs/pull/2908): SRT: url supports multiple QueryStrings (#2908). v4.0.250
* v4.0, 2022-03-17, SRT: Support debug and run with CLion. v4.0.249

View file

@ -294,6 +294,11 @@ srs_error_t SrsSignalManager::start()
sigemptyset(&sa.sa_mask);
sa.sa_flags = 0;
sigaction(SRS_SIGNAL_GRACEFULLY_QUIT, &sa, NULL);
sa.sa_handler = SrsSignalManager::sig_catcher;
sigemptyset(&sa.sa_mask);
sa.sa_flags = 0;
sigaction(SRS_SIGNAL_ASSERT_ABORT, &sa, NULL);
sa.sa_handler = SrsSignalManager::sig_catcher;
sigemptyset(&sa.sa_mask);
@ -981,6 +986,13 @@ srs_error_t SrsServer::cycle()
void SrsServer::on_signal(int signo)
{
// For signal to quit with coredump.
if (signo == SRS_SIGNAL_ASSERT_ABORT) {
srs_trace("abort with coredump, signo=%d", signo);
srs_assert(false);
return;
}
if (signo == SRS_SIGNAL_RELOAD) {
srs_trace("reload config, signo=%d", signo);
signal_reload = true;

View file

@ -9,6 +9,6 @@
#define VERSION_MAJOR 4
#define VERSION_MINOR 0
#define VERSION_REVISION 251
#define VERSION_REVISION 252
#endif

View file

@ -125,6 +125,8 @@
// The signal for srs to gracefully quit, do carefully dispose then exit.
// @see https://github.com/ossrs/srs/issues/1579
#define SRS_SIGNAL_GRACEFULLY_QUIT SIGQUIT
// The signal for SRS to abort by assert(false).
#define SRS_SIGNAL_ASSERT_ABORT SIGABRT
// The application level signals.
// Persistence the config in memory to config file.