added -P for should_do_judge_according_time()

This commit is contained in:
2025-09-20 23:11:50 +08:00
parent 09b2c9441b
commit 0f97f588ab
5 changed files with 195 additions and 3 deletions
+6
View File
@@ -6,6 +6,7 @@
#include "myrga.h"
#include "pose_body.h"
#include "rknn.h"
#include "vertix.h"
extern long max_time_elapsed;
@@ -92,6 +93,11 @@ void convert_a_frame(MppFrame frame)
{
// lock acquired, should create thread and use pose_body
if (!should_do_judge_according_time()) {
pthread_mutex_unlock(&frame_mutex);
free(out);
return;
}
pthread_t pose_body_handler;
pthread_create(&pose_body_handler, NULL, pose_body_thread, (void *)out);
pthread_detach(pose_body_handler);