正在显示
8 个修改的文件
包含
63 行增加
和
34 行删除
| @@ -198,7 +198,7 @@ if [ ! -f ${SRS_OBJS}/st-1.9/obj/libst.so ]; then echo "build st-1.9 failed."; e | @@ -198,7 +198,7 @@ if [ ! -f ${SRS_OBJS}/st-1.9/obj/libst.so ]; then echo "build st-1.9 failed."; e | ||
| 198 | ##################################################################################### | 198 | ##################################################################################### |
| 199 | # http-parser-2.1 | 199 | # http-parser-2.1 |
| 200 | ##################################################################################### | 200 | ##################################################################################### |
| 201 | -if [ $SRS_HTTP = YES ]; then | 201 | +if [ $SRS_HTTP_CALLBACK = YES ]; then |
| 202 | if [[ -f ${SRS_OBJS}/http-parser-2.1/http_parser.h && -f ${SRS_OBJS}/http-parser-2.1/libhttp_parser.a ]]; then | 202 | if [[ -f ${SRS_OBJS}/http-parser-2.1/http_parser.h && -f ${SRS_OBJS}/http-parser-2.1/libhttp_parser.a ]]; then |
| 203 | echo "http-parser-2.1 is ok."; | 203 | echo "http-parser-2.1 is ok."; |
| 204 | else | 204 | else |
| @@ -284,11 +284,11 @@ fi | @@ -284,11 +284,11 @@ fi | ||
| 284 | ##################################################################################### | 284 | ##################################################################################### |
| 285 | # cherrypy for http hooks callback, CherryPy-3.2.4 | 285 | # cherrypy for http hooks callback, CherryPy-3.2.4 |
| 286 | ##################################################################################### | 286 | ##################################################################################### |
| 287 | -if [ $SRS_HTTP = YES ]; then | 287 | +if [ $SRS_HTTP_CALLBACK = YES ]; then |
| 288 | if [[ -f ${SRS_OBJS}/CherryPy-3.2.4/setup.py ]]; then | 288 | if [[ -f ${SRS_OBJS}/CherryPy-3.2.4/setup.py ]]; then |
| 289 | echo "CherryPy-3.2.4 is ok."; | 289 | echo "CherryPy-3.2.4 is ok."; |
| 290 | else | 290 | else |
| 291 | - require_sudoer "configure --with-http" | 291 | + require_sudoer "configure --with-http-callback" |
| 292 | echo "install CherryPy-3.2.4"; | 292 | echo "install CherryPy-3.2.4"; |
| 293 | ( | 293 | ( |
| 294 | sudo rm -rf ${SRS_OBJS}/CherryPy-3.2.4 && cd ${SRS_OBJS} && | 294 | sudo rm -rf ${SRS_OBJS}/CherryPy-3.2.4 && cd ${SRS_OBJS} && |
| @@ -301,10 +301,10 @@ if [ $SRS_HTTP = YES ]; then | @@ -301,10 +301,10 @@ if [ $SRS_HTTP = YES ]; then | ||
| 301 | if [ ! -f ${SRS_OBJS}/nginx/sbin/nginx ]; then echo "build CherryPy-3.2.4 failed."; exit -1; fi | 301 | if [ ! -f ${SRS_OBJS}/nginx/sbin/nginx ]; then echo "build CherryPy-3.2.4 failed."; exit -1; fi |
| 302 | fi | 302 | fi |
| 303 | 303 | ||
| 304 | -if [ $SRS_HTTP = YES ]; then | ||
| 305 | - echo "#define SRS_HTTP" >> $SRS_AUTO_HEADERS_H | 304 | +if [ $SRS_HTTP_CALLBACK = YES ]; then |
| 305 | + echo "#define SRS_HTTP_CALLBACK" >> $SRS_AUTO_HEADERS_H | ||
| 306 | else | 306 | else |
| 307 | - echo "#undef SRS_HTTP" >> $SRS_AUTO_HEADERS_H | 307 | + echo "#undef SRS_HTTP_CALLBACK" >> $SRS_AUTO_HEADERS_H |
| 308 | fi | 308 | fi |
| 309 | 309 | ||
| 310 | echo "link players to cherrypy static-dir" | 310 | echo "link players to cherrypy static-dir" |
| @@ -322,7 +322,7 @@ ln -sf `pwd`/${SRS_OBJS}/nginx/html/forward research/api-server/static-dir/forwa | @@ -322,7 +322,7 @@ ln -sf `pwd`/${SRS_OBJS}/nginx/html/forward research/api-server/static-dir/forwa | ||
| 322 | # only when the nginx is ok, | 322 | # only when the nginx is ok, |
| 323 | # if api-server not enalbed, use nginx as demo. | 323 | # if api-server not enalbed, use nginx as demo. |
| 324 | if [ $SRS_HLS = YES ]; then | 324 | if [ $SRS_HLS = YES ]; then |
| 325 | - if [ $SRS_HTTP = YES ]; then | 325 | + if [ $SRS_HTTP_CALLBACK = YES ]; then |
| 326 | # override the default index. | 326 | # override the default index. |
| 327 | rm -f ${SRS_OBJS}/nginx/html/index.html && | 327 | rm -f ${SRS_OBJS}/nginx/html/index.html && |
| 328 | ln -sf `pwd`/research/players/nginx_index.html ${SRS_OBJS}/nginx/html/index.html | 328 | ln -sf `pwd`/research/players/nginx_index.html ${SRS_OBJS}/nginx/html/index.html |
| @@ -14,7 +14,7 @@ help=no | @@ -14,7 +14,7 @@ help=no | ||
| 14 | SRS_HLS=RESERVED | 14 | SRS_HLS=RESERVED |
| 15 | SRS_SSL=RESERVED | 15 | SRS_SSL=RESERVED |
| 16 | SRS_FFMPEG=RESERVED | 16 | SRS_FFMPEG=RESERVED |
| 17 | -SRS_HTTP=RESERVED | 17 | +SRS_HTTP_CALLBACK=RESERVED |
| 18 | SRS_LIBRTMP=RESERVED # srs-librtmp | 18 | SRS_LIBRTMP=RESERVED # srs-librtmp |
| 19 | SRS_BWTC=RESERVED # srs-bandwidth-test client | 19 | SRS_BWTC=RESERVED # srs-bandwidth-test client |
| 20 | SRS_RESEARCH=RESERVED | 20 | SRS_RESEARCH=RESERVED |
| @@ -31,7 +31,7 @@ SRS_JOBS=1 | @@ -31,7 +31,7 @@ SRS_JOBS=1 | ||
| 31 | SRS_HLS=YES | 31 | SRS_HLS=YES |
| 32 | SRS_SSL=YES | 32 | SRS_SSL=YES |
| 33 | SRS_FFMPEG=YES | 33 | SRS_FFMPEG=YES |
| 34 | -SRS_HTTP=YES | 34 | +SRS_HTTP_CALLBACK=YES |
| 35 | SRS_LIBRTMP=YES | 35 | SRS_LIBRTMP=YES |
| 36 | SRS_BWTC=NO | 36 | SRS_BWTC=NO |
| 37 | SRS_RESEARCH=NO | 37 | SRS_RESEARCH=NO |
| @@ -65,7 +65,7 @@ do | @@ -65,7 +65,7 @@ do | ||
| 65 | --with-ssl) SRS_SSL=YES ;; | 65 | --with-ssl) SRS_SSL=YES ;; |
| 66 | --with-hls) SRS_HLS=YES ;; | 66 | --with-hls) SRS_HLS=YES ;; |
| 67 | --with-ffmpeg) SRS_FFMPEG=YES ;; | 67 | --with-ffmpeg) SRS_FFMPEG=YES ;; |
| 68 | - --with-http) SRS_HTTP=YES ;; | 68 | + --with-http-callback) SRS_HTTP_CALLBACK=YES ;; |
| 69 | --with-librtmp) SRS_LIBRTMP=YES ;; | 69 | --with-librtmp) SRS_LIBRTMP=YES ;; |
| 70 | --with-bwtc) SRS_BWTC=YES ;; | 70 | --with-bwtc) SRS_BWTC=YES ;; |
| 71 | --with-research) SRS_RESEARCH=YES ;; | 71 | --with-research) SRS_RESEARCH=YES ;; |
| @@ -79,7 +79,7 @@ do | @@ -79,7 +79,7 @@ do | ||
| 79 | --without-ssl) SRS_SSL=NO ;; | 79 | --without-ssl) SRS_SSL=NO ;; |
| 80 | --without-hls) SRS_HLS=NO ;; | 80 | --without-hls) SRS_HLS=NO ;; |
| 81 | --without-ffmpeg) SRS_FFMPEG=NO ;; | 81 | --without-ffmpeg) SRS_FFMPEG=NO ;; |
| 82 | - --without-http) SRS_HTTP=NO ;; | 82 | + --without-http-callback) SRS_HTTP_CALLBACK=NO ;; |
| 83 | --without-librtmp) SRS_LIBRTMP=NO ;; | 83 | --without-librtmp) SRS_LIBRTMP=NO ;; |
| 84 | --without-bwtc) SRS_BWTC=NO ;; | 84 | --without-bwtc) SRS_BWTC=NO ;; |
| 85 | --without-research) SRS_RESEARCH=NO ;; | 85 | --without-research) SRS_RESEARCH=NO ;; |
| @@ -120,7 +120,7 @@ if [ $help = yes ]; then | @@ -120,7 +120,7 @@ if [ $help = yes ]; then | ||
| 120 | --with-ssl enable rtmp complex handshake, requires openssl-devel installed. | 120 | --with-ssl enable rtmp complex handshake, requires openssl-devel installed. |
| 121 | to delivery h264 video and aac audio to flash player. | 121 | to delivery h264 video and aac audio to flash player. |
| 122 | --with-hls enable hls streaming, build nginx as http server for hls. | 122 | --with-hls enable hls streaming, build nginx as http server for hls. |
| 123 | - --with-http enable http hooks, build cherrypy as demo api server. | 123 | + --with-http-callback enable http hooks, build cherrypy as demo api server. |
| 124 | srs will call the http hooks, such as: on_connect. | 124 | srs will call the http hooks, such as: on_connect. |
| 125 | --with-ffmpeg enable transcoding with ffmpeg. | 125 | --with-ffmpeg enable transcoding with ffmpeg. |
| 126 | --with-librtmp enable srs-librtmp, library for client. | 126 | --with-librtmp enable srs-librtmp, library for client. |
| @@ -135,7 +135,7 @@ if [ $help = yes ]; then | @@ -135,7 +135,7 @@ if [ $help = yes ]; then | ||
| 135 | 135 | ||
| 136 | --without-ssl disable rtmp complex handshake. | 136 | --without-ssl disable rtmp complex handshake. |
| 137 | --without-hls disable hls, rtmp streaming only. | 137 | --without-hls disable hls, rtmp streaming only. |
| 138 | - --without-http disable http, http hooks callback. | 138 | + --without-http-callback disable http, http hooks callback. |
| 139 | --without-ffmpeg disable the ffmpeg transcoding feature. | 139 | --without-ffmpeg disable the ffmpeg transcoding feature. |
| 140 | --without-librtmp disable srs-librtmp, library for client. | 140 | --without-librtmp disable srs-librtmp, library for client. |
| 141 | --without-bwtc disable srs bandwidth test client tool. | 141 | --without-bwtc disable srs bandwidth test client tool. |
| @@ -185,7 +185,7 @@ fi fi | @@ -185,7 +185,7 @@ fi fi | ||
| 185 | if [ $SRS_HLS = RESERVED ]; then echo "you must specifies the hls, see: ./configure --help"; __check_ok=NO; fi | 185 | if [ $SRS_HLS = RESERVED ]; then echo "you must specifies the hls, see: ./configure --help"; __check_ok=NO; fi |
| 186 | if [ $SRS_SSL = RESERVED ]; then echo "you must specifies the ssl, see: ./configure --help"; __check_ok=NO; fi | 186 | if [ $SRS_SSL = RESERVED ]; then echo "you must specifies the ssl, see: ./configure --help"; __check_ok=NO; fi |
| 187 | if [ $SRS_FFMPEG = RESERVED ]; then echo "you must specifies the ffmpeg, see: ./configure --help"; __check_ok=NO; fi | 187 | if [ $SRS_FFMPEG = RESERVED ]; then echo "you must specifies the ffmpeg, see: ./configure --help"; __check_ok=NO; fi |
| 188 | -if [ $SRS_HTTP = RESERVED ]; then echo "you must specifies the http, see: ./configure --help"; __check_ok=NO; fi | 188 | +if [ $SRS_HTTP_CALLBACK = RESERVED ]; then echo "you must specifies the http, see: ./configure --help"; __check_ok=NO; fi |
| 189 | if [ $SRS_LIBRTMP = RESERVED ]; then echo "you must specifies the librtmp, see: ./configure --help"; __check_ok=NO; fi | 189 | if [ $SRS_LIBRTMP = RESERVED ]; then echo "you must specifies the librtmp, see: ./configure --help"; __check_ok=NO; fi |
| 190 | if [ $SRS_BWTC = RESERVED ]; then echo "you must specifies the bwtc, see: ./configure --help"; __check_ok=NO; fi | 190 | if [ $SRS_BWTC = RESERVED ]; then echo "you must specifies the bwtc, see: ./configure --help"; __check_ok=NO; fi |
| 191 | if [ $SRS_RESEARCH = RESERVED ]; then echo "you must specifies the research, see: ./configure --help"; __check_ok=NO; fi | 191 | if [ $SRS_RESEARCH = RESERVED ]; then echo "you must specifies the research, see: ./configure --help"; __check_ok=NO; fi |
| @@ -204,7 +204,7 @@ SRS_CONFIGURE="" | @@ -204,7 +204,7 @@ SRS_CONFIGURE="" | ||
| 204 | if [ $SRS_HLS = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-hls"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-hls"; fi | 204 | if [ $SRS_HLS = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-hls"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-hls"; fi |
| 205 | if [ $SRS_SSL = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-ssl"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-ssl"; fi | 205 | if [ $SRS_SSL = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-ssl"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-ssl"; fi |
| 206 | if [ $SRS_FFMPEG = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-ffmpeg"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-ffmpeg"; fi | 206 | if [ $SRS_FFMPEG = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-ffmpeg"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-ffmpeg"; fi |
| 207 | -if [ $SRS_HTTP = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-http"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-http"; fi | 207 | +if [ $SRS_HTTP_CALLBACK = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-http-callback"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-http-callback"; fi |
| 208 | if [ $SRS_LIBRTMP = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-librtmp"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-librtmp"; fi | 208 | if [ $SRS_LIBRTMP = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-librtmp"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-librtmp"; fi |
| 209 | if [ $SRS_BWTC = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-bwtc"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-bwtc"; fi | 209 | if [ $SRS_BWTC = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-bwtc"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-bwtc"; fi |
| 210 | if [ $SRS_RESEARCH = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-research"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-research"; fi | 210 | if [ $SRS_RESEARCH = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-research"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-research"; fi |
trunk/conf/ffmpeg.conf
0 → 100755
| 1 | +listen 1935; | ||
| 2 | +vhost __defaultVhost__ { | ||
| 3 | + transcode { | ||
| 4 | + enabled on; | ||
| 5 | + ffmpeg ./objs/ffmpeg/bin/ffmpeg; | ||
| 6 | + engine ff { | ||
| 7 | + enabled on; | ||
| 8 | + vfilter { | ||
| 9 | + } | ||
| 10 | + vcodec libx264; | ||
| 11 | + vbitrate 500; | ||
| 12 | + vfps 25; | ||
| 13 | + vwidth 768; | ||
| 14 | + vheight 320; | ||
| 15 | + vthreads 12; | ||
| 16 | + vprofile main; | ||
| 17 | + vpreset medium; | ||
| 18 | + vparams { | ||
| 19 | + } | ||
| 20 | + acodec libaacplus; | ||
| 21 | + abitrate 70; | ||
| 22 | + asample_rate 44100; | ||
| 23 | + achannels 2; | ||
| 24 | + aparams { | ||
| 25 | + } | ||
| 26 | + output rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine]; | ||
| 27 | + } | ||
| 28 | + } | ||
| 29 | +} |
| @@ -16,7 +16,7 @@ BLACK="\\e[0m" | @@ -16,7 +16,7 @@ BLACK="\\e[0m" | ||
| 16 | 16 | ||
| 17 | ##################################################################################### | 17 | ##################################################################################### |
| 18 | # parse user options, set the variables like: | 18 | # parse user options, set the variables like: |
| 19 | -# srs features: SRS_SSL/SRS_HLS/SRS_FFMPEG/SRS_HTTP/SRS_RESEARCH/SRS_UTEST | 19 | +# srs features: SRS_SSL/SRS_HLS/SRS_FFMPEG/SRS_HTTP_CALLBACK/SRS_RESEARCH/SRS_UTEST |
| 20 | # build options: SRS_JOBS | 20 | # build options: SRS_JOBS |
| 21 | ##################################################################################### | 21 | ##################################################################################### |
| 22 | # parse options, exit with error when parse options invalid. | 22 | # parse options, exit with error when parse options invalid. |
| @@ -61,7 +61,7 @@ if [ $SRS_UTEST = YES ]; then SrsUtestMakeEntry="(cd ${SRS_OBJS}/utest; \$(MAKE) | @@ -61,7 +61,7 @@ if [ $SRS_UTEST = YES ]; then SrsUtestMakeEntry="(cd ${SRS_OBJS}/utest; \$(MAKE) | ||
| 61 | SrsHlsSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_HLS = YES ]; then SrsHlsSummaryColor="\$(GREEN)"; fi | 61 | SrsHlsSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_HLS = YES ]; then SrsHlsSummaryColor="\$(GREEN)"; fi |
| 62 | SrsSslSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_SSL = YES ]; then SrsSslSummaryColor="\$(GREEN)"; fi | 62 | SrsSslSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_SSL = YES ]; then SrsSslSummaryColor="\$(GREEN)"; fi |
| 63 | SrsFfmpegSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_FFMPEG = YES ]; then SrsFfmpegSummaryColor="\$(GREEN)"; fi | 63 | SrsFfmpegSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_FFMPEG = YES ]; then SrsFfmpegSummaryColor="\$(GREEN)"; fi |
| 64 | -SrsHttpSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_HTTP = YES ]; then SrsHttpSummaryColor="\$(GREEN)"; fi | 64 | +SrsHttpCallbackSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_HTTP_CALLBACK = YES ]; then SrsHttpCallbackSummaryColor="\$(GREEN)"; fi |
| 65 | SrsLibrtmpSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_LIBRTMP = YES ]; then SrsLibrtmpSummaryColor="\$(GREEN)"; fi | 65 | SrsLibrtmpSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_LIBRTMP = YES ]; then SrsLibrtmpSummaryColor="\$(GREEN)"; fi |
| 66 | SrsLibrtmpSSLSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_LIBRTMP = YES ]; then if [ $SRS_SSL = YES ]; then SrsLibrtmpSSLSummaryColor="\$(GREEN)"; fi fi | 66 | SrsLibrtmpSSLSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_LIBRTMP = YES ]; then if [ $SRS_SSL = YES ]; then SrsLibrtmpSSLSummaryColor="\$(GREEN)"; fi fi |
| 67 | SrsBWTCSummaryColor="\$(GREEN)(disabled) "; if [ $SRS_BWTC = YES ]; then SrsBWTCSummaryColor="\$(GREEN)"; fi | 67 | SrsBWTCSummaryColor="\$(GREEN)(disabled) "; if [ $SRS_BWTC = YES ]; then SrsBWTCSummaryColor="\$(GREEN)"; fi |
| @@ -129,8 +129,8 @@ default: bandwidth librtmp-sample utest | @@ -129,8 +129,8 @@ default: bandwidth librtmp-sample utest | ||
| 129 | @echo -e " | ${SrsSslSummaryColor}ssl: support RTMP complex handshake for client required, for instance, flash\$(BLACK)" | 129 | @echo -e " | ${SrsSslSummaryColor}ssl: support RTMP complex handshake for client required, for instance, flash\$(BLACK)" |
| 130 | @echo -e " | ${SrsFfmpegSummaryColor}ffmpeg @see: https://github.com/winlinvip/simple-rtmp-server/wiki/FFMPEG\$(BLACK)" | 130 | @echo -e " | ${SrsFfmpegSummaryColor}ffmpeg @see: https://github.com/winlinvip/simple-rtmp-server/wiki/FFMPEG\$(BLACK)" |
| 131 | @echo -e " | ${SrsFfmpegSummaryColor}ffmpeg: support transcoding RTMP stream with FFMPEG\$(BLACK)" | 131 | @echo -e " | ${SrsFfmpegSummaryColor}ffmpeg: support transcoding RTMP stream with FFMPEG\$(BLACK)" |
| 132 | - @echo -e " | ${SrsHttpSummaryColor}http @see: https://github.com/winlinvip/simple-rtmp-server/wiki/HTTPCallback\$(BLACK)" | ||
| 133 | - @echo -e " | ${SrsHttpSummaryColor}http: support http callback for authentication and event injection\$(BLACK)" | 132 | + @echo -e " | ${SrsHttpCallbackSummaryColor}http @see: https://github.com/winlinvip/simple-rtmp-server/wiki/HTTPCallback\$(BLACK)" |
| 133 | + @echo -e " | ${SrsHttpCallbackSummaryColor}http: support http callback for authentication and event injection\$(BLACK)" | ||
| 134 | @echo -e " \$(BLACK)+------------------------------------------------------------------------------------\$(BLACK)" | 134 | @echo -e " \$(BLACK)+------------------------------------------------------------------------------------\$(BLACK)" |
| 135 | @echo -e "\$(GREEN)binaries @see: https://github.com/winlinvip/simple-rtmp-server/wiki/Build\$(BLACK)" | 135 | @echo -e "\$(GREEN)binaries @see: https://github.com/winlinvip/simple-rtmp-server/wiki/Build\$(BLACK)" |
| 136 | 136 | ||
| @@ -256,7 +256,7 @@ END | @@ -256,7 +256,7 @@ END | ||
| 256 | LibSTRoot="${SRS_OBJS}/st"; LibSTfile="${LibSTRoot}/libst.a" | 256 | LibSTRoot="${SRS_OBJS}/st"; LibSTfile="${LibSTRoot}/libst.a" |
| 257 | # hp(http-parser) the http request/url parser, for SRS to support HTTP callback. | 257 | # hp(http-parser) the http request/url parser, for SRS to support HTTP callback. |
| 258 | LibHttpParserRoot=""; LibHttpParserfile="" | 258 | LibHttpParserRoot=""; LibHttpParserfile="" |
| 259 | -if [ $SRS_HTTP = YES ]; then LibHttpParserRoot="${SRS_OBJS}/hp"; LibHttpParserfile="${LibHttpParserRoot}/libhttp_parser.a"; fi | 259 | +if [ $SRS_HTTP_CALLBACK = YES ]; then LibHttpParserRoot="${SRS_OBJS}/hp"; LibHttpParserfile="${LibHttpParserRoot}/libhttp_parser.a"; fi |
| 260 | # openssl-1.0.1f, for the RTMP complex handshake. | 260 | # openssl-1.0.1f, for the RTMP complex handshake. |
| 261 | LibSSLRoot="";LibSSLfile="" | 261 | LibSSLRoot="";LibSSLfile="" |
| 262 | if [ $SRS_SSL = YES ]; then LibSSLRoot="${SRS_OBJS}/openssl/include"; LibSSLfile="${SRS_OBJS}/openssl/lib/libssl.a ${SRS_OBJS}/openssl/lib/libcrypto.a"; fi | 262 | if [ $SRS_SSL = YES ]; then LibSSLRoot="${SRS_OBJS}/openssl/include"; LibSSLfile="${SRS_OBJS}/openssl/lib/libssl.a ${SRS_OBJS}/openssl/lib/libcrypto.a"; fi |
| @@ -383,7 +383,7 @@ if [ $SRS_FFMPEG = YES ]; then | @@ -383,7 +383,7 @@ if [ $SRS_FFMPEG = YES ]; then | ||
| 383 | else | 383 | else |
| 384 | echo -e "${YELLOW}warning: without live stream transcoding over FFMPEG support${BLACK}" | 384 | echo -e "${YELLOW}warning: without live stream transcoding over FFMPEG support${BLACK}" |
| 385 | fi | 385 | fi |
| 386 | -if [ $SRS_HTTP = YES ]; then | 386 | +if [ $SRS_HTTP_CALLBACK = YES ]; then |
| 387 | echo -e "${GREEN}http hooks callback over CherryPy is enabled${BLACK}" | 387 | echo -e "${GREEN}http hooks callback over CherryPy is enabled${BLACK}" |
| 388 | else | 388 | else |
| 389 | echo -e "${YELLOW}warning: without http hooks callback over CherryPy support${BLACK}" | 389 | echo -e "${YELLOW}warning: without http hooks callback over CherryPy support${BLACK}" |
| @@ -449,7 +449,7 @@ fi | @@ -449,7 +449,7 @@ fi | ||
| 449 | if [ $SRS_FFMPEG = YES ]; then | 449 | if [ $SRS_FFMPEG = YES ]; then |
| 450 | echo -e "\" ./objs/ffmpeg/bin/ffmpeg \" is used for live stream transcoding" | 450 | echo -e "\" ./objs/ffmpeg/bin/ffmpeg \" is used for live stream transcoding" |
| 451 | fi | 451 | fi |
| 452 | -if [ $SRS_HTTP = YES ]; then | 452 | +if [ $SRS_HTTP_CALLBACK = YES ]; then |
| 453 | echo -e "\" python ./research/api-server/server.py 8085 \" to start the api-server" | 453 | echo -e "\" python ./research/api-server/server.py 8085 \" to start the api-server" |
| 454 | fi | 454 | fi |
| 455 | echo "\" ./objs/srs -c conf/srs.conf \" to start the srs live server" | 455 | echo "\" ./objs/srs -c conf/srs.conf \" to start the srs live server" |
| @@ -52,7 +52,7 @@ SrsClient::SrsClient(SrsServer* srs_server, st_netfd_t client_stfd) | @@ -52,7 +52,7 @@ SrsClient::SrsClient(SrsServer* srs_server, st_netfd_t client_stfd) | ||
| 52 | skt = new SrsSocket(client_stfd); | 52 | skt = new SrsSocket(client_stfd); |
| 53 | rtmp = new SrsRtmpServer(skt); | 53 | rtmp = new SrsRtmpServer(skt); |
| 54 | refer = new SrsRefer(); | 54 | refer = new SrsRefer(); |
| 55 | -#ifdef SRS_HTTP | 55 | +#ifdef SRS_HTTP_CALLBACK |
| 56 | http_hooks = new SrsHttpHooks(); | 56 | http_hooks = new SrsHttpHooks(); |
| 57 | #endif | 57 | #endif |
| 58 | bandwidth = new SrsBandwidth(); | 58 | bandwidth = new SrsBandwidth(); |
| @@ -70,7 +70,7 @@ SrsClient::~SrsClient() | @@ -70,7 +70,7 @@ SrsClient::~SrsClient() | ||
| 70 | srs_freep(rtmp); | 70 | srs_freep(rtmp); |
| 71 | srs_freep(skt); | 71 | srs_freep(skt); |
| 72 | srs_freep(refer); | 72 | srs_freep(refer); |
| 73 | -#ifdef SRS_HTTP | 73 | +#ifdef SRS_HTTP_CALLBACK |
| 74 | srs_freep(http_hooks); | 74 | srs_freep(http_hooks); |
| 75 | #endif | 75 | #endif |
| 76 | srs_freep(bandwidth); | 76 | srs_freep(bandwidth); |
| @@ -720,7 +720,7 @@ int SrsClient::on_connect() | @@ -720,7 +720,7 @@ int SrsClient::on_connect() | ||
| 720 | { | 720 | { |
| 721 | int ret = ERROR_SUCCESS; | 721 | int ret = ERROR_SUCCESS; |
| 722 | 722 | ||
| 723 | -#ifdef SRS_HTTP | 723 | +#ifdef SRS_HTTP_CALLBACK |
| 724 | // HTTP: on_connect | 724 | // HTTP: on_connect |
| 725 | SrsConfDirective* on_connect = _srs_config->get_vhost_on_connect(req->vhost); | 725 | SrsConfDirective* on_connect = _srs_config->get_vhost_on_connect(req->vhost); |
| 726 | if (!on_connect) { | 726 | if (!on_connect) { |
| @@ -742,7 +742,7 @@ int SrsClient::on_connect() | @@ -742,7 +742,7 @@ int SrsClient::on_connect() | ||
| 742 | 742 | ||
| 743 | void SrsClient::on_close() | 743 | void SrsClient::on_close() |
| 744 | { | 744 | { |
| 745 | -#ifdef SRS_HTTP | 745 | +#ifdef SRS_HTTP_CALLBACK |
| 746 | // whatever the ret code, notify the api hooks. | 746 | // whatever the ret code, notify the api hooks. |
| 747 | // HTTP: on_close | 747 | // HTTP: on_close |
| 748 | SrsConfDirective* on_close = _srs_config->get_vhost_on_close(req->vhost); | 748 | SrsConfDirective* on_close = _srs_config->get_vhost_on_close(req->vhost); |
| @@ -762,7 +762,7 @@ int SrsClient::on_publish() | @@ -762,7 +762,7 @@ int SrsClient::on_publish() | ||
| 762 | { | 762 | { |
| 763 | int ret = ERROR_SUCCESS; | 763 | int ret = ERROR_SUCCESS; |
| 764 | 764 | ||
| 765 | -#ifdef SRS_HTTP | 765 | +#ifdef SRS_HTTP_CALLBACK |
| 766 | // HTTP: on_publish | 766 | // HTTP: on_publish |
| 767 | SrsConfDirective* on_publish = _srs_config->get_vhost_on_publish(req->vhost); | 767 | SrsConfDirective* on_publish = _srs_config->get_vhost_on_publish(req->vhost); |
| 768 | if (!on_publish) { | 768 | if (!on_publish) { |
| @@ -784,7 +784,7 @@ int SrsClient::on_publish() | @@ -784,7 +784,7 @@ int SrsClient::on_publish() | ||
| 784 | 784 | ||
| 785 | void SrsClient::on_unpublish() | 785 | void SrsClient::on_unpublish() |
| 786 | { | 786 | { |
| 787 | -#ifdef SRS_HTTP | 787 | +#ifdef SRS_HTTP_CALLBACK |
| 788 | // whatever the ret code, notify the api hooks. | 788 | // whatever the ret code, notify the api hooks. |
| 789 | // HTTP: on_unpublish | 789 | // HTTP: on_unpublish |
| 790 | SrsConfDirective* on_unpublish = _srs_config->get_vhost_on_unpublish(req->vhost); | 790 | SrsConfDirective* on_unpublish = _srs_config->get_vhost_on_unpublish(req->vhost); |
| @@ -804,7 +804,7 @@ int SrsClient::on_play() | @@ -804,7 +804,7 @@ int SrsClient::on_play() | ||
| 804 | { | 804 | { |
| 805 | int ret = ERROR_SUCCESS; | 805 | int ret = ERROR_SUCCESS; |
| 806 | 806 | ||
| 807 | -#ifdef SRS_HTTP | 807 | +#ifdef SRS_HTTP_CALLBACK |
| 808 | // HTTP: on_play | 808 | // HTTP: on_play |
| 809 | SrsConfDirective* on_play = _srs_config->get_vhost_on_play(req->vhost); | 809 | SrsConfDirective* on_play = _srs_config->get_vhost_on_play(req->vhost); |
| 810 | if (!on_play) { | 810 | if (!on_play) { |
| @@ -826,7 +826,7 @@ int SrsClient::on_play() | @@ -826,7 +826,7 @@ int SrsClient::on_play() | ||
| 826 | 826 | ||
| 827 | void SrsClient::on_stop() | 827 | void SrsClient::on_stop() |
| 828 | { | 828 | { |
| 829 | -#ifdef SRS_HTTP | 829 | +#ifdef SRS_HTTP_CALLBACK |
| 830 | // whatever the ret code, notify the api hooks. | 830 | // whatever the ret code, notify the api hooks. |
| 831 | // HTTP: on_stop | 831 | // HTTP: on_stop |
| 832 | SrsConfDirective* on_stop = _srs_config->get_vhost_on_stop(req->vhost); | 832 | SrsConfDirective* on_stop = _srs_config->get_vhost_on_stop(req->vhost); |
| @@ -42,7 +42,7 @@ class SrsRefer; | @@ -42,7 +42,7 @@ class SrsRefer; | ||
| 42 | class SrsConsumer; | 42 | class SrsConsumer; |
| 43 | class SrsCommonMessage; | 43 | class SrsCommonMessage; |
| 44 | class SrsSocket; | 44 | class SrsSocket; |
| 45 | -#ifdef SRS_HTTP | 45 | +#ifdef SRS_HTTP_CALLBACK |
| 46 | class SrsHttpHooks; | 46 | class SrsHttpHooks; |
| 47 | #endif | 47 | #endif |
| 48 | class SrsBandwidth; | 48 | class SrsBandwidth; |
| @@ -59,7 +59,7 @@ private: | @@ -59,7 +59,7 @@ private: | ||
| 59 | SrsSocket* skt; | 59 | SrsSocket* skt; |
| 60 | SrsRtmpServer* rtmp; | 60 | SrsRtmpServer* rtmp; |
| 61 | SrsRefer* refer; | 61 | SrsRefer* refer; |
| 62 | -#ifdef SRS_HTTP | 62 | +#ifdef SRS_HTTP_CALLBACK |
| 63 | SrsHttpHooks* http_hooks; | 63 | SrsHttpHooks* http_hooks; |
| 64 | #endif | 64 | #endif |
| 65 | SrsBandwidth* bandwidth; | 65 | SrsBandwidth* bandwidth; |
| @@ -23,7 +23,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -23,7 +23,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 23 | 23 | ||
| 24 | #include <srs_app_http.hpp> | 24 | #include <srs_app_http.hpp> |
| 25 | 25 | ||
| 26 | -#ifdef SRS_HTTP | 26 | +#ifdef SRS_HTTP_CALLBACK |
| 27 | 27 | ||
| 28 | #include <sstream> | 28 | #include <sstream> |
| 29 | 29 |
| @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 31 | 31 | ||
| 32 | #include <srs_app_st.hpp> | 32 | #include <srs_app_st.hpp> |
| 33 | 33 | ||
| 34 | -#ifdef SRS_HTTP | 34 | +#ifdef SRS_HTTP_CALLBACK |
| 35 | 35 | ||
| 36 | class SrsRequest; | 36 | class SrsRequest; |
| 37 | class SrsSocket; | 37 | class SrsSocket; |
-
请 注册 或 登录 后发表评论