From 27ef1920cf848e9add94c4106f8a76230efe787a Mon Sep 17 00:00:00 2001 From: iovar Date: Thu, 18 Jan 2007 19:07:14 +0000 Subject: New files: initialize_data.c, rmdthreads.c. Cleaned-up main, moved initialization tasks to InitializeData and all thread creation in rmdThreads. git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@258 f606c939-3180-4ac9-a4b8-4b8779d57d0a --- recordmydesktop/include/rmdfunc.h | 25 +++++++++++++++++++++++++ recordmydesktop/include/rmdtypes.h | 1 + 2 files changed, 26 insertions(+) (limited to 'recordmydesktop/include') diff --git a/recordmydesktop/include/rmdfunc.h b/recordmydesktop/include/rmdfunc.h index ec74105..447351a 100644 --- a/recordmydesktop/include/rmdfunc.h +++ b/recordmydesktop/include/rmdfunc.h @@ -449,5 +449,30 @@ int PurgeCache(CacheData *cache_data_t,int sound); */ void EncodeCache(ProgData *pdata); +/** +* Launch and wait capture threads. +* Also creates and waits the encoding threads when +* encode-on-the-fly is enabled. +* +* \param pdata ProgData struct containing all program data +*/ +void rmdThreads(ProgData *pdata); + +/** +* initialize lists,mutexes,image buffers, take first screenshot, +* and anything else needed before launching the capture threads. +* +* \param pdata ProgData struct containing all program data +* +* \param enc_data reference to enc_data structure +* +* \param cache_data reference to cache_data structure +* +* \returns 0 on success, other values must cause the program to exit +*/ +int InitializeData(ProgData *pdata, + EncData *enc_data, + CacheData *cache_data); + #endif diff --git a/recordmydesktop/include/rmdtypes.h b/recordmydesktop/include/rmdtypes.h index b50e1e2..b52817c 100644 --- a/recordmydesktop/include/rmdtypes.h +++ b/recordmydesktop/include/rmdtypes.h @@ -196,6 +196,7 @@ typedef struct _ProgData{ char *window_manager;//name of the window manager at program launch XImage *image;//the image that holds the current full screenshot XImage *shimage;//the image that holds the current full screenshot(shared memory) + XShmSegmentInfo shminfo;//info structure for the image above. unsigned char *dummy_pointer;//a dummy pointer to be drawn in every frame //data is casted to unsigned for later use in YUV buffer int dummy_p_size;//initially 16x16,always square -- cgit v1.2.1