1
0
Fork 0
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:
winlin 2014-04-06 20:30:51 +08:00
parent 5ff1d589f7
commit 983fe46ce2
8 changed files with 37 additions and 15 deletions

View file

@ -431,7 +431,7 @@ SrsSource::SrsSource(SrsRequest* _req)
#ifdef SRS_HLS
hls = new SrsHls(this);
#endif
#ifdef SRS_FFMPEG
#ifdef SRS_TRANSCODE
encoder = new SrsEncoder();
#endif
@ -477,7 +477,7 @@ SrsSource::~SrsSource()
#ifdef SRS_HLS
srs_freep(hls);
#endif
#ifdef SRS_FFMPEG
#ifdef SRS_TRANSCODE
srs_freep(encoder);
#endif
@ -586,7 +586,7 @@ int SrsSource::on_reload_transcode(string vhost)
return ret;
}
#ifdef SRS_FFMPEG
#ifdef SRS_TRANSCODE
encoder->on_unpublish();
if ((ret = encoder->on_publish(req)) != ERROR_SUCCESS) {
srs_error("start encoder failed. ret=%d", ret);
@ -900,7 +900,7 @@ int SrsSource::on_publish(SrsRequest* _req)
return ret;
}
#ifdef SRS_FFMPEG
#ifdef SRS_TRANSCODE
if ((ret = encoder->on_publish(req)) != ERROR_SUCCESS) {
srs_error("start encoder failed. ret=%d", ret);
return ret;
@ -922,7 +922,7 @@ void SrsSource::on_unpublish()
// destroy all forwarders
destroy_forwarders();
#ifdef SRS_FFMPEG
#ifdef SRS_TRANSCODE
encoder->on_unpublish();
#endif