mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
add kafka producer
This commit is contained in:
parent
b5ccc35340
commit
abb5c5ad31
12 changed files with 185 additions and 2 deletions
|
@ -94,6 +94,12 @@ else
|
|||
echo "#undef SRS_AUTO_STREAM_CASTER" >> $SRS_AUTO_HEADERS_H
|
||||
fi
|
||||
|
||||
if [ $SRS_KAFKA = YES ]; then
|
||||
echo "#define SRS_AUTO_KAFKA" >> $SRS_AUTO_HEADERS_H
|
||||
else
|
||||
echo "#undef SRS_AUTO_KAFKA" >> $SRS_AUTO_HEADERS_H
|
||||
fi
|
||||
|
||||
if [ $SRS_HTTP_API = YES ]; then
|
||||
echo "#define SRS_AUTO_HTTP_API" >> $SRS_AUTO_HEADERS_H
|
||||
else
|
||||
|
|
|
@ -27,6 +27,7 @@ SRS_STAT=RESERVED
|
|||
SRS_HTTP_CALLBACK=RESERVED
|
||||
SRS_HTTP_SERVER=RESERVED
|
||||
SRS_STREAM_CASTER=RESERVED
|
||||
SRS_KAFKA=RESERVED
|
||||
SRS_HTTP_API=RESERVED
|
||||
SRS_LIBRTMP=RESERVED
|
||||
SRS_RESEARCH=RESERVED
|
||||
|
@ -121,6 +122,7 @@ Options:
|
|||
--with-http-callback enable http hooks, build cherrypy as demo api server.
|
||||
--with-http-server enable http server to delivery http stream.
|
||||
--with-stream-caster enable stream caster to serve other stream over other protocol.
|
||||
--with-kafka enable srs kafka producer to report to kafka.
|
||||
--with-http-api enable http api, to manage SRS by http api.
|
||||
--with-ffmpeg enable transcoding tool ffmpeg.
|
||||
--with-transcode enable transcoding features.
|
||||
|
@ -145,6 +147,7 @@ Options:
|
|||
--without-http-callback disable http, http hooks callback.
|
||||
--without-http-server disable http server, use external server to delivery http stream.
|
||||
--without-stream-caster disable stream caster, only listen and serve RTMP/HTTP.
|
||||
--without-kafka disable the srs kafka producer.
|
||||
--without-http-api disable http api, only use console to manage SRS process.
|
||||
--without-ffmpeg disable the ffmpeg transcode tool feature.
|
||||
--without-transcode disable the transcoding feature.
|
||||
|
@ -232,6 +235,7 @@ function parse_user_option() {
|
|||
--with-http-callback) SRS_HTTP_CALLBACK=YES ;;
|
||||
--with-http-server) SRS_HTTP_SERVER=YES ;;
|
||||
--with-stream-caster) SRS_STREAM_CASTER=YES ;;
|
||||
--with-kafka) SRS_KAFKA=YES ;;
|
||||
--with-http-api) SRS_HTTP_API=YES ;;
|
||||
--with-librtmp) SRS_LIBRTMP=YES ;;
|
||||
--with-research) SRS_RESEARCH=YES ;;
|
||||
|
@ -256,6 +260,7 @@ function parse_user_option() {
|
|||
--without-http-callback) SRS_HTTP_CALLBACK=NO ;;
|
||||
--without-http-server) SRS_HTTP_SERVER=NO ;;
|
||||
--without-stream-caster) SRS_STREAM_CASTER=NO ;;
|
||||
--without-kafka) SRS_KAFKA=NO ;;
|
||||
--without-http-api) SRS_HTTP_API=NO ;;
|
||||
--without-librtmp) SRS_LIBRTMP=NO ;;
|
||||
--without-research) SRS_RESEARCH=NO ;;
|
||||
|
@ -390,6 +395,7 @@ function apply_user_presets() {
|
|||
SRS_HTTP_CALLBACK=NO
|
||||
SRS_HTTP_SERVER=NO
|
||||
SRS_STREAM_CASTER=NO
|
||||
SRS_KAFKA=NO
|
||||
SRS_HTTP_API=NO
|
||||
SRS_LIBRTMP=NO
|
||||
SRS_RESEARCH=NO
|
||||
|
@ -417,6 +423,7 @@ function apply_user_presets() {
|
|||
SRS_HTTP_CALLBACK=YES
|
||||
SRS_HTTP_SERVER=YES
|
||||
SRS_STREAM_CASTER=YES
|
||||
SRS_KAFKA=YES
|
||||
SRS_HTTP_API=YES
|
||||
SRS_LIBRTMP=YES
|
||||
SRS_RESEARCH=YES
|
||||
|
@ -444,6 +451,7 @@ function apply_user_presets() {
|
|||
SRS_HTTP_CALLBACK=NO
|
||||
SRS_HTTP_SERVER=NO
|
||||
SRS_STREAM_CASTER=NO
|
||||
SRS_KAFKA=NO
|
||||
SRS_HTTP_API=NO
|
||||
SRS_LIBRTMP=NO
|
||||
SRS_RESEARCH=NO
|
||||
|
@ -471,6 +479,7 @@ function apply_user_presets() {
|
|||
SRS_HTTP_CALLBACK=NO
|
||||
SRS_HTTP_SERVER=NO
|
||||
SRS_STREAM_CASTER=NO
|
||||
SRS_KAFKA=NO
|
||||
SRS_HTTP_API=NO
|
||||
SRS_LIBRTMP=NO
|
||||
SRS_RESEARCH=NO
|
||||
|
@ -498,6 +507,7 @@ function apply_user_presets() {
|
|||
SRS_HTTP_CALLBACK=NO
|
||||
SRS_HTTP_SERVER=NO
|
||||
SRS_STREAM_CASTER=NO
|
||||
SRS_KAFKA=NO
|
||||
SRS_HTTP_API=NO
|
||||
SRS_LIBRTMP=NO
|
||||
SRS_RESEARCH=NO
|
||||
|
@ -525,6 +535,7 @@ function apply_user_presets() {
|
|||
SRS_HTTP_CALLBACK=YES
|
||||
SRS_HTTP_SERVER=YES
|
||||
SRS_STREAM_CASTER=NO
|
||||
SRS_KAFKA=YES
|
||||
SRS_HTTP_API=YES
|
||||
SRS_LIBRTMP=YES
|
||||
SRS_RESEARCH=NO
|
||||
|
@ -553,6 +564,7 @@ function apply_user_presets() {
|
|||
SRS_HTTP_CALLBACK=YES
|
||||
SRS_HTTP_SERVER=YES
|
||||
SRS_STREAM_CASTER=NO
|
||||
SRS_KAFKA=YES
|
||||
SRS_HTTP_API=YES
|
||||
SRS_LIBRTMP=YES
|
||||
SRS_RESEARCH=NO
|
||||
|
@ -580,6 +592,7 @@ function apply_user_presets() {
|
|||
SRS_HTTP_CALLBACK=YES
|
||||
SRS_HTTP_SERVER=YES
|
||||
SRS_STREAM_CASTER=NO
|
||||
SRS_KAFKA=YES
|
||||
SRS_HTTP_API=YES
|
||||
SRS_LIBRTMP=YES
|
||||
SRS_RESEARCH=NO
|
||||
|
@ -607,6 +620,7 @@ function apply_user_presets() {
|
|||
SRS_HTTP_CALLBACK=YES
|
||||
SRS_HTTP_SERVER=YES
|
||||
SRS_STREAM_CASTER=NO
|
||||
SRS_KAFKA=YES
|
||||
SRS_HTTP_API=YES
|
||||
SRS_LIBRTMP=YES
|
||||
SRS_RESEARCH=NO
|
||||
|
@ -634,6 +648,7 @@ function apply_user_presets() {
|
|||
SRS_HTTP_CALLBACK=YES
|
||||
SRS_HTTP_SERVER=YES
|
||||
SRS_STREAM_CASTER=NO
|
||||
SRS_KAFKA=YES
|
||||
SRS_HTTP_API=YES
|
||||
SRS_LIBRTMP=YES
|
||||
SRS_RESEARCH=YES
|
||||
|
@ -661,6 +676,7 @@ function apply_user_presets() {
|
|||
SRS_HTTP_CALLBACK=YES
|
||||
SRS_HTTP_SERVER=YES
|
||||
SRS_STREAM_CASTER=NO
|
||||
SRS_KAFKA=YES
|
||||
SRS_HTTP_API=YES
|
||||
SRS_LIBRTMP=NO
|
||||
SRS_RESEARCH=NO
|
||||
|
@ -688,6 +704,7 @@ function apply_user_presets() {
|
|||
SRS_HTTP_CALLBACK=YES
|
||||
SRS_HTTP_SERVER=YES
|
||||
SRS_STREAM_CASTER=NO
|
||||
SRS_KAFKA=YES
|
||||
SRS_HTTP_API=YES
|
||||
SRS_LIBRTMP=YES
|
||||
SRS_RESEARCH=NO
|
||||
|
@ -715,6 +732,7 @@ function apply_user_presets() {
|
|||
SRS_HTTP_CALLBACK=YES
|
||||
SRS_HTTP_SERVER=YES
|
||||
SRS_STREAM_CASTER=NO
|
||||
SRS_KAFKA=YES
|
||||
SRS_HTTP_API=YES
|
||||
SRS_LIBRTMP=YES
|
||||
SRS_RESEARCH=NO
|
||||
|
@ -742,6 +760,7 @@ function apply_user_presets() {
|
|||
SRS_HTTP_CALLBACK=YES
|
||||
SRS_HTTP_SERVER=YES
|
||||
SRS_STREAM_CASTER=NO
|
||||
SRS_KAFKA=YES
|
||||
SRS_HTTP_API=YES
|
||||
SRS_LIBRTMP=YES
|
||||
SRS_RESEARCH=NO
|
||||
|
@ -804,6 +823,7 @@ function apply_user_detail_options() {
|
|||
SRS_HTTP_CALLBACK=NO
|
||||
SRS_HTTP_SERVER=NO
|
||||
SRS_STREAM_CASTER=NO
|
||||
SRS_KAFKA=NO
|
||||
SRS_HTTP_API=NO
|
||||
SRS_LIBRTMP=YES
|
||||
SRS_RESEARCH=YES
|
||||
|
@ -835,6 +855,7 @@ SRS_AUTO_CONFIGURE="--prefix=${SRS_PREFIX}"
|
|||
if [ $SRS_HTTP_CALLBACK = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-http-callback"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-http-callback"; fi
|
||||
if [ $SRS_HTTP_SERVER = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-http-server"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-http-server"; fi
|
||||
if [ $SRS_STREAM_CASTER = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-stream-caster"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-stream-caster"; fi
|
||||
if [ $SRS_KAFKA = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-kafka"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-kafka"; fi
|
||||
if [ $SRS_HTTP_API = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-http-api"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-http-api"; fi
|
||||
if [ $SRS_LIBRTMP = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-librtmp"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-librtmp"; fi
|
||||
if [ $SRS_RESEARCH = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-research"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-research"; fi
|
||||
|
@ -912,6 +933,7 @@ function check_option_conflicts() {
|
|||
if [ $SRS_HTTP_CALLBACK = RESERVED ]; then echo "you must specifies the http-callback, see: ./configure --help"; __check_ok=NO; fi
|
||||
if [ $SRS_HTTP_SERVER = RESERVED ]; then echo "you must specifies the http-server, see: ./configure --help"; __check_ok=NO; fi
|
||||
if [ $SRS_STREAM_CASTER = RESERVED ]; then echo "you must specifies the stream-caster, see: ./configure --help"; __check_ok=NO; fi
|
||||
if [ $SRS_KAFKA = RESERVED ]; then echo "you must specifies the kafka, see: ./configure --help"; __check_ok=NO; fi
|
||||
if [ $SRS_HTTP_API = RESERVED ]; then echo "you must specifies the http-api, see: ./configure --help"; __check_ok=NO; fi
|
||||
if [ $SRS_LIBRTMP = RESERVED ]; then echo "you must specifies the librtmp, see: ./configure --help"; __check_ok=NO; fi
|
||||
if [ $SRS_RESEARCH = RESERVED ]; then echo "you must specifies the research, see: ./configure --help"; __check_ok=NO; fi
|
||||
|
|
|
@ -12,6 +12,7 @@ SrsHttpCallbackSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_HTTP_CALLBACK = Y
|
|||
SrsHttpServerSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_HTTP_SERVER = YES ]; then SrsHttpServerSummaryColor="\${GREEN}"; fi
|
||||
SrsHttpApiSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_HTTP_API = YES ]; then SrsHttpApiSummaryColor="\${GREEN}"; fi
|
||||
SrsStreamCasterSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_STREAM_CASTER = YES ]; then SrsStreamCasterSummaryColor="\${GREEN}"; fi
|
||||
SrsKafkaSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_KAFKA = YES ]; then SrsKafkaSummaryColor="\${GREEN}"; fi
|
||||
SrsLibrtmpSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_LIBRTMP = YES ]; then SrsLibrtmpSummaryColor="\${GREEN}"; fi
|
||||
SrsLibrtmpSSLSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_LIBRTMP = YES ]; then if [ $SRS_SSL = YES ]; then SrsLibrtmpSSLSummaryColor="\${GREEN}"; fi fi
|
||||
SrsResearchSummaryColor="\${GREEN}{disabled} "; if [ $SRS_RESEARCH = YES ]; then SrsResearchSummaryColor="\${GREEN}"; fi
|
||||
|
@ -101,6 +102,8 @@ echo -e " | ${SrsHttpApiSummaryColor}http-api @see: https://github.com/s
|
|||
echo -e " | ${SrsHttpApiSummaryColor}http-api: support http api to manage server\${BLACK}"
|
||||
echo -e " | ${SrsStreamCasterSummaryColor}stream-caster @see: https://github.com/simple-rtmp-server/srs/wiki/v2_CN_Streamer\${BLACK}"
|
||||
echo -e " | ${SrsStreamCasterSummaryColor}stream-caster: start server to cast stream over other protocols.\${BLACK}"
|
||||
echo -e " | ${SrsKafkaSummaryColor}kafka @see: https://github.com/simple-rtmp-server/srs/wiki/v3_CN_Kafka\${BLACK}"
|
||||
echo -e " | ${SrsKafkaSummaryColor}kafka: start srs kafka producer to report to kafka.\${BLACK}"
|
||||
echo -e " \${BLACK}+------------------------------------------------------------------------------------\${BLACK}"
|
||||
echo -e "\${GREEN}binaries @see: https://github.com/simple-rtmp-server/srs/wiki/v2_CN_Build\${BLACK}"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue