mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
use --with-ffmpeg to compile FFMPEG tool only, use --with-transcode for transcoding
This commit is contained in:
parent
5ff1d589f7
commit
983fe46ce2
8 changed files with 37 additions and 15 deletions
|
@ -510,6 +510,12 @@ else
|
||||||
echo "#undef SRS_FFMPEG" >> $SRS_AUTO_HEADERS_H
|
echo "#undef SRS_FFMPEG" >> $SRS_AUTO_HEADERS_H
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $SRS_TRANSCODE = YES ]; then
|
||||||
|
echo "#define SRS_TRANSCODE" >> $SRS_AUTO_HEADERS_H
|
||||||
|
else
|
||||||
|
echo "#undef SRS_TRANSCODE" >> $SRS_AUTO_HEADERS_H
|
||||||
|
fi
|
||||||
|
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
# build research code
|
# build research code
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
|
|
|
@ -76,6 +76,7 @@ do
|
||||||
--with-hls) SRS_HLS=YES ;;
|
--with-hls) SRS_HLS=YES ;;
|
||||||
--with-nginx) SRS_NGINX=YES ;;
|
--with-nginx) SRS_NGINX=YES ;;
|
||||||
--with-ffmpeg) SRS_FFMPEG=YES ;;
|
--with-ffmpeg) SRS_FFMPEG=YES ;;
|
||||||
|
--with-transcode) SRS_TRANSCODE=YES ;;
|
||||||
--with-http-callback) SRS_HTTP_CALLBACK=YES ;;
|
--with-http-callback) SRS_HTTP_CALLBACK=YES ;;
|
||||||
--with-http-server) SRS_HTTP_SERVER=YES ;;
|
--with-http-server) SRS_HTTP_SERVER=YES ;;
|
||||||
--with-http-api) SRS_HTTP_API=YES ;;
|
--with-http-api) SRS_HTTP_API=YES ;;
|
||||||
|
@ -94,6 +95,7 @@ do
|
||||||
--without-hls) SRS_HLS=NO ;;
|
--without-hls) SRS_HLS=NO ;;
|
||||||
--without-nginx) SRS_NGINX=NO ;;
|
--without-nginx) SRS_NGINX=NO ;;
|
||||||
--without-ffmpeg) SRS_FFMPEG=NO ;;
|
--without-ffmpeg) SRS_FFMPEG=NO ;;
|
||||||
|
--without-transcode) SRS_TRANSCODE=NO ;;
|
||||||
--without-http-callback) SRS_HTTP_CALLBACK=NO ;;
|
--without-http-callback) SRS_HTTP_CALLBACK=NO ;;
|
||||||
--without-http-server) SRS_HTTP_SERVER=NO ;;
|
--without-http-server) SRS_HTTP_SERVER=NO ;;
|
||||||
--without-http-api) SRS_HTTP_API=NO ;;
|
--without-http-api) SRS_HTTP_API=NO ;;
|
||||||
|
@ -132,6 +134,7 @@ if [ $SRS_ARM_UBUNTU12 = YES ]; then
|
||||||
if [ $SRS_NGINX = RESERVED ]; then SRS_NGINX=NO; fi
|
if [ $SRS_NGINX = RESERVED ]; then SRS_NGINX=NO; fi
|
||||||
if [ $SRS_SSL = RESERVED ]; then SRS_SSL=YES; fi
|
if [ $SRS_SSL = RESERVED ]; then SRS_SSL=YES; fi
|
||||||
if [ $SRS_FFMPEG = RESERVED ]; then SRS_FFMPEG=NO; fi
|
if [ $SRS_FFMPEG = RESERVED ]; then SRS_FFMPEG=NO; fi
|
||||||
|
if [ $SRS_TRANSCODE = RESERVED ]; then SRS_TRANSCODE=NO; fi
|
||||||
if [ $SRS_HTTP_CALLBACK = RESERVED ]; then SRS_HTTP_CALLBACK=NO; fi
|
if [ $SRS_HTTP_CALLBACK = RESERVED ]; then SRS_HTTP_CALLBACK=NO; fi
|
||||||
if [ $SRS_HTTP_SERVER = RESERVED ]; then SRS_HTTP_SERVER=YES; fi
|
if [ $SRS_HTTP_SERVER = RESERVED ]; then SRS_HTTP_SERVER=YES; fi
|
||||||
if [ $SRS_HTTP_API = RESERVED ]; then SRS_HTTP_API=YES; fi
|
if [ $SRS_HTTP_API = RESERVED ]; then SRS_HTTP_API=YES; fi
|
||||||
|
@ -154,6 +157,7 @@ else
|
||||||
if [ $SRS_NGINX = RESERVED ]; then SRS_NGINX=NO; fi
|
if [ $SRS_NGINX = RESERVED ]; then SRS_NGINX=NO; fi
|
||||||
if [ $SRS_SSL = RESERVED ]; then SRS_SSL=YES; fi
|
if [ $SRS_SSL = RESERVED ]; then SRS_SSL=YES; fi
|
||||||
if [ $SRS_FFMPEG = RESERVED ]; then SRS_FFMPEG=NO; fi
|
if [ $SRS_FFMPEG = RESERVED ]; then SRS_FFMPEG=NO; fi
|
||||||
|
if [ $SRS_TRANSCODE = RESERVED ]; then SRS_TRANSCODE=NO; fi
|
||||||
if [ $SRS_HTTP_CALLBACK = RESERVED ]; then SRS_HTTP_CALLBACK=NO; fi
|
if [ $SRS_HTTP_CALLBACK = RESERVED ]; then SRS_HTTP_CALLBACK=NO; fi
|
||||||
if [ $SRS_HTTP_SERVER = RESERVED ]; then SRS_HTTP_SERVER=YES; fi
|
if [ $SRS_HTTP_SERVER = RESERVED ]; then SRS_HTTP_SERVER=YES; fi
|
||||||
if [ $SRS_HTTP_API = RESERVED ]; then SRS_HTTP_API=YES; fi
|
if [ $SRS_HTTP_API = RESERVED ]; then SRS_HTTP_API=YES; fi
|
||||||
|
@ -178,6 +182,7 @@ if [ $SRS_DEV = YES ]; then
|
||||||
SRS_NGINX=NO
|
SRS_NGINX=NO
|
||||||
SRS_SSL=YES
|
SRS_SSL=YES
|
||||||
SRS_FFMPEG=YES
|
SRS_FFMPEG=YES
|
||||||
|
SRS_TRANSCODE=YES
|
||||||
SRS_HTTP_CALLBACK=YES
|
SRS_HTTP_CALLBACK=YES
|
||||||
SRS_HTTP_SERVER=YES
|
SRS_HTTP_SERVER=YES
|
||||||
SRS_HTTP_API=YES
|
SRS_HTTP_API=YES
|
||||||
|
@ -201,6 +206,7 @@ if [ $SRS_PI = YES ]; then
|
||||||
SRS_NGINX=NO
|
SRS_NGINX=NO
|
||||||
SRS_SSL=YES
|
SRS_SSL=YES
|
||||||
if [ $SRS_FFMPEG = RESERVED ]; then SRS_FFMPEG=NO; fi
|
if [ $SRS_FFMPEG = RESERVED ]; then SRS_FFMPEG=NO; fi
|
||||||
|
if [ $SRS_TRANSCODE = RESERVED ]; then SRS_TRANSCODE=NO; fi
|
||||||
SRS_HTTP_CALLBACK=NO
|
SRS_HTTP_CALLBACK=NO
|
||||||
SRS_HTTP_SERVER=YES
|
SRS_HTTP_SERVER=YES
|
||||||
SRS_HTTP_API=YES
|
SRS_HTTP_API=YES
|
||||||
|
@ -223,6 +229,9 @@ if [ $SRS_HTTP_CALLBACK = YES ]; then SRS_HTTP_PARSER=YES; fi
|
||||||
if [ $SRS_HTTP_SERVER = YES ]; then SRS_HTTP_PARSER=YES; fi
|
if [ $SRS_HTTP_SERVER = YES ]; then SRS_HTTP_PARSER=YES; fi
|
||||||
if [ $SRS_HTTP_API = YES ]; then SRS_HTTP_PARSER=YES; fi
|
if [ $SRS_HTTP_API = YES ]; then SRS_HTTP_PARSER=YES; fi
|
||||||
|
|
||||||
|
# if transcode specified, try ffmpeg if possible.
|
||||||
|
if [ $SRS_TRANSCODE = YES ]; then if [ $SRS_FFMPEG = RESERVED ]; then SRS_FFMPEG=YES; fi fi
|
||||||
|
|
||||||
# parse the jobs for make
|
# parse the jobs for make
|
||||||
if [[ "" -eq SRS_JOBS ]]; then
|
if [[ "" -eq SRS_JOBS ]]; then
|
||||||
export SRS_JOBS="--jobs"
|
export SRS_JOBS="--jobs"
|
||||||
|
@ -249,8 +258,10 @@ if [ $help = yes ]; then
|
||||||
--with-http-callback enable http hooks, build cherrypy as demo api server.
|
--with-http-callback enable http hooks, build cherrypy as demo api server.
|
||||||
--with-http-server enable http server to delivery http stream.
|
--with-http-server enable http server to delivery http stream.
|
||||||
--with-http-api enable http api, to manage SRS by http api.
|
--with-http-api enable http api, to manage SRS by http api.
|
||||||
--with-ffmpeg enable transcoding with ffmpeg.
|
--with-ffmpeg enable transcoding tool ffmpeg.
|
||||||
build ffmpeg at: ./objs/ffmpeg/bin/ffmpeg
|
build ffmpeg at: ./objs/ffmpeg/bin/ffmpeg
|
||||||
|
--with-transcode enable transcoding features.
|
||||||
|
user must specifies the transcode tools in conf.
|
||||||
--with-librtmp enable srs-librtmp, library for client.
|
--with-librtmp enable srs-librtmp, library for client.
|
||||||
--with-bwtc enable SRS bandwidth test client tool.
|
--with-bwtc enable SRS bandwidth test client tool.
|
||||||
--with-research build the research tools.
|
--with-research build the research tools.
|
||||||
|
@ -268,7 +279,8 @@ if [ $help = yes ]; then
|
||||||
--without-http-callback disable http, http hooks callback.
|
--without-http-callback disable http, http hooks callback.
|
||||||
--without-http-server disable http server, use external server to delivery http stream.
|
--without-http-server disable http server, use external server to delivery http stream.
|
||||||
--without-http-api disable http api, only use console to manage SRS process.
|
--without-http-api disable http api, only use console to manage SRS process.
|
||||||
--without-ffmpeg disable the ffmpeg transcoding feature.
|
--without-ffmpeg disable the ffmpeg transcode tool feature.
|
||||||
|
--without-transcode disable the transcoding feature.
|
||||||
--without-librtmp disable srs-librtmp, library for client.
|
--without-librtmp disable srs-librtmp, library for client.
|
||||||
--without-bwtc disable SRS bandwidth test client tool.
|
--without-bwtc disable SRS bandwidth test client tool.
|
||||||
--without-research do not build the research tools.
|
--without-research do not build the research tools.
|
||||||
|
@ -364,6 +376,7 @@ if [ $SRS_HLS = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-hls"; else SR
|
||||||
if [ $SRS_NGINX = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-nginx"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-nginx"; fi
|
if [ $SRS_NGINX = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-nginx"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-nginx"; fi
|
||||||
if [ $SRS_SSL = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-ssl"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-ssl"; fi
|
if [ $SRS_SSL = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-ssl"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-ssl"; fi
|
||||||
if [ $SRS_FFMPEG = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-ffmpeg"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-ffmpeg"; fi
|
if [ $SRS_FFMPEG = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-ffmpeg"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-ffmpeg"; fi
|
||||||
|
if [ $SRS_TRANSCODE = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-transcode"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-transcode"; fi
|
||||||
if [ $SRS_HTTP_CALLBACK = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-http-callback"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-http-callback"; fi
|
if [ $SRS_HTTP_CALLBACK = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-http-callback"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-http-callback"; fi
|
||||||
if [ $SRS_HTTP_SERVER = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-http-server"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-http-server"; fi
|
if [ $SRS_HTTP_SERVER = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-http-server"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-http-server"; fi
|
||||||
if [ $SRS_HTTP_API = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-http-api"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-http-api"; fi
|
if [ $SRS_HTTP_API = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-http-api"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-http-api"; fi
|
||||||
|
|
7
trunk/configure
vendored
7
trunk/configure
vendored
|
@ -82,9 +82,10 @@ if [ $SRS_UTEST = YES ]; then SrsUtestMakeEntry="(cd ${SRS_OBJS}/utest; \$(MAKE)
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
# colorful summary
|
# colorful summary
|
||||||
SrsHlsSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_HLS = YES ]; then SrsHlsSummaryColor="\${GREEN}"; fi
|
SrsHlsSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_HLS = YES ]; then SrsHlsSummaryColor="\${GREEN}"; fi
|
||||||
SrsNginxSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_NGINX = YES ]; then SrsNginxSummaryColor="\${GREEN}"; fi
|
SrsNginxSummaryColor="\${GREEN}{disabled} "; if [ $SRS_NGINX = YES ]; then SrsNginxSummaryColor="\${GREEN}"; fi
|
||||||
SrsSslSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_SSL = YES ]; then SrsSslSummaryColor="\${GREEN}"; fi
|
SrsSslSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_SSL = YES ]; then SrsSslSummaryColor="\${GREEN}"; fi
|
||||||
SrsFfmpegSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_FFMPEG = YES ]; then SrsFfmpegSummaryColor="\${GREEN}"; fi
|
SrsFfmpegSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_FFMPEG = YES ]; then SrsFfmpegSummaryColor="\${GREEN}"; fi
|
||||||
|
SrsTranscodeSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_TRANSCODE = YES ]; then SrsTranscodeSummaryColor="\${GREEN}"; fi
|
||||||
SrsHttpCallbackSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_HTTP_CALLBACK = YES ]; then SrsHttpCallbackSummaryColor="\${GREEN}"; fi
|
SrsHttpCallbackSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_HTTP_CALLBACK = YES ]; then SrsHttpCallbackSummaryColor="\${GREEN}"; fi
|
||||||
SrsHttpServerSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_HTTP_SERVER = YES ]; then SrsHttpServerSummaryColor="\${GREEN}"; fi
|
SrsHttpServerSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_HTTP_SERVER = YES ]; then SrsHttpServerSummaryColor="\${GREEN}"; fi
|
||||||
SrsHttpApiSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_HTTP_API = YES ]; then SrsHttpApiSummaryColor="\${GREEN}"; fi
|
SrsHttpApiSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_HTTP_API = YES ]; then SrsHttpApiSummaryColor="\${GREEN}"; fi
|
||||||
|
@ -152,7 +153,9 @@ echo -e " | ${SrsNginxSummaryColor}nginx: delivery HLS stream by nginx\$
|
||||||
echo -e " | ${SrsSslSummaryColor}ssl @see: https://github.com/winlinvip/simple-rtmp-server/wiki/RTMPHandshake\${BLACK}"
|
echo -e " | ${SrsSslSummaryColor}ssl @see: https://github.com/winlinvip/simple-rtmp-server/wiki/RTMPHandshake\${BLACK}"
|
||||||
echo -e " | ${SrsSslSummaryColor}ssl: support RTMP complex handshake for client required, for instance, flash\${BLACK}"
|
echo -e " | ${SrsSslSummaryColor}ssl: support RTMP complex handshake for client required, for instance, flash\${BLACK}"
|
||||||
echo -e " | ${SrsFfmpegSummaryColor}ffmpeg @see: https://github.com/winlinvip/simple-rtmp-server/wiki/FFMPEG\${BLACK}"
|
echo -e " | ${SrsFfmpegSummaryColor}ffmpeg @see: https://github.com/winlinvip/simple-rtmp-server/wiki/FFMPEG\${BLACK}"
|
||||||
echo -e " | ${SrsFfmpegSummaryColor}ffmpeg: support transcoding RTMP stream with FFMPEG\${BLACK}"
|
echo -e " | ${SrsFfmpegSummaryColor}ffmpeg: transcode, mux, ingest tool\${BLACK}"
|
||||||
|
echo -e " | ${SrsTranscodeSummaryColor}transcode @see: https://github.com/winlinvip/simple-rtmp-server/wiki/FFMPEG\${BLACK}"
|
||||||
|
echo -e " | ${SrsTranscodeSummaryColor}transcode: support transcoding RTMP stream\${BLACK}"
|
||||||
echo -e " | ${SrsHttpCallbackSummaryColor}http-callback @see: https://github.com/winlinvip/simple-rtmp-server/wiki/HTTPCallback\${BLACK}"
|
echo -e " | ${SrsHttpCallbackSummaryColor}http-callback @see: https://github.com/winlinvip/simple-rtmp-server/wiki/HTTPCallback\${BLACK}"
|
||||||
echo -e " | ${SrsHttpCallbackSummaryColor}http-callback: support http callback for authentication and event injection\${BLACK}"
|
echo -e " | ${SrsHttpCallbackSummaryColor}http-callback: support http callback for authentication and event injection\${BLACK}"
|
||||||
echo -e " | ${SrsHttpServerSummaryColor}http-server @see: https://github.com/winlinvip/simple-rtmp-server/wiki/HTTPServer\${BLACK}"
|
echo -e " | ${SrsHttpServerSummaryColor}http-server @see: https://github.com/winlinvip/simple-rtmp-server/wiki/HTTPServer\${BLACK}"
|
||||||
|
|
|
@ -3,7 +3,7 @@ src_dir='src'
|
||||||
if [[ ! -d $src_dir ]]; then echo "错误:必须在src同目录执行脚本"; exit 1; fi
|
if [[ ! -d $src_dir ]]; then echo "错误:必须在src同目录执行脚本"; exit 1; fi
|
||||||
|
|
||||||
echo "编译SRS"
|
echo "编译SRS"
|
||||||
./configure --with-ssl --with-hls --with-http-server --with-ffmpeg --with-http-callback && make
|
./configure --with-ssl --with-hls --with-http-server --with-ffmpeg --with-transcode --with-http-callback && make
|
||||||
ret=$?; if [[ 0 -ne $ret ]]; then echo "错误:编译SRS失败"; exit $ret; fi
|
ret=$?; if [[ 0 -ne $ret ]]; then echo "错误:编译SRS失败"; exit $ret; fi
|
||||||
|
|
||||||
echo "编译SRS成功"
|
echo "编译SRS成功"
|
||||||
|
|
|
@ -39,7 +39,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#include <srs_app_pithy_print.hpp>
|
#include <srs_app_pithy_print.hpp>
|
||||||
#include <srs_protocol_rtmp_stack.hpp>
|
#include <srs_protocol_rtmp_stack.hpp>
|
||||||
|
|
||||||
#ifdef SRS_FFMPEG
|
#ifdef SRS_TRANSCODE
|
||||||
|
|
||||||
#define SRS_ENCODER_COPY "copy"
|
#define SRS_ENCODER_COPY "copy"
|
||||||
#define SRS_ENCODER_NO_VIDEO "vn"
|
#define SRS_ENCODER_NO_VIDEO "vn"
|
||||||
|
|
|
@ -29,6 +29,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
#include <srs_core.hpp>
|
#include <srs_core.hpp>
|
||||||
|
|
||||||
|
#ifdef SRS_TRANSCODE
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
@ -38,8 +40,6 @@ class SrsConfDirective;
|
||||||
class SrsRequest;
|
class SrsRequest;
|
||||||
class SrsPithyPrint;
|
class SrsPithyPrint;
|
||||||
|
|
||||||
#ifdef SRS_FFMPEG
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* a transcode engine: ffmepg,
|
* a transcode engine: ffmepg,
|
||||||
* used to transcode a stream to another.
|
* used to transcode a stream to another.
|
||||||
|
|
|
@ -431,7 +431,7 @@ SrsSource::SrsSource(SrsRequest* _req)
|
||||||
#ifdef SRS_HLS
|
#ifdef SRS_HLS
|
||||||
hls = new SrsHls(this);
|
hls = new SrsHls(this);
|
||||||
#endif
|
#endif
|
||||||
#ifdef SRS_FFMPEG
|
#ifdef SRS_TRANSCODE
|
||||||
encoder = new SrsEncoder();
|
encoder = new SrsEncoder();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -477,7 +477,7 @@ SrsSource::~SrsSource()
|
||||||
#ifdef SRS_HLS
|
#ifdef SRS_HLS
|
||||||
srs_freep(hls);
|
srs_freep(hls);
|
||||||
#endif
|
#endif
|
||||||
#ifdef SRS_FFMPEG
|
#ifdef SRS_TRANSCODE
|
||||||
srs_freep(encoder);
|
srs_freep(encoder);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -586,7 +586,7 @@ int SrsSource::on_reload_transcode(string vhost)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SRS_FFMPEG
|
#ifdef SRS_TRANSCODE
|
||||||
encoder->on_unpublish();
|
encoder->on_unpublish();
|
||||||
if ((ret = encoder->on_publish(req)) != ERROR_SUCCESS) {
|
if ((ret = encoder->on_publish(req)) != ERROR_SUCCESS) {
|
||||||
srs_error("start encoder failed. ret=%d", ret);
|
srs_error("start encoder failed. ret=%d", ret);
|
||||||
|
@ -900,7 +900,7 @@ int SrsSource::on_publish(SrsRequest* _req)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SRS_FFMPEG
|
#ifdef SRS_TRANSCODE
|
||||||
if ((ret = encoder->on_publish(req)) != ERROR_SUCCESS) {
|
if ((ret = encoder->on_publish(req)) != ERROR_SUCCESS) {
|
||||||
srs_error("start encoder failed. ret=%d", ret);
|
srs_error("start encoder failed. ret=%d", ret);
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -922,7 +922,7 @@ void SrsSource::on_unpublish()
|
||||||
// destroy all forwarders
|
// destroy all forwarders
|
||||||
destroy_forwarders();
|
destroy_forwarders();
|
||||||
|
|
||||||
#ifdef SRS_FFMPEG
|
#ifdef SRS_TRANSCODE
|
||||||
encoder->on_unpublish();
|
encoder->on_unpublish();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ class SrsRequest;
|
||||||
#ifdef SRS_HLS
|
#ifdef SRS_HLS
|
||||||
class SrsHls;
|
class SrsHls;
|
||||||
#endif
|
#endif
|
||||||
#ifdef SRS_FFMPEG
|
#ifdef SRS_TRANSCODE
|
||||||
class SrsEncoder;
|
class SrsEncoder;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -224,7 +224,7 @@ private:
|
||||||
SrsHls* hls;
|
SrsHls* hls;
|
||||||
#endif
|
#endif
|
||||||
// transcoding handler.
|
// transcoding handler.
|
||||||
#ifdef SRS_FFMPEG
|
#ifdef SRS_TRANSCODE
|
||||||
SrsEncoder* encoder;
|
SrsEncoder* encoder;
|
||||||
#endif
|
#endif
|
||||||
// gop cache for client fast startup.
|
// gop cache for client fast startup.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue