1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

change SRS_TRANSCODE macro to SRS_RTMP_TRANSCODE

This commit is contained in:
winlin 2014-04-13 17:14:33 +08:00
parent a0472f256d
commit 04a526b340
5 changed files with 11 additions and 11 deletions

View file

@ -522,9 +522,9 @@ else
fi fi
if [ $SRS_TRANSCODE = YES ]; then if [ $SRS_TRANSCODE = YES ]; then
echo "#define SRS_TRANSCODE" >> $SRS_AUTO_HEADERS_H echo "#define SRS_RTMP_TRANSCODE" >> $SRS_AUTO_HEADERS_H
else else
echo "#undef SRS_TRANSCODE" >> $SRS_AUTO_HEADERS_H echo "#undef SRS_RTMP_TRANSCODE" >> $SRS_AUTO_HEADERS_H
fi fi
if [ $SRS_INGEST = YES ]; then if [ $SRS_INGEST = YES ]; then

View file

@ -34,7 +34,7 @@ using namespace std;
#include <srs_protocol_rtmp_stack.hpp> #include <srs_protocol_rtmp_stack.hpp>
#include <srs_app_ffmpeg.hpp> #include <srs_app_ffmpeg.hpp>
#ifdef SRS_TRANSCODE #ifdef SRS_RTMP_TRANSCODE
// when error, encoder sleep for a while and retry. // when error, encoder sleep for a while and retry.
#define SRS_ENCODER_SLEEP_US (int64_t)(3*1000*1000LL) #define SRS_ENCODER_SLEEP_US (int64_t)(3*1000*1000LL)

View file

@ -29,7 +29,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include <srs_core.hpp> #include <srs_core.hpp>
#ifdef SRS_TRANSCODE #ifdef SRS_RTMP_TRANSCODE
#include <string> #include <string>
#include <vector> #include <vector>

View file

@ -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_TRANSCODE #ifdef SRS_RTMP_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_TRANSCODE #ifdef SRS_RTMP_TRANSCODE
srs_freep(encoder); srs_freep(encoder);
#endif #endif
@ -605,7 +605,7 @@ int SrsSource::on_reload_vhost_transcode(string vhost)
return ret; return ret;
} }
#ifdef SRS_TRANSCODE #ifdef SRS_RTMP_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);
@ -919,7 +919,7 @@ int SrsSource::on_publish(SrsRequest* _req)
return ret; return ret;
} }
#ifdef SRS_TRANSCODE #ifdef SRS_RTMP_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;
@ -941,7 +941,7 @@ void SrsSource::on_unpublish()
// destroy all forwarders // destroy all forwarders
destroy_forwarders(); destroy_forwarders();
#ifdef SRS_TRANSCODE #ifdef SRS_RTMP_TRANSCODE
encoder->on_unpublish(); encoder->on_unpublish();
#endif #endif

View file

@ -46,7 +46,7 @@ class SrsRequest;
#ifdef SRS_HLS #ifdef SRS_HLS
class SrsHls; class SrsHls;
#endif #endif
#ifdef SRS_TRANSCODE #ifdef SRS_RTMP_TRANSCODE
class SrsEncoder; class SrsEncoder;
#endif #endif
@ -224,7 +224,7 @@ private:
SrsHls* hls; SrsHls* hls;
#endif #endif
// transcoding handler. // transcoding handler.
#ifdef SRS_TRANSCODE #ifdef SRS_RTMP_TRANSCODE
SrsEncoder* encoder; SrsEncoder* encoder;
#endif #endif
// gop cache for client fast startup. // gop cache for client fast startup.