提交 9456f3fb authored 作者: blu's avatar blu

version 0.1: record, upload, smart detection, qr and more

...@@ -249,6 +249,12 @@ void my_free(void *data, void* hint) ...@@ -249,6 +249,12 @@ void my_free(void *data, void* hint)
{ {
free(data); free(data);
} }
//
void my_free(void *data, void* hint)
{
free(data);
}
// //
XM_S32 cb_frame_proc(XM_VOID *pUserArg, MaQueVideoEncFrameInfo_s *frame) XM_S32 cb_frame_proc(XM_VOID *pUserArg, MaQueVideoEncFrameInfo_s *frame)
{ {
...@@ -469,7 +475,7 @@ string apply_config(json &data) ...@@ -469,7 +475,7 @@ string apply_config(json &data)
gConfigSystem.module.sys.video_quality = MAQUE_IMG_QUALITY_BETTER; gConfigSystem.module.sys.video_quality = MAQUE_IMG_QUALITY_BETTER;
gConfigSystem.module.record.interval = 60 * 2; // 2 minutes interval gConfigSystem.module.record.interval = 60 * 2; // 2 minutes interval
gConfigSystem.module.sys.bitrate_kb = 1024; // 1Mbps gConfigSystem.module.sys.bitrate_kb = 1024; // 1Mbps
gConfigSystem.module.sys.bitrate_type = MAQUE_BITRATE_CTRL_VBR; gConfigSystem.module.sys.bitrate_type = MAQUE_BITRATE_CTRL_CBR;
gConfigSystem.module.sys.push = 0; gConfigSystem.module.sys.push = 0;
// motion // motion
gConfigSystem.module.motion.enabled = 1; gConfigSystem.module.motion.enabled = 1;
......
...@@ -194,7 +194,6 @@ void maq_smart_task_entry(ev_module_config_t *pArg) ...@@ -194,7 +194,6 @@ void maq_smart_task_entry(ev_module_config_t *pArg)
sml::sm<md::fsm> fsm{md::fsm{}}; sml::sm<md::fsm> fsm{md::fsm{}};
bool hasHuman = false; bool hasHuman = false;
bool hasMotion = false; bool hasMotion = false;
while(1) { while(1) {
// assuming it's 1s // assuming it's 1s
this_thread::sleep_for(1s); this_thread::sleep_for(1s);
...@@ -231,6 +230,8 @@ void maq_smart_task_entry(ev_module_config_t *pArg) ...@@ -231,6 +230,8 @@ void maq_smart_task_entry(ev_module_config_t *pArg)
frameCntLast = 0; frameCntLast = 0;
} }
else { else {
// feed the dog
LibXmMaQue_Watchdog_keepAlive();
if(deltaMotionCnt >= motionCntThresh) { if(deltaMotionCnt >= motionCntThresh) {
hasMotion = true; hasMotion = true;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论