| | |
| | | #include "FFmpegDecoderJPG.h" |
| | | #include "28181SDK.h" |
| | | #include <basic/pipe/PipeElement.h> |
| | | #include "GlobalSignalWaitLock.hpp" |
| | | //#include <RtspAnalysManager.h> |
| | | //#include <VideoToImageMulth/RtspAnalysManager.h> |
| | | |
| | | class RtspAnalysManager; |
| | | |
| | | namespace BASICGB28181 { |
| | | |
| | | class VideoCaptureElementWithRtp : public basic::PipeElement { |
| | | public: |
| | | explicit VideoCaptureElementWithRtp(std::string &chanPubID, int fps, int streamTransType, int gpuIdx = -1); |
| | | /*** |
| | | * VideoCaptureElementWithRtp 视频解码 |
| | | * @param chanPubID 通道地(摄像机id) |
| | | * @param fps |
| | | * @param streamTransType 请求的视频流类型 |
| | | * @param gpuIdx gpuindex |
| | | * @param manager 上层类的指针 |
| | | */ |
| | | explicit VideoCaptureElementWithRtp(std::string &chanPubID, int fps, int streamTransType, int gpuIdx = -1, |
| | | RtspAnalysManager *manager = nullptr); |
| | | |
| | | virtual ~VideoCaptureElementWithRtp(); |
| | | |
| | | |
| | | /*** |
| | | * 获取当前实时流接收数据线程运行状态 |
| | |
| | | */ |
| | | bool getRunning(); |
| | | |
| | | |
| | | /*** |
| | | * 获取图片 |
| | | * @return |
| | | */ |
| | | cv::Mat getImage(); |
| | | |
| | | //保存视频接口,从RtspAnalysManager发起调用 |
| | |
| | | std::string MakeDir(const std::string &timeStamp); |
| | | |
| | | private: |
| | | int reopenTime{1000}; |
| | | int m_gpuIdx; |
| | | int m_fps; |
| | | int m_streamTransType; |
| | |
| | | FFmpegDecoderJPG m_fFmpegDecoderJPG; |
| | | cv::Mat m_image; |
| | | long m_userdata; |
| | | RtspAnalysManager *m_pManager; |
| | | |
| | | std::atomic<bool> m_running; |
| | | std::atomic<bool> m_waitSignal; |
| | |
| | | |
| | | |
| | | /*** |
| | | * rtp组包回调函数 |
| | | * GB28181 SDK rtp组包回调函数 |
| | | * @param handle |
| | | * @param datatype |
| | | * @param frametype |