From 5b5db045435a548fb27ac5e4517c0fd67f1e6045 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Sat, 29 Dec 2018 17:38:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E7=8E=AF=E5=BD=A2=E7=BC=93=E5=86=B2=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Rtmp/RtmpMediaSource.h | 4 ++-- src/Rtmp/RtmpToRtspMediaSource.h | 3 ++- src/Rtsp/RtspMediaSource.h | 4 ++-- src/Rtsp/RtspToRtmpMediaSource.h | 3 ++- 4 files changed, 8 insertions(+), 6 deletions(-) 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); }