From f946a62d3921e86b44ff8e2973138304b9cd53cd Mon Sep 17 00:00:00 2001
From: chenshijun <csj_sky@126.com>
Date: 星期二, 16 四月 2019 16:36:32 +0800
Subject: [PATCH] 解决修改参数和推流画面跳跃问题

---
 QiaoJiaSystem/GB28181DecoderModel/VideoCaptureElementWithRtp.h |   23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/QiaoJiaSystem/GB28181DecoderModel/VideoCaptureElementWithRtp.h b/QiaoJiaSystem/GB28181DecoderModel/VideoCaptureElementWithRtp.h
index 77751c3..b77d67f 100644
--- a/QiaoJiaSystem/GB28181DecoderModel/VideoCaptureElementWithRtp.h
+++ b/QiaoJiaSystem/GB28181DecoderModel/VideoCaptureElementWithRtp.h
@@ -8,6 +8,7 @@
 #include "FFmpegDecoderJPG.h"
 #include "28181SDK.h"
 #include <basic/pipe/PipeElement.h>
+#include <basic/pipe_element/ffmpeg/FfmpegElement.h>
 //#include <RtspAnalysManager.h>
 //#include <VideoToImageMulth/RtspAnalysManager.h>
 
@@ -17,6 +18,14 @@
 
     class VideoCaptureElementWithRtp : public basic::PipeElement {
     public:
+        /***
+         * VideoCaptureElementWithRtp 瑙嗛瑙g爜
+         * @param chanPubID 閫氶亾鍦�(鎽勫儚鏈篿d)
+         * @param fps
+         * @param streamTransType 璇锋眰鐨勮棰戞祦绫诲瀷
+         * @param gpuIdx gpuindex
+         * @param manager 涓婂眰绫荤殑鎸囬拡
+         */
         explicit VideoCaptureElementWithRtp(std::string &chanPubID, int fps, int streamTransType, int gpuIdx = -1,
                                             RtspAnalysManager *manager = nullptr);
 
@@ -28,6 +37,10 @@
          */
         bool getRunning();
 
+        /***
+         * 鑾峰彇鍥剧墖
+         * @return
+         */
         cv::Mat getImage();
 
         //淇濆瓨瑙嗛鎺ュ彛,浠嶳tspAnalysManager鍙戣捣璋冪敤
@@ -39,7 +52,12 @@
         //鏍规嵁timeStamp鍒涘缓璺緞
         std::string MakeDir(const std::string &timeStamp);
 
+        void startPublishVideo();
+
+        void stopPublishVideo();
+
     private:
+        int reopenTime{10};
         int m_gpuIdx;
         int m_fps;
         int m_streamTransType;
@@ -54,9 +72,12 @@
 
         std::atomic<bool> m_running;
         std::atomic<bool> m_waitSignal;
+        std::atomic<bool> m_waitSignalrunning{false};
 
         //鐢ㄦ潵淇濆瓨褰曞儚瑙嗛鐨勮矾寰�
         std::string m_cutPath;
+        std::atomic<bool> m_publishVideoRet{false};
+        ffmpeg::PipeVideoPublishElement * videoPublishElement{nullptr};
     private:
         /***
          * 鍚姩瀹炴椂娴佹帴鏀舵暟鎹嚎绋�
@@ -73,7 +94,7 @@
 
 
         /***
-         * rtp缁勫寘鍥炶皟鍑芥暟
+         * GB28181 SDK rtp缁勫寘鍥炶皟鍑芥暟
          * @param handle
          * @param datatype
          * @param frametype

--
Gitblit v1.8.0