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

Tools: Remove srs-librtmp

This commit is contained in:
winlin 2021-05-20 18:52:21 +08:00
parent 3fb6433c9e
commit af04285baa
15 changed files with 14 additions and 73 deletions

View file

@ -39,11 +39,6 @@ function srs_undefine_macro()
echo "#define ${macro}_BOOL false" >> $file echo "#define ${macro}_BOOL false" >> $file
} }
# export the preset.
echo "#undef SRS_EXPORT_LIBRTMP" >> $SRS_AUTO_HEADERS_H
echo "" >> $SRS_AUTO_HEADERS_H
##################################################################################### #####################################################################################
# generate auto headers file, depends on the finished of options.sh # generate auto headers file, depends on the finished of options.sh
##################################################################################### #####################################################################################

View file

@ -349,6 +349,13 @@ function parse_user_option() {
--without-mips-ubuntu12) SRS_CROSS_BUILD=NO ;; --without-mips-ubuntu12) SRS_CROSS_BUILD=NO ;;
--mips-ubuntu12) if [[ $value == off ]]; then SRS_CROSS_BUILD=NO; else SRS_CROSS_BUILD=YES; fi ;; --mips-ubuntu12) if [[ $value == off ]]; then SRS_CROSS_BUILD=NO; else SRS_CROSS_BUILD=YES; fi ;;
# Removed features.
--export-librtmp-project) SRS_EXPORT_LIBRTMP_PROJECT=${value} ;;
--export-librtmp-single) SRS_EXPORT_LIBRTMP_SINGLE=${value} ;;
--with-librtmp) SRS_LIBRTMP=YES ;;
--without-librtmp) SRS_LIBRTMP=NO ;;
--librtmp) if [[ $value == off ]]; then SRS_LIBRTMP=NO; else SRS_LIBRTMP=YES; fi ;;
# Deprecated, might be removed in future. # Deprecated, might be removed in future.
--with-nginx) SRS_NGINX=YES ;; --with-nginx) SRS_NGINX=YES ;;
--without-nginx) SRS_NGINX=NO ;; --without-nginx) SRS_NGINX=NO ;;
@ -356,11 +363,6 @@ function parse_user_option() {
--with-ffmpeg) SRS_FFMPEG_TOOL=YES ;; --with-ffmpeg) SRS_FFMPEG_TOOL=YES ;;
--without-ffmpeg) SRS_FFMPEG_TOOL=NO ;; --without-ffmpeg) SRS_FFMPEG_TOOL=NO ;;
--ffmpeg-tool) if [[ $value == off ]]; then SRS_FFMPEG_TOOL=NO; else SRS_FFMPEG_TOOL=YES; fi ;; --ffmpeg-tool) if [[ $value == off ]]; then SRS_FFMPEG_TOOL=NO; else SRS_FFMPEG_TOOL=YES; fi ;;
--export-librtmp-project) SRS_EXPORT_LIBRTMP_PROJECT=${value} ;;
--export-librtmp-single) SRS_EXPORT_LIBRTMP_SINGLE=${value} ;;
--with-librtmp) SRS_LIBRTMP=YES ;;
--without-librtmp) SRS_LIBRTMP=NO ;;
--librtmp) if [[ $value == off ]]; then SRS_LIBRTMP=NO; else SRS_LIBRTMP=YES; fi ;;
# Ignore the options. # Ignore the options.
--demo) echo "Ignore $option" ;; --demo) echo "Ignore $option" ;;
@ -476,19 +478,16 @@ function apply_detail_options() {
# if specified export single file, export project first. # if specified export single file, export project first.
if [ $SRS_EXPORT_LIBRTMP_SINGLE != NO ]; then if [ $SRS_EXPORT_LIBRTMP_SINGLE != NO ]; then
echo "Warning: Ingore --export-librtmp-single" echo "Error: srs-librtmp is removed, please read https://github.com/ossrs/srs-librtmp/issues/32"; exit 1
SRS_EXPORT_LIBRTMP_SINGLE=NO
fi fi
# disable almost all features for export srs-librtmp. # disable almost all features for export srs-librtmp.
if [ $SRS_EXPORT_LIBRTMP_PROJECT != NO ]; then if [ $SRS_EXPORT_LIBRTMP_PROJECT != NO ]; then
echo "Warning: Ingore --export-librtmp-project" echo "Error: srs-librtmp is removed, please read https://github.com/ossrs/srs-librtmp/issues/32"; exit 1
SRS_EXPORT_LIBRTMP_PROJECT=NO
fi fi
if [[ $SRS_LIBRTMP != NO ]]; then if [[ $SRS_LIBRTMP != NO ]]; then
echo "Warning: Ingore --librtmp" echo "Error: srs-librtmp is removed, please read https://github.com/ossrs/srs-librtmp/issues/32"; exit 1
SRS_LIBRTMP=NO
fi fi
if [[ $SRS_RESEARCH != NO ]]; then if [[ $SRS_RESEARCH != NO ]]; then

View file

@ -23,8 +23,6 @@
#include <srs_app_gb28181_stack.hpp> #include <srs_app_gb28181_stack.hpp>
#if !defined(SRS_EXPORT_LIBRTMP)
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <iostream> #include <iostream>
@ -1457,5 +1455,3 @@ void SrsSipStack::req_ptz(std::stringstream& ss, SrsSipRequest *req, uint8_t cmd
} }
#endif

View file

@ -26,8 +26,6 @@
#include <srs_core.hpp> #include <srs_core.hpp>
#if !defined(SRS_EXPORT_LIBRTMP)
#include <string> #include <string>
#include <sstream> #include <sstream>
#include <vector> #include <vector>
@ -185,5 +183,3 @@ public:
#endif #endif
#endif

View file

@ -98,14 +98,11 @@
} \ } \
(void)0 (void)0
// For librtmp, it is pure c++ and supports all OS.
#ifndef SRS_EXPORT_LIBRTMP
// Checking for st(state-threads), only support the following cpus: i386/amd64/x86_64/arm // Checking for st(state-threads), only support the following cpus: i386/amd64/x86_64/arm
// @reamrk To patch ST for arm, read https://github.com/ossrs/state-threads/issues/1 // @reamrk To patch ST for arm, read https://github.com/ossrs/state-threads/issues/1
#if !defined(__amd64__) && !defined(__x86_64__) && !defined(__i386__) && !defined(__arm__) && !defined(__aarch64__) #if !defined(__amd64__) && !defined(__x86_64__) && !defined(__i386__) && !defined(__arm__) && !defined(__aarch64__)
#error "only support i386/amd64/x86_64/arm cpu" #error "only support i386/amd64/x86_64/arm cpu"
#endif #endif
#endif
// Error predefined for all modules. // Error predefined for all modules.
class SrsCplxError; class SrsCplxError;

View file

@ -23,8 +23,6 @@
#include <srs_kernel_aac.hpp> #include <srs_kernel_aac.hpp>
#if !defined(SRS_EXPORT_LIBRTMP)
// for srs-librtmp, @see https://github.com/ossrs/srs/issues/213 // for srs-librtmp, @see https://github.com/ossrs/srs/issues/213
#ifndef _WIN32 #ifndef _WIN32
#include <unistd.h> #include <unistd.h>
@ -202,5 +200,3 @@ srs_error_t SrsAacTransmuxer::write_audio(int64_t timestamp, char* data, int siz
return err; return err;
} }
#endif

View file

@ -26,8 +26,6 @@
#include <srs_core.hpp> #include <srs_core.hpp>
#if !defined(SRS_EXPORT_LIBRTMP)
#include <string> #include <string>
#include <srs_kernel_codec.hpp> #include <srs_kernel_codec.hpp>
@ -61,5 +59,3 @@ public:
#endif #endif
#endif

View file

@ -23,8 +23,6 @@
#include <srs_kernel_mp3.hpp> #include <srs_kernel_mp3.hpp>
#if !defined(SRS_EXPORT_LIBRTMP)
// for srs-librtmp, @see https://github.com/ossrs/srs/issues/213 // for srs-librtmp, @see https://github.com/ossrs/srs/issues/213
#ifndef _WIN32 #ifndef _WIN32
#include <unistd.h> #include <unistd.h>
@ -126,5 +124,3 @@ srs_error_t SrsMp3Transmuxer::write_audio(int64_t timestamp, char* data, int siz
return err; return err;
} }
#endif

View file

@ -26,8 +26,6 @@
#include <srs_core.hpp> #include <srs_core.hpp>
#if !defined(SRS_EXPORT_LIBRTMP)
#include <string> #include <string>
class SrsBuffer; class SrsBuffer;
@ -65,5 +63,3 @@ public:
#endif #endif
#endif

View file

@ -23,8 +23,6 @@
#include <srs_kernel_ts.hpp> #include <srs_kernel_ts.hpp>
#if !defined(SRS_EXPORT_LIBRTMP)
// for srs-librtmp, @see https://github.com/ossrs/srs/issues/213 // for srs-librtmp, @see https://github.com/ossrs/srs/issues/213
#ifndef _WIN32 #ifndef _WIN32
#include <unistd.h> #include <unistd.h>
@ -3174,5 +3172,3 @@ srs_error_t SrsTsTransmuxer::flush_video()
return err; return err;
} }
#endif

View file

@ -26,8 +26,6 @@
#include <srs_core.hpp> #include <srs_core.hpp>
#if !defined(SRS_EXPORT_LIBRTMP)
#include <string> #include <string>
#include <map> #include <map>
#include <vector> #include <vector>
@ -1350,5 +1348,3 @@ private:
#endif #endif
#endif

View file

@ -23,8 +23,6 @@
#include <srs_http_stack.hpp> #include <srs_http_stack.hpp>
#if !defined(SRS_EXPORT_LIBRTMP)
#include <stdlib.h> #include <stdlib.h>
#include <sstream> #include <sstream>
#include <algorithm> #include <algorithm>
@ -1346,9 +1344,6 @@ srs_error_t SrsHttpUri::path_unescape(std::string s, std::string& value)
return unescapse(s, value, encodePathSegment); return unescapse(s, value, encodePathSegment);
} }
// For #if !defined(SRS_EXPORT_LIBRTMP)
#endif
// LCOV_EXCL_START // LCOV_EXCL_START
///////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////

View file

@ -28,8 +28,6 @@
#include <srs_kernel_io.hpp> #include <srs_kernel_io.hpp>
#if !defined(SRS_EXPORT_LIBRTMP)
#include <map> #include <map>
#include <string> #include <string>
#include <vector> #include <vector>
@ -549,9 +547,6 @@ public:
static srs_error_t path_unescape(std::string s, std::string& value); static srs_error_t path_unescape(std::string s, std::string& value);
}; };
// For #if !defined(SRS_EXPORT_LIBRTMP)
#endif
// For #ifndef SRS_PROTOCOL_HTTP_HPP // For #ifndef SRS_PROTOCOL_HTTP_HPP
#endif #endif

View file

@ -23,8 +23,6 @@
#include <srs_rtsp_stack.hpp> #include <srs_rtsp_stack.hpp>
#if !defined(SRS_EXPORT_LIBRTMP)
#include <stdlib.h> #include <stdlib.h>
#include <map> #include <map>
using namespace std; using namespace std;
@ -1100,5 +1098,3 @@ srs_error_t SrsRtspStack::recv_token(std::string& token, SrsRtspTokenState& stat
return err; return err;
} }
#endif

View file

@ -26,8 +26,6 @@
#include <srs_core.hpp> #include <srs_core.hpp>
#if !defined(SRS_EXPORT_LIBRTMP)
#include <string> #include <string>
#include <sstream> #include <sstream>
@ -578,5 +576,3 @@ private:
#endif #endif
#endif