diff --git a/src/Rtmp/RtmpMediaSource.h b/src/Rtmp/RtmpMediaSource.h index 71960c46..e0f80be0 100644 --- a/src/Rtmp/RtmpMediaSource.h +++ b/src/Rtmp/RtmpMediaSource.h @@ -53,9 +53,9 @@ public: typedef std::shared_ptr Ptr; typedef RingBuffer RingType; - RtmpMediaSource(const string &vhost,const string &strApp, const string &strId) : + RtmpMediaSource(const string &vhost,const string &strApp, const string &strId,int ringSize = 32) : MediaSource(RTMP_SCHEMA,vhost,strApp,strId), - _pRing(new RingBuffer()) { + _pRing(new RingBuffer(ringSize)) { } virtual ~RtmpMediaSource() {} diff --git a/src/Rtmp/RtmpToRtspMediaSource.h b/src/Rtmp/RtmpToRtspMediaSource.h index 5fd30d8b..f4ad7d98 100644 --- a/src/Rtmp/RtmpToRtspMediaSource.h +++ b/src/Rtmp/RtmpToRtspMediaSource.h @@ -53,7 +53,8 @@ public: const string &app, const string &id, bool bEnableHls = true, - bool bEnableMp4 = false):RtmpMediaSource(vhost, app, id){ + bool bEnableMp4 = false, + int ringSize = 32):RtmpMediaSource(vhost, app, id,ringSize){ _recorder = std::make_shared(vhost, app, id, bEnableHls, bEnableMp4); } virtual ~RtmpToRtspMediaSource(){} diff --git a/src/Rtsp/RtspMediaSource.h b/src/Rtsp/RtspMediaSource.h index f2c8f001..58a698a5 100644 --- a/src/Rtsp/RtspMediaSource.h +++ b/src/Rtsp/RtspMediaSource.h @@ -55,9 +55,9 @@ public: typedef std::shared_ptr Ptr; typedef RingBuffer RingType; - RtspMediaSource(const string &strVhost,const string &strApp, const string &strId) : + RtspMediaSource(const string &strVhost,const string &strApp, const string &strId,int ringSize = 32) : MediaSource(RTSP_SCHEMA,strVhost,strApp,strId), - _pRing(new RingBuffer()) { + _pRing(new RingBuffer(ringSize)) { } virtual ~RtspMediaSource() {} diff --git a/src/Rtsp/RtspToRtmpMediaSource.h b/src/Rtsp/RtspToRtmpMediaSource.h index 45a85b58..7eb1cde3 100644 --- a/src/Rtsp/RtspToRtmpMediaSource.h +++ b/src/Rtsp/RtspToRtmpMediaSource.h @@ -46,7 +46,8 @@ public: const string &app, const string &id, bool bEnableHls = true, - bool bEnableMp4 = false) : RtspMediaSource(vhost, app, id) { + bool bEnableMp4 = false, + int ringSize = 32) : RtspMediaSource(vhost, app, id,ringSize) { _recorder = std::make_shared(vhost, app, id, bEnableHls, bEnableMp4); }