diff options
author | iovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a> | 2007-02-07 18:44:02 +0000 |
---|---|---|
committer | iovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a> | 2007-02-07 18:44:02 +0000 |
commit | 9c05582a007788295d872172c5109ae9bccfcf68 (patch) | |
tree | 6c2275255f4c38d819b27da2978e7f74715c8050 /recordmydesktop/src/register_callbacks.c | |
parent | f39f779f299cd78a574999830699e30f92932f06 (diff) |
Added support for recording audio through jack.
libjack is dlopened so there's no runtime dependency on it. Ports must be connected at startup.
New files: src/rmd_jack.c
git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@273 f606c939-3180-4ac9-a4b8-4b8779d57d0a
Diffstat (limited to 'recordmydesktop/src/register_callbacks.c')
-rw-r--r-- | recordmydesktop/src/register_callbacks.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/recordmydesktop/src/register_callbacks.c b/recordmydesktop/src/register_callbacks.c index 7f8d04f..2c5a8a3 100644 --- a/recordmydesktop/src/register_callbacks.c +++ b/recordmydesktop/src/register_callbacks.c @@ -32,14 +32,16 @@ void SetExpired(int signum){ if(capture_busy){ frames_lost++; } +/*FIXME */ +//This is not safe. +//cond_var signaling must move away from signal handlers +//alltogether (JackCapture, SetExpired, SetPaused). +//Better would be a set of pipes for each of these. +//The callback should write on the pipe and the main thread +//should perform a select over the fd's, signaling afterwards the +//appropriate cond_var. pthread_mutex_lock(&time_mutex); - pthread_cond_broadcast(time_cond); //sig handlers should - //not call this func - //could be a set_expired - // and main thread - //doing a while(running) - //if set_expired broadcast - //else usleep(n) + pthread_cond_broadcast(time_cond); pthread_mutex_unlock(&time_mutex); } } @@ -49,6 +51,14 @@ void SetPaused(int signum){ Paused=1; else{ Paused=0; +/*FIXME */ +//This is not safe. +//cond_var signaling must move away from signal handlers +//alltogether (JackCapture, SetExpired, SetPaused). +//Better would be a set of pipes for each of these. +//The callback should write on the pipe and the main thread +//should perform a select over the fd's, signaling afterwards the +//appropriate cond_var. pthread_mutex_lock(&pause_mutex); pthread_cond_broadcast(pause_cond); pthread_mutex_unlock(&pause_mutex); |