Skip to content

Commit 85e16c7

Browse files
committed
vcap/testcard2: use gneric FPS indicator
1 parent 15f38f2 commit 85e16c7

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/video_capture/testcard2.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -579,15 +579,6 @@ void * vidcap_testcard2_thread(void *arg)
579579
s->data = (char *) tmp;
580580
pthread_mutex_unlock(&s->lock);
581581
platform_sem_post(&s->semaphore);
582-
583-
double seconds = tv_diff(curr_time, s->t0);
584-
if (seconds >= 5) {
585-
float fps = (s->count - stat_count_prev) / seconds;
586-
log_msg(LOG_LEVEL_INFO, "[testcard2] %d frames in %g seconds = %g FPS\n",
587-
(s->count - stat_count_prev), seconds, fps);
588-
s->t0 = curr_time;
589-
stat_count_prev = s->count;
590-
}
591582
}
592583

593584
#ifdef HAVE_LIBSDL_TTF
@@ -672,7 +663,7 @@ static const struct video_capture_info vidcap_testcard2_info = {
672663
vidcap_testcard2_init,
673664
vidcap_testcard2_done,
674665
vidcap_testcard2_grab,
675-
VIDCAP_NO_GENERIC_FPS_INDICATOR,
666+
MOD_NAME,
676667
};
677668

678669
REGISTER_MODULE(testcard2, &vidcap_testcard2_info, LIBRARY_CLASS_VIDEO_CAPTURE, VIDEO_CAPTURE_ABI_VERSION);

0 commit comments

Comments
 (0)