refine the macro SRS_FFMPEG to SRS_FFMPEG_STUB, SRS_FFMPEG_TOOL to build ffmpeg tool
正在显示
8 个修改的文件
包含
31 行增加
和
27 行删除
@@ -487,7 +487,7 @@ fi | @@ -487,7 +487,7 @@ fi | ||
487 | ##################################################################################### | 487 | ##################################################################################### |
488 | # live transcoding, ffmpeg-2.1, x264-core138, lame-3.99.5, libaacplus-2.0.2. | 488 | # live transcoding, ffmpeg-2.1, x264-core138, lame-3.99.5, libaacplus-2.0.2. |
489 | ##################################################################################### | 489 | ##################################################################################### |
490 | -if [ $SRS_FFMPEG = YES ]; then | 490 | +if [ $SRS_FFMPEG_TOOL = YES ]; then |
491 | if [[ -f ${SRS_OBJS}/ffmpeg/bin/ffmpeg ]]; then | 491 | if [[ -f ${SRS_OBJS}/ffmpeg/bin/ffmpeg ]]; then |
492 | echo "ffmpeg-2.1 is ok."; | 492 | echo "ffmpeg-2.1 is ok."; |
493 | else | 493 | else |
@@ -506,13 +506,13 @@ fi | @@ -506,13 +506,13 @@ fi | ||
506 | 506 | ||
507 | # whatever the FFMPEG tools, if transcode and ingest specified, | 507 | # whatever the FFMPEG tools, if transcode and ingest specified, |
508 | # srs always compile the FFMPEG tool stub which used to start the FFMPEG process. | 508 | # srs always compile the FFMPEG tool stub which used to start the FFMPEG process. |
509 | -__SRS_FFMPEG=NO | ||
510 | -if [ $SRS_TRANSCODE = YES ]; then __SRS_FFMPEG=YES; fi | ||
511 | -if [ $SRS_INGEST = YES ]; then __SRS_FFMPEG=YES; fi | ||
512 | -if [ $__SRS_FFMPEG = YES ]; then | ||
513 | - echo "#define SRS_FFMPEG" >> $SRS_AUTO_HEADERS_H | 509 | +__SRS_FFMPEG_STUB=NO |
510 | +if [ $SRS_TRANSCODE = YES ]; then __SRS_FFMPEG_STUB=YES; fi | ||
511 | +if [ $SRS_INGEST = YES ]; then __SRS_FFMPEG_STUB=YES; fi | ||
512 | +if [ $__SRS_FFMPEG_STUB = YES ]; then | ||
513 | + echo "#define SRS_FFMPEG_STUB" >> $SRS_AUTO_HEADERS_H | ||
514 | else | 514 | else |
515 | - echo "#undef SRS_FFMPEG" >> $SRS_AUTO_HEADERS_H | 515 | + echo "#undef SRS_FFMPEG_STUB" >> $SRS_AUTO_HEADERS_H |
516 | fi | 516 | fi |
517 | 517 | ||
518 | if [ $SRS_TRANSCODE = YES ]; then | 518 | if [ $SRS_TRANSCODE = YES ]; then |
@@ -16,7 +16,7 @@ help=no | @@ -16,7 +16,7 @@ help=no | ||
16 | SRS_HLS=RESERVED | 16 | SRS_HLS=RESERVED |
17 | SRS_NGINX=RESERVED | 17 | SRS_NGINX=RESERVED |
18 | SRS_SSL=RESERVED | 18 | SRS_SSL=RESERVED |
19 | -SRS_FFMPEG=RESERVED | 19 | +SRS_FFMPEG_TOOL=RESERVED |
20 | SRS_TRANSCODE=RESERVED | 20 | SRS_TRANSCODE=RESERVED |
21 | SRS_INGEST=RESERVED | 21 | SRS_INGEST=RESERVED |
22 | SRS_HTTP_PARSER=RESERVED | 22 | SRS_HTTP_PARSER=RESERVED |
@@ -75,7 +75,7 @@ do | @@ -75,7 +75,7 @@ do | ||
75 | --with-ssl) SRS_SSL=YES ;; | 75 | --with-ssl) SRS_SSL=YES ;; |
76 | --with-hls) SRS_HLS=YES ;; | 76 | --with-hls) SRS_HLS=YES ;; |
77 | --with-nginx) SRS_NGINX=YES ;; | 77 | --with-nginx) SRS_NGINX=YES ;; |
78 | - --with-ffmpeg) SRS_FFMPEG=YES ;; | 78 | + --with-ffmpeg) SRS_FFMPEG_TOOL=YES ;; |
79 | --with-transcode) SRS_TRANSCODE=YES ;; | 79 | --with-transcode) SRS_TRANSCODE=YES ;; |
80 | --with-ingest) SRS_INGEST=YES ;; | 80 | --with-ingest) SRS_INGEST=YES ;; |
81 | --with-http-callback) SRS_HTTP_CALLBACK=YES ;; | 81 | --with-http-callback) SRS_HTTP_CALLBACK=YES ;; |
@@ -95,7 +95,7 @@ do | @@ -95,7 +95,7 @@ do | ||
95 | --without-ssl) SRS_SSL=NO ;; | 95 | --without-ssl) SRS_SSL=NO ;; |
96 | --without-hls) SRS_HLS=NO ;; | 96 | --without-hls) SRS_HLS=NO ;; |
97 | --without-nginx) SRS_NGINX=NO ;; | 97 | --without-nginx) SRS_NGINX=NO ;; |
98 | - --without-ffmpeg) SRS_FFMPEG=NO ;; | 98 | + --without-ffmpeg) SRS_FFMPEG_TOOL=NO ;; |
99 | --without-transcode) SRS_TRANSCODE=NO ;; | 99 | --without-transcode) SRS_TRANSCODE=NO ;; |
100 | --without-ingest) SRS_INGEST=NO ;; | 100 | --without-ingest) SRS_INGEST=NO ;; |
101 | --without-http-callback) SRS_HTTP_CALLBACK=NO ;; | 101 | --without-http-callback) SRS_HTTP_CALLBACK=NO ;; |
@@ -136,15 +136,15 @@ if [ $SRS_HTTP_SERVER = YES ]; then SRS_HTTP_PARSER=YES; fi | @@ -136,15 +136,15 @@ if [ $SRS_HTTP_SERVER = YES ]; then SRS_HTTP_PARSER=YES; fi | ||
136 | if [ $SRS_HTTP_API = YES ]; then SRS_HTTP_PARSER=YES; fi | 136 | if [ $SRS_HTTP_API = YES ]; then SRS_HTTP_PARSER=YES; fi |
137 | 137 | ||
138 | # if transcode specified, try ffmpeg if possible. | 138 | # if transcode specified, try ffmpeg if possible. |
139 | -if [ $SRS_TRANSCODE = YES ]; then if [ $SRS_FFMPEG = RESERVED ]; then SRS_FFMPEG=YES; fi fi | ||
140 | -if [ $SRS_INGEST = YES ]; then if [ $SRS_FFMPEG = RESERVED ]; then SRS_FFMPEG=YES; fi fi | 139 | +if [ $SRS_TRANSCODE = YES ]; then if [ $SRS_FFMPEG_TOOL = RESERVED ]; then SRS_FFMPEG_TOOL=YES; fi fi |
140 | +if [ $SRS_INGEST = YES ]; then if [ $SRS_FFMPEG_TOOL = RESERVED ]; then SRS_FFMPEG_TOOL=YES; fi fi | ||
141 | 141 | ||
142 | # if arm specified, set some default to disabled. | 142 | # if arm specified, set some default to disabled. |
143 | if [ $SRS_ARM_UBUNTU12 = YES ]; then | 143 | if [ $SRS_ARM_UBUNTU12 = YES ]; then |
144 | if [ $SRS_HLS = RESERVED ]; then SRS_HLS=YES; fi | 144 | if [ $SRS_HLS = RESERVED ]; then SRS_HLS=YES; fi |
145 | SRS_NGINX=NO | 145 | SRS_NGINX=NO |
146 | if [ $SRS_SSL = RESERVED ]; then SRS_SSL=YES; fi | 146 | if [ $SRS_SSL = RESERVED ]; then SRS_SSL=YES; fi |
147 | - SRS_FFMPEG=NO | 147 | + SRS_FFMPEG_TOOL=NO |
148 | if [ $SRS_TRANSCODE = RESERVED ]; then SRS_TRANSCODE=YES; fi | 148 | if [ $SRS_TRANSCODE = RESERVED ]; then SRS_TRANSCODE=YES; fi |
149 | if [ $SRS_INGEST = RESERVED ]; then SRS_INGEST=YES; fi | 149 | if [ $SRS_INGEST = RESERVED ]; then SRS_INGEST=YES; fi |
150 | if [ $SRS_HTTP_PARSER = RESERVED ]; then SRS_HTTP_PARSER=YES; fi | 150 | if [ $SRS_HTTP_PARSER = RESERVED ]; then SRS_HTTP_PARSER=YES; fi |
@@ -169,7 +169,7 @@ else | @@ -169,7 +169,7 @@ else | ||
169 | if [ $SRS_HLS = RESERVED ]; then SRS_HLS=YES; fi | 169 | if [ $SRS_HLS = RESERVED ]; then SRS_HLS=YES; fi |
170 | if [ $SRS_NGINX = RESERVED ]; then SRS_NGINX=NO; fi | 170 | if [ $SRS_NGINX = RESERVED ]; then SRS_NGINX=NO; fi |
171 | if [ $SRS_SSL = RESERVED ]; then SRS_SSL=YES; fi | 171 | if [ $SRS_SSL = RESERVED ]; then SRS_SSL=YES; fi |
172 | - if [ $SRS_FFMPEG = RESERVED ]; then SRS_FFMPEG=NO; fi | 172 | + if [ $SRS_FFMPEG_TOOL = RESERVED ]; then SRS_FFMPEG_TOOL=NO; fi |
173 | if [ $SRS_TRANSCODE = RESERVED ]; then SRS_TRANSCODE=NO; fi | 173 | if [ $SRS_TRANSCODE = RESERVED ]; then SRS_TRANSCODE=NO; fi |
174 | if [ $SRS_INGEST = RESERVED ]; then SRS_INGEST=NO; fi | 174 | if [ $SRS_INGEST = RESERVED ]; then SRS_INGEST=NO; fi |
175 | if [ $SRS_HTTP_PARSER = RESERVED ]; then SRS_HTTP_PARSER=YES; fi | 175 | if [ $SRS_HTTP_PARSER = RESERVED ]; then SRS_HTTP_PARSER=YES; fi |
@@ -196,7 +196,7 @@ if [ $SRS_DEV = YES ]; then | @@ -196,7 +196,7 @@ if [ $SRS_DEV = YES ]; then | ||
196 | SRS_HLS=YES | 196 | SRS_HLS=YES |
197 | SRS_NGINX=NO | 197 | SRS_NGINX=NO |
198 | SRS_SSL=YES | 198 | SRS_SSL=YES |
199 | - SRS_FFMPEG=YES | 199 | + SRS_FFMPEG_TOOL=YES |
200 | SRS_TRANSCODE=YES | 200 | SRS_TRANSCODE=YES |
201 | SRS_INGEST=YES | 201 | SRS_INGEST=YES |
202 | SRS_HTTP_PARSER=YES | 202 | SRS_HTTP_PARSER=YES |
@@ -222,7 +222,7 @@ if [ $SRS_PI = YES ]; then | @@ -222,7 +222,7 @@ if [ $SRS_PI = YES ]; then | ||
222 | SRS_HLS=YES | 222 | SRS_HLS=YES |
223 | SRS_NGINX=NO | 223 | SRS_NGINX=NO |
224 | SRS_SSL=YES | 224 | SRS_SSL=YES |
225 | - SRS_FFMPEG=NO | 225 | + SRS_FFMPEG_TOOL=NO |
226 | SRS_TRANSCODE=YES | 226 | SRS_TRANSCODE=YES |
227 | SRS_INGEST=YES | 227 | SRS_INGEST=YES |
228 | SRS_HTTP_PARSER=YES | 228 | SRS_HTTP_PARSER=YES |
@@ -348,7 +348,7 @@ fi fi | @@ -348,7 +348,7 @@ fi fi | ||
348 | # check arm, if arm enabled, only allow st/ssl/librtmp, | 348 | # check arm, if arm enabled, only allow st/ssl/librtmp, |
349 | # user should disable all other features | 349 | # user should disable all other features |
350 | if [ $SRS_ARM_UBUNTU12 = YES ]; then | 350 | if [ $SRS_ARM_UBUNTU12 = YES ]; then |
351 | - if [ $SRS_FFMPEG = YES ]; then echo "ffmpeg for arm is not available, see: ./configure --help"; __check_ok=NO; fi | 351 | + if [ $SRS_FFMPEG_TOOL = YES ]; then echo "ffmpeg for arm is not available, see: ./configure --help"; __check_ok=NO; fi |
352 | if [ $SRS_BWTC = YES ]; then echo "bwtc for arm is not available, see: ./configure --help"; __check_ok=NO; fi | 352 | if [ $SRS_BWTC = YES ]; then echo "bwtc for arm is not available, see: ./configure --help"; __check_ok=NO; fi |
353 | if [ $SRS_RESEARCH = YES ]; then echo "research for arm is not available, see: ./configure --help"; __check_ok=NO; fi | 353 | if [ $SRS_RESEARCH = YES ]; then echo "research for arm is not available, see: ./configure --help"; __check_ok=NO; fi |
354 | if [ $SRS_GPERF = YES ]; then echo "gperf for arm is not available, see: ./configure --help"; __check_ok=NO; fi | 354 | if [ $SRS_GPERF = YES ]; then echo "gperf for arm is not available, see: ./configure --help"; __check_ok=NO; fi |
@@ -362,7 +362,7 @@ fi | @@ -362,7 +362,7 @@ fi | ||
362 | if [ $SRS_HLS = RESERVED ]; then echo "you must specifies the hls, see: ./configure --help"; __check_ok=NO; fi | 362 | if [ $SRS_HLS = RESERVED ]; then echo "you must specifies the hls, see: ./configure --help"; __check_ok=NO; fi |
363 | if [ $SRS_NGINX = RESERVED ]; then echo "you must specifies the nginx, see: ./configure --help"; __check_ok=NO; fi | 363 | if [ $SRS_NGINX = RESERVED ]; then echo "you must specifies the nginx, see: ./configure --help"; __check_ok=NO; fi |
364 | if [ $SRS_SSL = RESERVED ]; then echo "you must specifies the ssl, see: ./configure --help"; __check_ok=NO; fi | 364 | if [ $SRS_SSL = RESERVED ]; then echo "you must specifies the ssl, see: ./configure --help"; __check_ok=NO; fi |
365 | -if [ $SRS_FFMPEG = RESERVED ]; then echo "you must specifies the ffmpeg, see: ./configure --help"; __check_ok=NO; fi | 365 | +if [ $SRS_FFMPEG_TOOL = RESERVED ]; then echo "you must specifies the ffmpeg, see: ./configure --help"; __check_ok=NO; fi |
366 | if [ $SRS_HTTP_CALLBACK = RESERVED ]; then echo "you must specifies the http-callback, see: ./configure --help"; __check_ok=NO; fi | 366 | if [ $SRS_HTTP_CALLBACK = RESERVED ]; then echo "you must specifies the http-callback, see: ./configure --help"; __check_ok=NO; fi |
367 | if [ $SRS_HTTP_SERVER = RESERVED ]; then echo "you must specifies the http-server, see: ./configure --help"; __check_ok=NO; fi | 367 | if [ $SRS_HTTP_SERVER = RESERVED ]; then echo "you must specifies the http-server, see: ./configure --help"; __check_ok=NO; fi |
368 | if [ $SRS_HTTP_API = RESERVED ]; then echo "you must specifies the http-api, see: ./configure --help"; __check_ok=NO; fi | 368 | if [ $SRS_HTTP_API = RESERVED ]; then echo "you must specifies the http-api, see: ./configure --help"; __check_ok=NO; fi |
@@ -388,7 +388,7 @@ if [ $SRS_PI = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --pi"; fi | @@ -388,7 +388,7 @@ if [ $SRS_PI = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --pi"; fi | ||
388 | if [ $SRS_HLS = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-hls"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-hls"; fi | 388 | if [ $SRS_HLS = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-hls"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-hls"; fi |
389 | if [ $SRS_NGINX = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-nginx"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-nginx"; fi | 389 | if [ $SRS_NGINX = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-nginx"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-nginx"; fi |
390 | if [ $SRS_SSL = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-ssl"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-ssl"; fi | 390 | if [ $SRS_SSL = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-ssl"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-ssl"; fi |
391 | -if [ $SRS_FFMPEG = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-ffmpeg"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-ffmpeg"; fi | 391 | +if [ $SRS_FFMPEG_TOOL = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-ffmpeg"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-ffmpeg"; fi |
392 | if [ $SRS_TRANSCODE = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-transcode"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-transcode"; fi | 392 | if [ $SRS_TRANSCODE = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-transcode"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-transcode"; fi |
393 | if [ $SRS_INGEST = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-ingest"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-ingest"; fi | 393 | if [ $SRS_INGEST = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-ingest"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-ingest"; fi |
394 | if [ $SRS_HTTP_CALLBACK = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-http-callback"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-http-callback"; fi | 394 | if [ $SRS_HTTP_CALLBACK = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-http-callback"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-http-callback"; fi |
@@ -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_NGINX/SRS_FFMPEG/SRS_HTTP_CALLBACK/...... | 19 | +# srs features: SRS_SSL/SRS_HLS/SRS_NGINX/SRS_FFMPEG_TOOL/SRS_HTTP_CALLBACK/...... |
20 | # build options: SRS_JOBS | 20 | # build options: SRS_JOBS |
21 | ##################################################################################### | 21 | ##################################################################################### |
22 | SRS_AUTO_HEADERS_H="${SRS_OBJS}/srs_auto_headers.hpp" | 22 | SRS_AUTO_HEADERS_H="${SRS_OBJS}/srs_auto_headers.hpp" |
@@ -84,7 +84,7 @@ if [ $SRS_UTEST = YES ]; then SrsUtestMakeEntry="(cd ${SRS_OBJS}/utest; \$(MAKE) | @@ -84,7 +84,7 @@ if [ $SRS_UTEST = YES ]; then SrsUtestMakeEntry="(cd ${SRS_OBJS}/utest; \$(MAKE) | ||
84 | SrsHlsSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_HLS = YES ]; then SrsHlsSummaryColor="\${GREEN}"; fi | 84 | SrsHlsSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_HLS = YES ]; then SrsHlsSummaryColor="\${GREEN}"; fi |
85 | SrsNginxSummaryColor="\${GREEN}{disabled} "; if [ $SRS_NGINX = YES ]; then SrsNginxSummaryColor="\${GREEN}"; fi | 85 | SrsNginxSummaryColor="\${GREEN}{disabled} "; if [ $SRS_NGINX = YES ]; then SrsNginxSummaryColor="\${GREEN}"; fi |
86 | SrsSslSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_SSL = YES ]; then SrsSslSummaryColor="\${GREEN}"; fi | 86 | SrsSslSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_SSL = YES ]; then SrsSslSummaryColor="\${GREEN}"; fi |
87 | -SrsFfmpegSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_FFMPEG = YES ]; then SrsFfmpegSummaryColor="\${GREEN}"; fi | 87 | +SrsFfmpegSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_FFMPEG_TOOL = YES ]; then SrsFfmpegSummaryColor="\${GREEN}"; fi |
88 | SrsTranscodeSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_TRANSCODE = YES ]; then SrsTranscodeSummaryColor="\${GREEN}"; fi | 88 | SrsTranscodeSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_TRANSCODE = YES ]; then SrsTranscodeSummaryColor="\${GREEN}"; fi |
89 | SrsIngestSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_INGEST = YES ]; then SrsIngestSummaryColor="\${GREEN}"; fi | 89 | SrsIngestSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_INGEST = YES ]; then SrsIngestSummaryColor="\${GREEN}"; fi |
90 | SrsHttpCallbackSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_HTTP_CALLBACK = YES ]; then SrsHttpCallbackSummaryColor="\${GREEN}"; fi | 90 | SrsHttpCallbackSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_HTTP_CALLBACK = YES ]; then SrsHttpCallbackSummaryColor="\${GREEN}"; fi |
@@ -520,7 +520,7 @@ if [ $SRS_SSL = YES ]; then | @@ -520,7 +520,7 @@ if [ $SRS_SSL = YES ]; then | ||
520 | else | 520 | else |
521 | echo -e "${YELLOW}warning: without rtmp complex handshake support, donot support h264/aac to adobe flash player${BLACK}" | 521 | echo -e "${YELLOW}warning: without rtmp complex handshake support, donot support h264/aac to adobe flash player${BLACK}" |
522 | fi | 522 | fi |
523 | -if [ $SRS_FFMPEG = YES ]; then | 523 | +if [ $SRS_FFMPEG_TOOL = YES ]; then |
524 | echo -e "${GREEN}transcode/mux/ingest tool FFMPEG is enabled${BLACK}" | 524 | echo -e "${GREEN}transcode/mux/ingest tool FFMPEG is enabled${BLACK}" |
525 | else | 525 | else |
526 | echo -e "${YELLOW}warning: without transcode/mux/ingest tool FFMPEG support${BLACK}" | 526 | echo -e "${YELLOW}warning: without transcode/mux/ingest tool FFMPEG support${BLACK}" |
@@ -613,7 +613,7 @@ if [ $SRS_NGINX = YES ]; then | @@ -613,7 +613,7 @@ if [ $SRS_NGINX = YES ]; then | ||
613 | echo "\" sudo ./objs/nginx/sbin/nginx \" to start the nginx http server for hls" | 613 | echo "\" sudo ./objs/nginx/sbin/nginx \" to start the nginx http server for hls" |
614 | echo "\" http://$ip \" rtmp players(OSMF/JWPlayer)" | 614 | echo "\" http://$ip \" rtmp players(OSMF/JWPlayer)" |
615 | fi | 615 | fi |
616 | -if [ $SRS_FFMPEG = YES ]; then | 616 | +if [ $SRS_FFMPEG_TOOL = YES ]; then |
617 | echo -e "\" ./objs/ffmpeg/bin/ffmpeg \" is used for live stream transcoding" | 617 | echo -e "\" ./objs/ffmpeg/bin/ffmpeg \" is used for live stream transcoding" |
618 | fi | 618 | fi |
619 | if [ $SRS_HTTP_CALLBACK = YES ]; then | 619 | if [ $SRS_HTTP_CALLBACK = YES ]; then |
@@ -289,7 +289,7 @@ int SrsEncoder::initialize_ffmpeg(SrsFFMPEG* ffmpeg, SrsRequest* req, SrsConfDir | @@ -289,7 +289,7 @@ int SrsEncoder::initialize_ffmpeg(SrsFFMPEG* ffmpeg, SrsRequest* req, SrsConfDir | ||
289 | // write ffmpeg info to log file. | 289 | // write ffmpeg info to log file. |
290 | log_file = _srs_config->get_ffmpeg_log_dir(); | 290 | log_file = _srs_config->get_ffmpeg_log_dir(); |
291 | log_file += "/"; | 291 | log_file += "/"; |
292 | - log_file += "encoder"; | 292 | + log_file += "ffmpeg-encoder"; |
293 | log_file += "-"; | 293 | log_file += "-"; |
294 | log_file += req->vhost; | 294 | log_file += req->vhost; |
295 | log_file += "-"; | 295 | log_file += "-"; |
@@ -39,7 +39,7 @@ using namespace std; | @@ -39,7 +39,7 @@ using namespace std; | ||
39 | #include <srs_app_pithy_print.hpp> | 39 | #include <srs_app_pithy_print.hpp> |
40 | #include <srs_protocol_rtmp_stack.hpp> | 40 | #include <srs_protocol_rtmp_stack.hpp> |
41 | 41 | ||
42 | -#ifdef SRS_FFMPEG | 42 | +#ifdef SRS_FFMPEG_STUB |
43 | 43 | ||
44 | #define SRS_ENCODER_COPY "copy" | 44 | #define SRS_ENCODER_COPY "copy" |
45 | #define SRS_ENCODER_NO_VIDEO "vn" | 45 | #define SRS_ENCODER_NO_VIDEO "vn" |
@@ -29,7 +29,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -29,7 +29,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
29 | */ | 29 | */ |
30 | #include <srs_core.hpp> | 30 | #include <srs_core.hpp> |
31 | 31 | ||
32 | -#ifdef SRS_FFMPEG | 32 | +#ifdef SRS_FFMPEG_STUB |
33 | 33 | ||
34 | #include <string> | 34 | #include <string> |
35 | #include <vector> | 35 | #include <vector> |
@@ -246,7 +246,7 @@ int SrsIngester::initialize_ffmpeg(SrsFFMPEG* ffmpeg, SrsConfDirective* vhost, S | @@ -246,7 +246,7 @@ int SrsIngester::initialize_ffmpeg(SrsFFMPEG* ffmpeg, SrsConfDirective* vhost, S | ||
246 | // write ffmpeg info to log file. | 246 | // write ffmpeg info to log file. |
247 | log_file = _srs_config->get_ffmpeg_log_dir(); | 247 | log_file = _srs_config->get_ffmpeg_log_dir(); |
248 | log_file += "/"; | 248 | log_file += "/"; |
249 | - log_file += "ingest"; | 249 | + log_file += "ffmpeg-ingest"; |
250 | log_file += "-"; | 250 | log_file += "-"; |
251 | log_file += vhost->arg0(); | 251 | log_file += vhost->arg0(); |
252 | log_file += "-"; | 252 | log_file += "-"; |
@@ -305,6 +305,7 @@ int SrsIngester::initialize_ffmpeg(SrsFFMPEG* ffmpeg, SrsConfDirective* vhost, S | @@ -305,6 +305,7 @@ int SrsIngester::initialize_ffmpeg(SrsFFMPEG* ffmpeg, SrsConfDirective* vhost, S | ||
305 | 305 | ||
306 | std::string vcodec = _srs_config->get_engine_vcodec(engine); | 306 | std::string vcodec = _srs_config->get_engine_vcodec(engine); |
307 | std::string acodec = _srs_config->get_engine_acodec(engine); | 307 | std::string acodec = _srs_config->get_engine_acodec(engine); |
308 | + // whatever the engine config, use copy as default. | ||
308 | if (!engine || !_srs_config->get_engine_enabled(engine) || vcodec.empty() || acodec.empty()) { | 309 | if (!engine || !_srs_config->get_engine_enabled(engine) || vcodec.empty() || acodec.empty()) { |
309 | if ((ret = ffmpeg->initialize_copy()) != ERROR_SUCCESS) { | 310 | if ((ret = ffmpeg->initialize_copy()) != ERROR_SUCCESS) { |
310 | return ret; | 311 | return ret; |
@@ -163,6 +163,9 @@ SrsServer::SrsServer() | @@ -163,6 +163,9 @@ SrsServer::SrsServer() | ||
163 | srs_assert(_srs_config); | 163 | srs_assert(_srs_config); |
164 | _srs_config->subscribe(this); | 164 | _srs_config->subscribe(this); |
165 | 165 | ||
166 | + // donot new object in constructor, | ||
167 | + // for some global instance is not ready now, | ||
168 | + // new these objects in initialize instead. | ||
166 | #ifdef SRS_HTTP_API | 169 | #ifdef SRS_HTTP_API |
167 | http_api_handler = NULL; | 170 | http_api_handler = NULL; |
168 | #endif | 171 | #endif |
-
请 注册 或 登录 后发表评论