正在显示
6 个修改的文件
包含
121 行增加
和
81 行删除
@@ -274,6 +274,12 @@ else | @@ -274,6 +274,12 @@ else | ||
274 | echo "#undef SRS_HTTP_SERVER" >> $SRS_AUTO_HEADERS_H | 274 | echo "#undef SRS_HTTP_SERVER" >> $SRS_AUTO_HEADERS_H |
275 | fi | 275 | fi |
276 | 276 | ||
277 | +if [ $SRS_HTTP_API = YES ]; then | ||
278 | + echo "#define SRS_HTTP_API" >> $SRS_AUTO_HEADERS_H | ||
279 | +else | ||
280 | + echo "#undef SRS_HTTP_API" >> $SRS_AUTO_HEADERS_H | ||
281 | +fi | ||
282 | + | ||
277 | ##################################################################################### | 283 | ##################################################################################### |
278 | # nginx for HLS, nginx-1.5.0 | 284 | # nginx for HLS, nginx-1.5.0 |
279 | ##################################################################################### | 285 | ##################################################################################### |
@@ -20,6 +20,7 @@ SRS_FFMPEG=RESERVED | @@ -20,6 +20,7 @@ SRS_FFMPEG=RESERVED | ||
20 | SRS_HTTP_PARSER=RESERVED | 20 | SRS_HTTP_PARSER=RESERVED |
21 | SRS_HTTP_CALLBACK=RESERVED | 21 | SRS_HTTP_CALLBACK=RESERVED |
22 | SRS_HTTP_SERVER=RESERVED | 22 | SRS_HTTP_SERVER=RESERVED |
23 | +SRS_HTTP_API=RESERVED | ||
23 | SRS_LIBRTMP=RESERVED # srs-librtmp | 24 | SRS_LIBRTMP=RESERVED # srs-librtmp |
24 | SRS_BWTC=RESERVED # srs-bandwidth-test client | 25 | SRS_BWTC=RESERVED # srs-bandwidth-test client |
25 | SRS_RESEARCH=RESERVED | 26 | SRS_RESEARCH=RESERVED |
@@ -59,47 +60,49 @@ do | @@ -59,47 +60,49 @@ do | ||
59 | esac | 60 | esac |
60 | 61 | ||
61 | case "$option" in | 62 | case "$option" in |
62 | - --help) help=yes ;; | 63 | + --help) help=yes ;; |
63 | 64 | ||
64 | - --with-ssl) SRS_SSL=YES ;; | ||
65 | - --with-hls) SRS_HLS=YES ;; | ||
66 | - --with-nginx) SRS_NGINX=YES ;; | ||
67 | - --with-ffmpeg) SRS_FFMPEG=YES ;; | ||
68 | - --with-http-callback) SRS_HTTP_CALLBACK=YES ;; | ||
69 | - --with-http-server) SRS_HTTP_SERVER=YES ;; | ||
70 | - --with-librtmp) SRS_LIBRTMP=YES ;; | ||
71 | - --with-bwtc) SRS_BWTC=YES ;; | ||
72 | - --with-research) SRS_RESEARCH=YES ;; | ||
73 | - --with-utest) SRS_UTEST=YES ;; | ||
74 | - --with-gperf) SRS_GPERF=YES ;; | ||
75 | - --with-gmc) SRS_GPERF_MC=YES ;; | ||
76 | - --with-gmp) SRS_GPERF_MP=YES ;; | ||
77 | - --with-gcp) SRS_GPERF_CP=YES ;; | ||
78 | - --with-gprof) SRS_GPROF=YES ;; | ||
79 | - --with-arm-ubuntu12) SRS_ARM_UBUNTU12=YES ;; | ||
80 | - | ||
81 | - --without-ssl) SRS_SSL=NO ;; | ||
82 | - --without-hls) SRS_HLS=NO ;; | ||
83 | - --without-nginx) SRS_NGINX=NO ;; | ||
84 | - --without-ffmpeg) SRS_FFMPEG=NO ;; | ||
85 | - --without-http-callback) SRS_HTTP_CALLBACK=NO ;; | ||
86 | - --without-http-server) SRS_HTTP_SERVER=NO ;; | ||
87 | - --without-librtmp) SRS_LIBRTMP=NO ;; | ||
88 | - --without-bwtc) SRS_BWTC=NO ;; | ||
89 | - --without-research) SRS_RESEARCH=NO ;; | ||
90 | - --without-utest) SRS_UTEST=NO ;; | ||
91 | - --without-gperf) SRS_GPERF=NO ;; | ||
92 | - --without-gmc) SRS_GPERF_MC=NO ;; | ||
93 | - --without-gmp) SRS_GPERF_MP=NO ;; | ||
94 | - --without-gcp) SRS_GPERF_CP=NO ;; | ||
95 | - --without-gprof) SRS_GPROF=NO ;; | ||
96 | - --without-arm-ubuntu12) SRS_ARM_UBUNTU12=NO ;; | ||
97 | - | ||
98 | - --jobs) SRS_JOBS=${value} ;; | ||
99 | - --prefix) SRS_PREFIX=${value} ;; | ||
100 | - --static) SRS_STATIC=YES ;; | ||
101 | - --dev) SRS_DEV=YES ;; | ||
102 | - --pi) SRS_PI=YES ;; | 65 | + --with-ssl) SRS_SSL=YES ;; |
66 | + --with-hls) SRS_HLS=YES ;; | ||
67 | + --with-nginx) SRS_NGINX=YES ;; | ||
68 | + --with-ffmpeg) SRS_FFMPEG=YES ;; | ||
69 | + --with-http-callback) SRS_HTTP_CALLBACK=YES ;; | ||
70 | + --with-http-server) SRS_HTTP_SERVER=YES ;; | ||
71 | + --with-http-api) SRS_HTTP_API=YES ;; | ||
72 | + --with-librtmp) SRS_LIBRTMP=YES ;; | ||
73 | + --with-bwtc) SRS_BWTC=YES ;; | ||
74 | + --with-research) SRS_RESEARCH=YES ;; | ||
75 | + --with-utest) SRS_UTEST=YES ;; | ||
76 | + --with-gperf) SRS_GPERF=YES ;; | ||
77 | + --with-gmc) SRS_GPERF_MC=YES ;; | ||
78 | + --with-gmp) SRS_GPERF_MP=YES ;; | ||
79 | + --with-gcp) SRS_GPERF_CP=YES ;; | ||
80 | + --with-gprof) SRS_GPROF=YES ;; | ||
81 | + --with-arm-ubuntu12) SRS_ARM_UBUNTU12=YES ;; | ||
82 | + | ||
83 | + --without-ssl) SRS_SSL=NO ;; | ||
84 | + --without-hls) SRS_HLS=NO ;; | ||
85 | + --without-nginx) SRS_NGINX=NO ;; | ||
86 | + --without-ffmpeg) SRS_FFMPEG=NO ;; | ||
87 | + --without-http-callback) SRS_HTTP_CALLBACK=NO ;; | ||
88 | + --without-http-server) SRS_HTTP_SERVER=NO ;; | ||
89 | + --without-http-api) SRS_HTTP_API=NO ;; | ||
90 | + --without-librtmp) SRS_LIBRTMP=NO ;; | ||
91 | + --without-bwtc) SRS_BWTC=NO ;; | ||
92 | + --without-research) SRS_RESEARCH=NO ;; | ||
93 | + --without-utest) SRS_UTEST=NO ;; | ||
94 | + --without-gperf) SRS_GPERF=NO ;; | ||
95 | + --without-gmc) SRS_GPERF_MC=NO ;; | ||
96 | + --without-gmp) SRS_GPERF_MP=NO ;; | ||
97 | + --without-gcp) SRS_GPERF_CP=NO ;; | ||
98 | + --without-gprof) SRS_GPROF=NO ;; | ||
99 | + --without-arm-ubuntu12) SRS_ARM_UBUNTU12=NO ;; | ||
100 | + | ||
101 | + --jobs) SRS_JOBS=${value} ;; | ||
102 | + --prefix) SRS_PREFIX=${value} ;; | ||
103 | + --static) SRS_STATIC=YES ;; | ||
104 | + --dev) SRS_DEV=YES ;; | ||
105 | + --pi) SRS_PI=YES ;; | ||
103 | 106 | ||
104 | *) | 107 | *) |
105 | echo "$0: error: invalid option \"$option\"" | 108 | echo "$0: error: invalid option \"$option\"" |
@@ -119,6 +122,7 @@ if [ $SRS_ARM_UBUNTU12 = YES ]; then | @@ -119,6 +122,7 @@ if [ $SRS_ARM_UBUNTU12 = YES ]; then | ||
119 | if [ $SRS_FFMPEG = RESERVED ]; then SRS_FFMPEG=NO; fi | 122 | if [ $SRS_FFMPEG = RESERVED ]; then SRS_FFMPEG=NO; fi |
120 | if [ $SRS_HTTP_CALLBACK = RESERVED ]; then SRS_HTTP_CALLBACK=NO; fi | 123 | if [ $SRS_HTTP_CALLBACK = RESERVED ]; then SRS_HTTP_CALLBACK=NO; fi |
121 | if [ $SRS_HTTP_SERVER = RESERVED ]; then SRS_HTTP_SERVER=NO; fi | 124 | if [ $SRS_HTTP_SERVER = RESERVED ]; then SRS_HTTP_SERVER=NO; fi |
125 | + if [ $SRS_HTTP_API = RESERVED ]; then SRS_HTTP_API=NO; fi | ||
122 | if [ $SRS_LIBRTMP = RESERVED ]; then SRS_LIBRTMP=NO; fi | 126 | if [ $SRS_LIBRTMP = RESERVED ]; then SRS_LIBRTMP=NO; fi |
123 | if [ $SRS_BWTC = RESERVED ]; then SRS_BWTC=NO; fi | 127 | if [ $SRS_BWTC = RESERVED ]; then SRS_BWTC=NO; fi |
124 | if [ $SRS_RESEARCH = RESERVED ]; then SRS_RESEARCH=NO; fi | 128 | if [ $SRS_RESEARCH = RESERVED ]; then SRS_RESEARCH=NO; fi |
@@ -140,6 +144,7 @@ else | @@ -140,6 +144,7 @@ else | ||
140 | if [ $SRS_FFMPEG = RESERVED ]; then SRS_FFMPEG=NO; fi | 144 | if [ $SRS_FFMPEG = RESERVED ]; then SRS_FFMPEG=NO; fi |
141 | if [ $SRS_HTTP_CALLBACK = RESERVED ]; then SRS_HTTP_CALLBACK=NO; fi | 145 | if [ $SRS_HTTP_CALLBACK = RESERVED ]; then SRS_HTTP_CALLBACK=NO; fi |
142 | if [ $SRS_HTTP_SERVER = RESERVED ]; then SRS_HTTP_SERVER=NO; fi | 146 | if [ $SRS_HTTP_SERVER = RESERVED ]; then SRS_HTTP_SERVER=NO; fi |
147 | + if [ $SRS_HTTP_API = RESERVED ]; then SRS_HTTP_API=NO; fi | ||
143 | if [ $SRS_LIBRTMP = RESERVED ]; then SRS_LIBRTMP=NO; fi | 148 | if [ $SRS_LIBRTMP = RESERVED ]; then SRS_LIBRTMP=NO; fi |
144 | if [ $SRS_BWTC = RESERVED ]; then SRS_BWTC=NO; fi | 149 | if [ $SRS_BWTC = RESERVED ]; then SRS_BWTC=NO; fi |
145 | if [ $SRS_RESEARCH = RESERVED ]; then SRS_RESEARCH=NO; fi | 150 | if [ $SRS_RESEARCH = RESERVED ]; then SRS_RESEARCH=NO; fi |
@@ -163,6 +168,7 @@ if [ $SRS_DEV = YES ]; then | @@ -163,6 +168,7 @@ if [ $SRS_DEV = YES ]; then | ||
163 | SRS_FFMPEG=YES | 168 | SRS_FFMPEG=YES |
164 | SRS_HTTP_CALLBACK=YES | 169 | SRS_HTTP_CALLBACK=YES |
165 | SRS_HTTP_SERVER=YES | 170 | SRS_HTTP_SERVER=YES |
171 | + SRS_HTTP_API=YES | ||
166 | SRS_LIBRTMP=YES | 172 | SRS_LIBRTMP=YES |
167 | SRS_BWTC=YES | 173 | SRS_BWTC=YES |
168 | SRS_RESEARCH=YES | 174 | SRS_RESEARCH=YES |
@@ -185,6 +191,7 @@ if [ $SRS_PI = YES ]; then | @@ -185,6 +191,7 @@ if [ $SRS_PI = YES ]; then | ||
185 | SRS_FFMPEG=NO | 191 | SRS_FFMPEG=NO |
186 | SRS_HTTP_CALLBACK=NO | 192 | SRS_HTTP_CALLBACK=NO |
187 | SRS_HTTP_SERVER=YES | 193 | SRS_HTTP_SERVER=YES |
194 | + SRS_HTTP_API=YES | ||
188 | SRS_LIBRTMP=NO | 195 | SRS_LIBRTMP=NO |
189 | SRS_BWTC=NO | 196 | SRS_BWTC=NO |
190 | SRS_RESEARCH=NO | 197 | SRS_RESEARCH=NO |
@@ -202,6 +209,7 @@ fi | @@ -202,6 +209,7 @@ fi | ||
202 | # if http-xxxx specified, open the SRS_HTTP_PARSER | 209 | # if http-xxxx specified, open the SRS_HTTP_PARSER |
203 | if [ $SRS_HTTP_CALLBACK = YES ]; then SRS_HTTP_PARSER=YES; fi | 210 | if [ $SRS_HTTP_CALLBACK = YES ]; then SRS_HTTP_PARSER=YES; fi |
204 | if [ $SRS_HTTP_SERVER = YES ]; then SRS_HTTP_PARSER=YES; fi | 211 | if [ $SRS_HTTP_SERVER = YES ]; then SRS_HTTP_PARSER=YES; fi |
212 | +if [ $SRS_HTTP_API = YES ]; then SRS_HTTP_PARSER=YES; fi | ||
205 | 213 | ||
206 | # parse the jobs for make | 214 | # parse the jobs for make |
207 | if [[ "" -eq SRS_JOBS ]]; then | 215 | if [[ "" -eq SRS_JOBS ]]; then |
@@ -219,47 +227,49 @@ SRS_CONFIGURE="$opt" | @@ -219,47 +227,49 @@ SRS_CONFIGURE="$opt" | ||
219 | if [ $help = yes ]; then | 227 | if [ $help = yes ]; then |
220 | cat << END | 228 | cat << END |
221 | 229 | ||
222 | - --help print this message | ||
223 | - | ||
224 | - --with-ssl enable rtmp complex handshake, requires openssl-devel installed. | ||
225 | - to delivery h264 video and aac audio to flash player. | ||
226 | - --with-hls enable hls streaming, build nginx as http server for hls. | ||
227 | - --with-http-callback enable http hooks, build cherrypy as demo api server. | ||
228 | - --with-http-server enable http server to delivery http stream. | ||
229 | - --with-ffmpeg enable transcoding with ffmpeg. | ||
230 | - --with-librtmp enable srs-librtmp, library for client. | ||
231 | - --with-bwtc enable srs bandwidth test client tool. | ||
232 | - --with-research build the research tools. | ||
233 | - --with-utest build the utest for srs. | ||
234 | - --with-gperf build srs with gperf tools(no gmc/gmp/gcp, with tcmalloc only). | ||
235 | - --with-gmc build memory check for srs with gperf tools. | ||
236 | - --with-gmp build memory profile for srs with gperf tools. | ||
237 | - --with-gcp build cpu profile for srs with gperf tools. | ||
238 | - --with-gprof build srs with gprof(GNU profile tool). | ||
239 | - --with-arm-ubuntu12 build srs on ubuntu12 for armhf(v7cpu). | ||
240 | - | ||
241 | - --without-ssl disable rtmp complex handshake. | ||
242 | - --without-hls disable hls, rtmp streaming only. | ||
243 | - --without-http-callback disable http, http hooks callback. | ||
244 | - --without-http-server disable http server, use external server to delivery http stream. | ||
245 | - --without-ffmpeg disable the ffmpeg transcoding feature. | ||
246 | - --without-librtmp disable srs-librtmp, library for client. | ||
247 | - --without-bwtc disable srs bandwidth test client tool. | ||
248 | - --without-research do not build the research tools. | ||
249 | - --without-utest do not build the utest for srs. | ||
250 | - --without-gperf do not build srs with gperf tools(without tcmalloc and gmc/gmp/gcp). | ||
251 | - --without-gmc do not build memory check for srs with gperf tools. | ||
252 | - --without-gmp do not build memory profile for srs with gperf tools. | ||
253 | - --without-gcp do not build cpu profile for srs with gperf tools. | ||
254 | - --without-gprof do not build srs with gprof(GNU profile tool). | ||
255 | - --without-arm-ubuntu12 do not build srs on ubuntu12 for armhf(v7cpu). | ||
256 | - | ||
257 | - --static whether add '-static' to link options. always set this option for arm. | ||
258 | - --jobs[=N] Allow N jobs at once; infinite jobs with no arg. | ||
259 | - used for make in the configure, for example, to make ffmpeg. | ||
260 | - --prefix=<path> the absolute install path for srs. | ||
261 | - --dev for dev, open all features, no gperf/gprof/arm. | ||
262 | - --pi for raspberry-pi(directly build), open features hls/ssl/static. | 230 | + --help print this message |
231 | + | ||
232 | + --with-ssl enable rtmp complex handshake, requires openssl-devel installed. | ||
233 | + to delivery h264 video and aac audio to flash player. | ||
234 | + --with-hls enable hls streaming, build nginx as http server for hls. | ||
235 | + --with-http-callback enable http hooks, build cherrypy as demo api server. | ||
236 | + --with-http-server enable http server to delivery http stream. | ||
237 | + --with-http-api enable http api, to manage SRS by http api. | ||
238 | + --with-ffmpeg enable transcoding with ffmpeg. | ||
239 | + --with-librtmp enable srs-librtmp, library for client. | ||
240 | + --with-bwtc enable SRS bandwidth test client tool. | ||
241 | + --with-research build the research tools. | ||
242 | + --with-utest build the utest for SRS. | ||
243 | + --with-gperf build SRS with gperf tools(no gmc/gmp/gcp, with tcmalloc only). | ||
244 | + --with-gmc build memory check for SRS with gperf tools. | ||
245 | + --with-gmp build memory profile for SRS with gperf tools. | ||
246 | + --with-gcp build cpu profile for SRS with gperf tools. | ||
247 | + --with-gprof build SRS with gprof(GNU profile tool). | ||
248 | + --with-arm-ubuntu12 build SRS on ubuntu12 for armhf(v7cpu). | ||
249 | + | ||
250 | + --without-ssl disable rtmp complex handshake. | ||
251 | + --without-hls disable hls, rtmp streaming only. | ||
252 | + --without-http-callback disable http, http hooks callback. | ||
253 | + --without-http-server disable http server, use external server to delivery http stream. | ||
254 | + --without-http-api disable http api, only use console to manage SRS process. | ||
255 | + --without-ffmpeg disable the ffmpeg transcoding feature. | ||
256 | + --without-librtmp disable srs-librtmp, library for client. | ||
257 | + --without-bwtc disable SRS bandwidth test client tool. | ||
258 | + --without-research do not build the research tools. | ||
259 | + --without-utest do not build the utest for SRS. | ||
260 | + --without-gperf do not build SRS with gperf tools(without tcmalloc and gmc/gmp/gcp). | ||
261 | + --without-gmc do not build memory check for SRS with gperf tools. | ||
262 | + --without-gmp do not build memory profile for SRS with gperf tools. | ||
263 | + --without-gcp do not build cpu profile for SRS with gperf tools. | ||
264 | + --without-gprof do not build srs with gprof(GNU profile tool). | ||
265 | + --without-arm-ubuntu12 do not build srs on ubuntu12 for armhf(v7cpu). | ||
266 | + | ||
267 | + --static whether add '-static' to link options. always set this option for arm. | ||
268 | + --jobs[=N] Allow N jobs at once; infinite jobs with no arg. | ||
269 | + used for make in the configure, for example, to make ffmpeg. | ||
270 | + --prefix=<path> the absolute install path for srs. | ||
271 | + --dev for dev, open all features, no gperf/gprof/arm. | ||
272 | + --pi for raspberry-pi(directly build), open features hls/ssl/static. | ||
263 | 273 | ||
264 | END | 274 | END |
265 | exit 0 | 275 | exit 0 |
@@ -313,6 +323,7 @@ if [ $SRS_SSL = RESERVED ]; then echo "you must specifies the ssl, see: ./config | @@ -313,6 +323,7 @@ if [ $SRS_SSL = RESERVED ]; then echo "you must specifies the ssl, see: ./config | ||
313 | if [ $SRS_FFMPEG = RESERVED ]; then echo "you must specifies the ffmpeg, see: ./configure --help"; __check_ok=NO; fi | 323 | if [ $SRS_FFMPEG = RESERVED ]; then echo "you must specifies the ffmpeg, see: ./configure --help"; __check_ok=NO; fi |
314 | if [ $SRS_HTTP_CALLBACK = RESERVED ]; then echo "you must specifies the http-callback, see: ./configure --help"; __check_ok=NO; fi | 324 | if [ $SRS_HTTP_CALLBACK = RESERVED ]; then echo "you must specifies the http-callback, see: ./configure --help"; __check_ok=NO; fi |
315 | if [ $SRS_HTTP_SERVER = RESERVED ]; then echo "you must specifies the http-server, see: ./configure --help"; __check_ok=NO; fi | 325 | if [ $SRS_HTTP_SERVER = RESERVED ]; then echo "you must specifies the http-server, see: ./configure --help"; __check_ok=NO; fi |
326 | +if [ $SRS_HTTP_API = RESERVED ]; then echo "you must specifies the http-api, see: ./configure --help"; __check_ok=NO; fi | ||
316 | if [ $SRS_LIBRTMP = RESERVED ]; then echo "you must specifies the librtmp, see: ./configure --help"; __check_ok=NO; fi | 327 | if [ $SRS_LIBRTMP = RESERVED ]; then echo "you must specifies the librtmp, see: ./configure --help"; __check_ok=NO; fi |
317 | if [ $SRS_BWTC = RESERVED ]; then echo "you must specifies the bwtc, see: ./configure --help"; __check_ok=NO; fi | 328 | if [ $SRS_BWTC = RESERVED ]; then echo "you must specifies the bwtc, see: ./configure --help"; __check_ok=NO; fi |
318 | if [ $SRS_RESEARCH = RESERVED ]; then echo "you must specifies the research, see: ./configure --help"; __check_ok=NO; fi | 329 | if [ $SRS_RESEARCH = RESERVED ]; then echo "you must specifies the research, see: ./configure --help"; __check_ok=NO; fi |
@@ -338,6 +349,7 @@ if [ $SRS_SSL = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-ssl"; else SR | @@ -338,6 +349,7 @@ if [ $SRS_SSL = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-ssl"; else SR | ||
338 | if [ $SRS_FFMPEG = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-ffmpeg"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-ffmpeg"; fi | 349 | if [ $SRS_FFMPEG = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-ffmpeg"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-ffmpeg"; fi |
339 | if [ $SRS_HTTP_CALLBACK = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-http-callback"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-http-callback"; fi | 350 | if [ $SRS_HTTP_CALLBACK = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-http-callback"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-http-callback"; fi |
340 | if [ $SRS_HTTP_SERVER = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-http-server"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-http-server"; fi | 351 | if [ $SRS_HTTP_SERVER = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-http-server"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-http-server"; fi |
352 | +if [ $SRS_HTTP_API = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-http-api"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-http-api"; fi | ||
341 | if [ $SRS_LIBRTMP = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-librtmp"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-librtmp"; fi | 353 | if [ $SRS_LIBRTMP = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-librtmp"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-librtmp"; fi |
342 | if [ $SRS_BWTC = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-bwtc"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-bwtc"; fi | 354 | if [ $SRS_BWTC = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-bwtc"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-bwtc"; fi |
343 | if [ $SRS_RESEARCH = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-research"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-research"; fi | 355 | if [ $SRS_RESEARCH = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-research"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-research"; fi |
@@ -87,6 +87,7 @@ SrsSslSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_SSL = YES ]; then SrsSslSu | @@ -87,6 +87,7 @@ SrsSslSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_SSL = YES ]; then SrsSslSu | ||
87 | SrsFfmpegSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_FFMPEG = YES ]; then SrsFfmpegSummaryColor="\${GREEN}"; fi | 87 | SrsFfmpegSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_FFMPEG = YES ]; then SrsFfmpegSummaryColor="\${GREEN}"; fi |
88 | SrsHttpCallbackSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_HTTP_CALLBACK = YES ]; then SrsHttpCallbackSummaryColor="\${GREEN}"; fi | 88 | SrsHttpCallbackSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_HTTP_CALLBACK = YES ]; then SrsHttpCallbackSummaryColor="\${GREEN}"; fi |
89 | SrsHttpServerSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_HTTP_SERVER = YES ]; then SrsHttpServerSummaryColor="\${GREEN}"; fi | 89 | SrsHttpServerSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_HTTP_SERVER = YES ]; then SrsHttpServerSummaryColor="\${GREEN}"; fi |
90 | +SrsHttpApiSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_HTTP_API = YES ]; then SrsHttpApiSummaryColor="\${GREEN}"; fi | ||
90 | SrsLibrtmpSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_LIBRTMP = YES ]; then SrsLibrtmpSummaryColor="\${GREEN}"; fi | 91 | SrsLibrtmpSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_LIBRTMP = YES ]; then SrsLibrtmpSummaryColor="\${GREEN}"; fi |
91 | SrsLibrtmpSSLSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_LIBRTMP = YES ]; then if [ $SRS_SSL = YES ]; then SrsLibrtmpSSLSummaryColor="\${GREEN}"; fi fi | 92 | SrsLibrtmpSSLSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_LIBRTMP = YES ]; then if [ $SRS_SSL = YES ]; then SrsLibrtmpSSLSummaryColor="\${GREEN}"; fi fi |
92 | SrsBWTCSummaryColor="\${GREEN}{disabled} "; if [ $SRS_BWTC = YES ]; then SrsBWTCSummaryColor="\${GREEN}"; fi | 93 | SrsBWTCSummaryColor="\${GREEN}{disabled} "; if [ $SRS_BWTC = YES ]; then SrsBWTCSummaryColor="\${GREEN}"; fi |
@@ -156,6 +157,8 @@ echo -e " | ${SrsHttpCallbackSummaryColor}http-callback @see: https://gi | @@ -156,6 +157,8 @@ echo -e " | ${SrsHttpCallbackSummaryColor}http-callback @see: https://gi | ||
156 | echo -e " | ${SrsHttpCallbackSummaryColor}http-callback: support http callback for authentication and event injection\${BLACK}" | 157 | echo -e " | ${SrsHttpCallbackSummaryColor}http-callback: support http callback for authentication and event injection\${BLACK}" |
157 | echo -e " | ${SrsHttpServerSummaryColor}http-server @see: https://github.com/winlinvip/simple-rtmp-server/wiki/HTTPServer\${BLACK}" | 158 | echo -e " | ${SrsHttpServerSummaryColor}http-server @see: https://github.com/winlinvip/simple-rtmp-server/wiki/HTTPServer\${BLACK}" |
158 | echo -e " | ${SrsHttpServerSummaryColor}http-server: support http server to delivery http stream\${BLACK}" | 159 | echo -e " | ${SrsHttpServerSummaryColor}http-server: support http server to delivery http stream\${BLACK}" |
160 | +echo -e " | ${SrsHttpApiSummaryColor}http-api @see: https://github.com/winlinvip/simple-rtmp-server/wiki/HTTPApi\${BLACK}" | ||
161 | +echo -e " | ${SrsHttpApiSummaryColor}http-api: support http api to manage server\${BLACK}" | ||
159 | echo -e " \${BLACK}+------------------------------------------------------------------------------------\${BLACK}" | 162 | echo -e " \${BLACK}+------------------------------------------------------------------------------------\${BLACK}" |
160 | echo -e "\${GREEN}binaries @see: https://github.com/winlinvip/simple-rtmp-server/wiki/Build\${BLACK}" | 163 | echo -e "\${GREEN}binaries @see: https://github.com/winlinvip/simple-rtmp-server/wiki/Build\${BLACK}" |
161 | END | 164 | END |
@@ -527,6 +530,11 @@ if [ $SRS_HTTP_SERVER = YES ]; then | @@ -527,6 +530,11 @@ if [ $SRS_HTTP_SERVER = YES ]; then | ||
527 | else | 530 | else |
528 | echo -e "${YELLOW}warning: without http server to delivery http stream support${BLACK}" | 531 | echo -e "${YELLOW}warning: without http server to delivery http stream support${BLACK}" |
529 | fi | 532 | fi |
533 | +if [ $SRS_HTTP_API = YES ]; then | ||
534 | + echo -e "${GREEN}http api to manage server is enabled${BLACK}" | ||
535 | +else | ||
536 | + echo -e "${YELLOW}warning: without http api to manage server support${BLACK}" | ||
537 | +fi | ||
530 | if [ $SRS_LIBRTMP = YES ]; then | 538 | if [ $SRS_LIBRTMP = YES ]; then |
531 | echo -e "${GREEN}srs-librtmp for client is enabled${BLACK}" | 539 | echo -e "${GREEN}srs-librtmp for client is enabled${BLACK}" |
532 | else | 540 | else |
@@ -23,6 +23,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -23,6 +23,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
23 | 23 | ||
24 | #include <srs_app_http_api.hpp> | 24 | #include <srs_app_http_api.hpp> |
25 | 25 | ||
26 | +#ifdef SRS_HTTP_API | ||
27 | + | ||
26 | #include <srs_kernel_log.hpp> | 28 | #include <srs_kernel_log.hpp> |
27 | #include <srs_kernel_error.hpp> | 29 | #include <srs_kernel_error.hpp> |
28 | 30 | ||
@@ -47,3 +49,5 @@ int SrsHttpApi::do_cycle() | @@ -47,3 +49,5 @@ int SrsHttpApi::do_cycle() | ||
47 | 49 | ||
48 | return ret; | 50 | return ret; |
49 | } | 51 | } |
52 | + | ||
53 | +#endif |
@@ -30,6 +30,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -30,6 +30,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
30 | 30 | ||
31 | #include <srs_core.hpp> | 31 | #include <srs_core.hpp> |
32 | 32 | ||
33 | +#ifdef SRS_HTTP_API | ||
34 | + | ||
33 | #include <srs_app_st.hpp> | 35 | #include <srs_app_st.hpp> |
34 | #include <srs_app_conn.hpp> | 36 | #include <srs_app_conn.hpp> |
35 | 37 | ||
@@ -43,3 +45,5 @@ protected: | @@ -43,3 +45,5 @@ protected: | ||
43 | }; | 45 | }; |
44 | 46 | ||
45 | #endif | 47 | #endif |
48 | + | ||
49 | +#endif |
@@ -438,7 +438,13 @@ int SrsServer::accept_client(SrsListenerType type, st_netfd_t client_stfd) | @@ -438,7 +438,13 @@ int SrsServer::accept_client(SrsListenerType type, st_netfd_t client_stfd) | ||
438 | if (type == SrsListenerRtmpStream) { | 438 | if (type == SrsListenerRtmpStream) { |
439 | conn = new SrsRtmpConn(this, client_stfd); | 439 | conn = new SrsRtmpConn(this, client_stfd); |
440 | } else if (type == SrsListenerHttpApi) { | 440 | } else if (type == SrsListenerHttpApi) { |
441 | +#ifdef SRS_HTTP_API | ||
441 | conn = new SrsHttpApi(this, client_stfd); | 442 | conn = new SrsHttpApi(this, client_stfd); |
443 | +#else | ||
444 | + srs_warn("close http client for server not support http-api"); | ||
445 | + srs_close_stfd(client_stfd); | ||
446 | + return ret; | ||
447 | +#endif | ||
442 | } else if (type == SrsListenerHttpStream) { | 448 | } else if (type == SrsListenerHttpStream) { |
443 | #ifdef SRS_HTTP_SERVER | 449 | #ifdef SRS_HTTP_SERVER |
444 | conn = new SrsHttpConn(this, client_stfd); | 450 | conn = new SrsHttpConn(this, client_stfd); |
-
请 注册 或 登录 后发表评论