diff options
author | iovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a> | 2007-12-02 09:07:24 +0000 |
---|---|---|
committer | iovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a> | 2007-12-02 09:07:24 +0000 |
commit | 86303ab2561c8f53ee41a7a71d673da2086f9833 (patch) | |
tree | 6db4801da5b29083e767c63182666f91d4394665 /recordmydesktop/src/rmdthreads.c | |
parent | 22ee15e51f6d72560af37fad744662161e284eb9 (diff) |
include/rmdfunc.h: removed SetExpired & CancelTimer, added rmdTimer
include/rmdtypes.h: pdata->timer_alive
src/Makefile.am: added rmd_timer in sources
src/rmd_timer.c: new thread that handles timing
src/register_callbacks.c: removed SetExpired & CancelTimer
src/rmdthreads.c: new timing setup(signal-sleep-loop thread, instead of setitimer &sigaction)
git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@452 f606c939-3180-4ac9-a4b8-4b8779d57d0a
Diffstat (limited to 'recordmydesktop/src/rmdthreads.c')
-rw-r--r-- | recordmydesktop/src/rmdthreads.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/recordmydesktop/src/rmdthreads.c b/recordmydesktop/src/rmdthreads.c index f8e9ef4..a1b8e53 100644 --- a/recordmydesktop/src/rmdthreads.c +++ b/recordmydesktop/src/rmdthreads.c @@ -46,7 +46,8 @@ void rmdThreads(ProgData *pdata){ sound_capture_t, sound_encode_t, sound_cache_t, - flush_to_ogg_t; + flush_to_ogg_t, + timer_t; Window dummy_w; if(pdata->args.delay>0){ @@ -98,6 +99,11 @@ void rmdThreads(ProgData *pdata){ (void *)pdata); RegisterCallbacks(&pdata->args); + pdata->timer_alive=1; + pthread_create(&timer_t, + NULL, + (void *)rmdTimer, + (void *)pdata); fprintf(stderr,"Capturing!\n"); #ifdef HAVE_JACK_H if(pdata->args.use_jack){ @@ -176,6 +182,8 @@ void rmdThreads(ProgData *pdata){ pthread_join(poll_events_t,NULL); //Now that we are done with recording we cancel the timer - CancelTimer(); + pdata->timer_alive=0; + pthread_join(timer_t,NULL); + } |