From 5ce6553ccf5502fc71d11d654c76bd1714cd36dd Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Tue, 14 Jul 2020 18:48:15 -0700 Subject: *: get rid of unused frames_{total,lost} these concepts may return but not in this form --- src/rmd_initialize_data.c | 2 -- src/rmd_load_cache.c | 8 ++------ src/rmd_timer.c | 8 +------- src/rmd_types.h | 5 ----- 4 files changed, 3 insertions(+), 20 deletions(-) diff --git a/src/rmd_initialize_data.c b/src/rmd_initialize_data.c index 8443750..09c8132 100644 --- a/src/rmd_initialize_data.c +++ b/src/rmd_initialize_data.c @@ -97,8 +97,6 @@ int rmdInitializeData(ProgData *pdata, EncData *enc_data, CacheData *cache_data) pdata->paused = FALSE; pdata->aborted = FALSE; pdata->pause_state_changed = FALSE; - pdata->frames_total = 0; - pdata->frames_lost = 0; pdata->capture_frameno = 0; pdata->time_frameno = 0; diff --git a/src/rmd_load_cache.c b/src/rmd_load_cache.c index 0d94a37..8130cf3 100644 --- a/src/rmd_load_cache.c +++ b/src/rmd_load_cache.c @@ -237,12 +237,8 @@ void *rmdLoadCache(ProgData *pdata) { if (read_header(pdata, ifp, ucfp, frame.header)) { - if (pdata->frames_total) { - fprintf(stdout, "\r[%d%%] ", - ((frame.header->capture_frameno) * 100) / pdata->capture_frameno); - } else - fprintf(stdout, "\r[%d frames rendered] ", - (frame.header->capture_frameno)); + fprintf(stdout, "\r[%d%%] ", + ((frame.header->capture_frameno) * 100) / pdata->capture_frameno); fflush(stdout); if ( (frame.header->Ynum > blocknum_x * blocknum_y) || diff --git a/src/rmd_timer.c b/src/rmd_timer.c index be757a6..f584bf2 100644 --- a/src/rmd_timer.c +++ b/src/rmd_timer.c @@ -113,13 +113,7 @@ void *rmdTimer(ProgData *pdata) { } } - if (!pdata->paused) { - pthread_mutex_unlock(&pdata->pause_mutex); - - /* FIXME TODO: detect dropped frames by delta between {time,capture}_frameno */ - pdata->frames_total++; - } else - pthread_mutex_unlock(&pdata->pause_mutex); + pthread_mutex_unlock(&pdata->pause_mutex); if (!pdata->args.nosound) sync_streams(pdata, &frame_step, &delay); diff --git a/src/rmd_types.h b/src/rmd_types.h index b7c27a8..1dc5f14 100644 --- a/src/rmd_types.h +++ b/src/rmd_types.h @@ -318,11 +318,6 @@ struct _ProgData { boolean aborted; //1 if we should abort boolean pause_state_changed; //1 if pause state changed - //the following values are of no effect - //but they might be usefull later for profiling - unsigned int frames_total, //frames calculated by total time expirations - frames_lost; //the value of shame - /* timer advances time_frameno, getframe copies time_frameno to capture_frameno * access to both is serialized by time_{mutex,cond} */ -- cgit v1.2.1