From 28697c059df1f6b276a490123611c439996085c8 Mon Sep 17 00:00:00 2001 From: enselic Date: Sat, 13 Sep 2008 12:37:57 +0000 Subject: include/recordmydesktop.h: Remove the globals Paused, Aborted and PauseStateChanged. include/rmdtypes.h: Add the previous globals as members in ProgData. src/rmd_jack.c src/get_frame.c src/rmd_timer.c src/rmd_rescue.c src/cache_audio.c src/cache_frame.c src/capture_sound.c src/initialize_data.c src/recordmydesktop.c src/register_callbacks.c src/encode_image_buffer.c src/encode_sound_buffer.c: Adapt. git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@529 f606c939-3180-4ac9-a4b8-4b8779d57d0a --- recordmydesktop/include/recordmydesktop.h | 1 - recordmydesktop/include/rmdtypes.h | 8 +++++++- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'recordmydesktop/include') diff --git a/recordmydesktop/include/recordmydesktop.h b/recordmydesktop/include/recordmydesktop.h index 1a5c3fa..47a5ad0 100644 --- a/recordmydesktop/include/recordmydesktop.h +++ b/recordmydesktop/include/recordmydesktop.h @@ -50,7 +50,6 @@ u_int32_t *yblocks, /**Globals*/ //I've read somewhere that I'll go to hell for using globals... -int Paused, Aborted, PauseStateChanged; pthread_cond_t *time_cond,*pause_cond; pthread_mutex_t pause_mutex,time_mutex; unsigned char Yr[256],Yg[256],Yb[256], diff --git a/recordmydesktop/include/rmdtypes.h b/recordmydesktop/include/rmdtypes.h index 5d31fda..776f80d 100644 --- a/recordmydesktop/include/rmdtypes.h +++ b/recordmydesktop/include/rmdtypes.h @@ -331,7 +331,6 @@ struct _ProgData { int damage_event, //damage event base code damage_error, //damage error base code shm_opcode, //MIT-Shm opcode - running, //1 while the program is capturing/paused/encoding dummy_p_size, //dummy pointer size,initially 16x16,always square th_encoding_clean, //thread exit inidcator v_encoding_clean, // >> >> @@ -342,6 +341,13 @@ struct _ProgData { //we have to close and reopen avd, //syncronization among audio and video sound_framesize; //size of each sound frame + + /** Progam state vars */ + int running; //1 while the program is capturing/paused/encoding + int paused; //1 while the program is paused + int aborted; //1 if we should abort + int pause_state_changed;//1 if pause state changed + #ifdef HAVE_LIBASOUND snd_pcm_t *sound_handle; snd_pcm_uframes_t periodsize; -- cgit v1.2.1