winlin

change SRS_TRANSCODE macro to SRS_RTMP_TRANSCODE

... ... @@ -522,9 +522,9 @@ else
fi
if [ $SRS_TRANSCODE = YES ]; then
echo "#define SRS_TRANSCODE" >> $SRS_AUTO_HEADERS_H
echo "#define SRS_RTMP_TRANSCODE" >> $SRS_AUTO_HEADERS_H
else
echo "#undef SRS_TRANSCODE" >> $SRS_AUTO_HEADERS_H
echo "#undef SRS_RTMP_TRANSCODE" >> $SRS_AUTO_HEADERS_H
fi
if [ $SRS_INGEST = YES ]; then
... ...
... ... @@ -34,7 +34,7 @@ using namespace std;
#include <srs_protocol_rtmp_stack.hpp>
#include <srs_app_ffmpeg.hpp>
#ifdef SRS_TRANSCODE
#ifdef SRS_RTMP_TRANSCODE
// when error, encoder sleep for a while and retry.
#define SRS_ENCODER_SLEEP_US (int64_t)(3*1000*1000LL)
... ...
... ... @@ -29,7 +29,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <srs_core.hpp>
#ifdef SRS_TRANSCODE
#ifdef SRS_RTMP_TRANSCODE
#include <string>
#include <vector>
... ...
... ... @@ -431,7 +431,7 @@ SrsSource::SrsSource(SrsRequest* _req)
#ifdef SRS_HLS
hls = new SrsHls(this);
#endif
#ifdef SRS_TRANSCODE
#ifdef SRS_RTMP_TRANSCODE
encoder = new SrsEncoder();
#endif
... ... @@ -477,7 +477,7 @@ SrsSource::~SrsSource()
#ifdef SRS_HLS
srs_freep(hls);
#endif
#ifdef SRS_TRANSCODE
#ifdef SRS_RTMP_TRANSCODE
srs_freep(encoder);
#endif
... ... @@ -605,7 +605,7 @@ int SrsSource::on_reload_vhost_transcode(string vhost)
return ret;
}
#ifdef SRS_TRANSCODE
#ifdef SRS_RTMP_TRANSCODE
encoder->on_unpublish();
if ((ret = encoder->on_publish(req)) != ERROR_SUCCESS) {
srs_error("start encoder failed. ret=%d", ret);
... ... @@ -919,7 +919,7 @@ int SrsSource::on_publish(SrsRequest* _req)
return ret;
}
#ifdef SRS_TRANSCODE
#ifdef SRS_RTMP_TRANSCODE
if ((ret = encoder->on_publish(req)) != ERROR_SUCCESS) {
srs_error("start encoder failed. ret=%d", ret);
return ret;
... ... @@ -941,7 +941,7 @@ void SrsSource::on_unpublish()
// destroy all forwarders
destroy_forwarders();
#ifdef SRS_TRANSCODE
#ifdef SRS_RTMP_TRANSCODE
encoder->on_unpublish();
#endif
... ...
... ... @@ -46,7 +46,7 @@ class SrsRequest;
#ifdef SRS_HLS
class SrsHls;
#endif
#ifdef SRS_TRANSCODE
#ifdef SRS_RTMP_TRANSCODE
class SrsEncoder;
#endif
... ... @@ -224,7 +224,7 @@ private:
SrsHls* hls;
#endif
// transcoding handler.
#ifdef SRS_TRANSCODE
#ifdef SRS_RTMP_TRANSCODE
SrsEncoder* encoder;
#endif
// gop cache for client fast startup.
... ...