| | |
| | | #include <stdlib.h> |
| | | #include <time.h> |
| | | #include <string.h> |
| | | #include <VideoToImageMulth/RtspAnalysManager.h> |
| | | #include "28181SDK.h" |
| | | #include "SpinLock.hpp" |
| | | |
| | |
| | | //打印事件回调信息 |
| | | static void enventcallback(int eventtype, int eventparam, int datalen, char *data) { |
| | | printf("eventtype:%d, eventparam:%d, datalen:%d, data:%s\n", eventtype, eventparam, datalen, data); |
| | | if (eventtype == 2) { |
| | | if (eventtype == EVENT_DEVICE_CATALOG) { |
| | | // GB28181Server::bGetLoaclRes = true; |
| | | } else if (eventtype == 1 && eventparam == 1) { |
| | | } else if (eventtype == EVENT_REGISTER_STATUS && eventparam == 1) { |
| | | C_GetResource(NULL); |
| | | } else if (eventtype == EVENT_VIDEO_EXCEPTION){ |
| | | if(gRtspAnalysManagerCamera) { |
| | | auto cameraHandlePtr = (RtspAnalysManager *) gRtspAnalysManagerCamera; |
| | | ERR("gRtspAnalysManagerCamera ADDR:" << gRtspAnalysManagerCamera); |
| | | string camID(data, datalen); |
| | | ERR("EVENT_VIDEO_EXCEPTION reopen camID:" << camID); |
| | | cameraHandlePtr->addCamera(camID, camID); |
| | | }else{ |
| | | ERR("gRtspAnalysManagerCamera is nullptr"); |
| | | } |
| | | } |
| | | } |
| | | |