| | |
| | | } |
| | | |
| | | #include <mutex> |
| | | #include <basic/pipe/TimerElement.h> |
| | | |
| | | namespace BASICGB28181 { |
| | | |
| | |
| | | |
| | | static void initFFmpeg(); |
| | | |
| | | /*** |
| | | * AVframe转cvmat |
| | | * @param frame |
| | | * @return |
| | | */ |
| | | static cv::Mat avframe_to_cvmat(AVFrame *frame); |
| | | |
| | | typedef struct _buffInfo { |
| | |
| | | std::string camIdx; |
| | | } frameBuffInfo; |
| | | |
| | | //************录像模块使用的结构体********************// |
| | | struct FrameIdPackage_s_t { |
| | | int64_t m_frameId; |
| | | AVPacket m_packet; |
| | |
| | | RECORDING_VIDEO, |
| | | STOP_RECORD, |
| | | }; |
| | | //********************************// |
| | | // std::map<std::string, MyQueue<frameBuffInfo *> > MapMyQueue; |
| | | |
| | | static std::mutex g_mutex; |
| | |
| | | int stopWrite(); |
| | | |
| | | //对packet做转换 |
| | | void conversion(void *packet, const long int &firstKeyPts, const long int &firstKeyDts, void *inVideoStream, unsigned long int frame_index = 0); |
| | | void conversion(void *packet, const long int &firstKeyPts, const long int &firstKeyDts, void *inVideoStream, |
| | | unsigned long int frame_index = 0); |
| | | |
| | | bool m_bstartWrite = {false}; |
| | | bool m_bFirstKeyFrame = {false}; |
| | |
| | | int m_gpuIdx; |
| | | int m_fps; |
| | | bool m_PackageState; |
| | | bool m_SnapshotNotSaveRet{true}; |
| | | std::string m_camIdx; |
| | | |
| | | MyQueue<frameBuffInfo *> m_rtpQueue; |