summaryrefslogtreecommitdiff
path: root/src/rmd_timer.h
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2020-11-11 23:44:15 -0800
committerVito Caputo <vcaputo@pengaru.com>2020-11-12 23:14:05 -0800
commitc265f13978fbd68f295d99b2fe4720fe4866d64c (patch)
treea08822aa66dd16bb3ef79d7e46706386db02ddcc /src/rmd_timer.h
parent7281dc6fdc4f345c9c1c7bcda20e3bef3003c140 (diff)
timer: remove unnecessary timer thread
This removes the timer thread entirely in favor of a coordinated delay loop directly within rmdGetFrame. When there's an audio stream to synchronize with, avd is maintained by the pcm buffer updates, and the fps-derived frametimes synchronize with the audio that way. When there's no audio stream (--no-sound), avd is now maintained synthetically via clock_gettime(CLOCK_MONOTONIC) coordinating with the clock instead. There's been some reworking of frame sampling/reusing and cloning logic, which may need some refinement. But for now the tests seem to show promise. The old timer approach just increased the non-determinism by adding more scheduler latency and influence unnecessarily.
Diffstat (limited to 'src/rmd_timer.h')
-rw-r--r--src/rmd_timer.h44
1 files changed, 0 insertions, 44 deletions
diff --git a/src/rmd_timer.h b/src/rmd_timer.h
deleted file mode 100644
index d9292d9..0000000
--- a/src/rmd_timer.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/******************************************************************************
-* recordMyDesktop *
-*******************************************************************************
-* *
-* Copyright (C) 2006,2007,2008 John Varouhakis *
-* *
-* *
-* This program is free software; you can redistribute it and/or modify *
-* it under the terms of the GNU General Public License as published by *
-* the Free Software Foundation; either version 2 of the License, or *
-* (at your option) any later version. *
-* *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* You should have received a copy of the GNU General Public License *
-* along with this program; if not, write to the Free Software *
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
-* *
-* *
-* *
-* For further information contact me at johnvarouhakis@gmail.com *
-******************************************************************************/
-
-#ifndef RMD_TIMER_H
-#define RMD_TIMER_H 1
-
-#include "rmd_types.h"
-
-
-/**
-* Loop ,signal timer cond var,sleep-\
-* ^ |
-* |________________________________/
-*
-*
-* \param pdata ProgData struct containing all program data
-*/
-void *rmdTimer(ProgData *pdata);
-
-
-#endif
© All Rights Reserved