Kaynağa Gözat

Z991239-2234 #comment fix: 优化sipphone cpu使用率

陈礼鹏80274480 4 yıl önce
ebeveyn
işleme
596b2e90fd

+ 1 - 1
Module/mod_sipphone/video_session.cpp

@@ -2222,7 +2222,7 @@ void* videorender_func(void* arg)
 		for (; ; ) {
 			struct timespec ts;
 			clock_gettime(CLOCK_REALTIME, &ts);
-			long unsec = ts.tv_nsec + (1000 * 1000 * 100);
+			long unsec = ts.tv_nsec + (1000 * 1000 * 500);
 			ts.tv_sec += (unsec / 1000000000);
 			ts.tv_nsec = (unsec % 1000000000);
 			if (0 != sem_timedwait(&session->ui_stop_sem, &ts) && (ETIMEDOUT == errno))

+ 1 - 1
Other/libvideoframework/videoclock.c

@@ -154,7 +154,7 @@ void* local_video_sendfunc(void* param)
 		struct timespec ts;
 		//int ivalue = -1;
 		clock_gettime(CLOCK_REALTIME, &ts);
-		long unsec = ts.tv_nsec + (1000 * 1000 * dwTimeout);
+		long unsec = ts.tv_nsec + (1000 * 1000 * dwTimeout * 2);
 		ts.tv_sec += (unsec / 1000000000);
 		ts.tv_nsec = (unsec % 1000000000);
 		//sem_getvalue(&clock->exit_sem, &ivalue);

+ 1 - 1
Other/libvideoframework/videortp.c

@@ -1165,7 +1165,7 @@ void* recv_proc(void* arg)
 		struct timespec ts;
 		//int ivalue = -1;
 		clock_gettime(CLOCK_REALTIME, &ts);
-		long unsec = ts.tv_nsec + (1000 * 1000 * 10);
+		long unsec = ts.tv_nsec + (1000 * 1000 * 100);
 		ts.tv_sec += (unsec / 1000000000);
 		ts.tv_nsec = (unsec % 1000000000);
 		//sem_getvalue(&vrtp->sem_evt, &ivalue);