summaryrefslogtreecommitdiff
path: root/recordmydesktop/src
diff options
context:
space:
mode:
authorenselic <enselic@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2009-01-10 20:00:06 +0000
committerenselic <enselic@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2009-01-10 20:00:06 +0000
commitd98ab1feca39233ea47753dff292f98b717f17f2 (patch)
treeb1319baca584ee440e72a013d41e3179d82f9efa /recordmydesktop/src
parent61ce53bb92bed72bcf946f425311ef1f55e8064c (diff)
src/*.c: Namescape all functions for consistency and general codebase
sanity (previously only a few rmd functions were namespaced). git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@590 f606c939-3180-4ac9-a4b8-4b8779d57d0a
Diffstat (limited to 'recordmydesktop/src')
-rw-r--r--recordmydesktop/src/rmd.c56
-rw-r--r--recordmydesktop/src/rmd_cache.c22
-rw-r--r--recordmydesktop/src/rmd_cache.h12
-rw-r--r--recordmydesktop/src/rmd_cache_audio.c2
-rw-r--r--recordmydesktop/src/rmd_cache_audio.h2
-rw-r--r--recordmydesktop/src/rmd_cache_frame.c64
-rw-r--r--recordmydesktop/src/rmd_cache_frame.h2
-rw-r--r--recordmydesktop/src/rmd_capture_sound.c26
-rw-r--r--recordmydesktop/src/rmd_capture_sound.h2
-rw-r--r--recordmydesktop/src/rmd_encode_cache.c8
-rw-r--r--recordmydesktop/src/rmd_encode_cache.h2
-rw-r--r--recordmydesktop/src/rmd_encode_image_buffer.c4
-rw-r--r--recordmydesktop/src/rmd_encode_image_buffer.h6
-rw-r--r--recordmydesktop/src/rmd_encode_sound_buffer.c4
-rw-r--r--recordmydesktop/src/rmd_encode_sound_buffer.h6
-rw-r--r--recordmydesktop/src/rmd_flush_to_ogg.c6
-rw-r--r--recordmydesktop/src/rmd_flush_to_ogg.h2
-rw-r--r--recordmydesktop/src/rmd_get_frame.c132
-rw-r--r--recordmydesktop/src/rmd_get_frame.h2
-rw-r--r--recordmydesktop/src/rmd_getzpixmap.c32
-rw-r--r--recordmydesktop/src/rmd_getzpixmap.h32
-rw-r--r--recordmydesktop/src/rmd_init_encoder.c6
-rw-r--r--recordmydesktop/src/rmd_init_encoder.h4
-rw-r--r--recordmydesktop/src/rmd_initialize_data.c56
-rw-r--r--recordmydesktop/src/rmd_initialize_data.h10
-rw-r--r--recordmydesktop/src/rmd_jack.c18
-rw-r--r--recordmydesktop/src/rmd_jack.h4
-rw-r--r--recordmydesktop/src/rmd_load_cache.c134
-rw-r--r--recordmydesktop/src/rmd_load_cache.h2
-rw-r--r--recordmydesktop/src/rmd_make_dummy_pointer.c12
-rw-r--r--recordmydesktop/src/rmd_make_dummy_pointer.h12
-rw-r--r--recordmydesktop/src/rmd_opendev.c20
-rw-r--r--recordmydesktop/src/rmd_opendev.h20
-rw-r--r--recordmydesktop/src/rmd_parseargs.c6
-rw-r--r--recordmydesktop/src/rmd_parseargs.h2
-rw-r--r--recordmydesktop/src/rmd_poll_events.c6
-rw-r--r--recordmydesktop/src/rmd_poll_events.h6
-rw-r--r--recordmydesktop/src/rmd_queryextensions.c10
-rw-r--r--recordmydesktop/src/rmd_queryextensions.h10
-rw-r--r--recordmydesktop/src/rmd_rectinsert.c30
-rw-r--r--recordmydesktop/src/rmd_rectinsert.h4
-rw-r--r--recordmydesktop/src/rmd_register_callbacks.c10
-rw-r--r--recordmydesktop/src/rmd_register_callbacks.h2
-rw-r--r--recordmydesktop/src/rmd_rescue.c10
-rw-r--r--recordmydesktop/src/rmd_setbrwindow.c14
-rw-r--r--recordmydesktop/src/rmd_setbrwindow.h8
-rw-r--r--recordmydesktop/src/rmd_shortcuts.c8
-rw-r--r--recordmydesktop/src/rmd_shortcuts.h8
-rw-r--r--recordmydesktop/src/rmd_specsfile.c4
-rw-r--r--recordmydesktop/src/rmd_specsfile.h4
-rw-r--r--recordmydesktop/src/rmd_threads.c18
-rw-r--r--recordmydesktop/src/rmd_update_image.c48
-rw-r--r--recordmydesktop/src/rmd_update_image.h22
-rw-r--r--recordmydesktop/src/rmd_yuv_utils.c2
-rw-r--r--recordmydesktop/src/rmd_yuv_utils.h2
-rw-r--r--recordmydesktop/src/test-rectinsert.c46
56 files changed, 501 insertions, 501 deletions
diff --git a/recordmydesktop/src/rmd.c b/recordmydesktop/src/rmd.c
index c945d2f..128399c 100644
--- a/recordmydesktop/src/rmd.c
+++ b/recordmydesktop/src/rmd.c
@@ -49,9 +49,9 @@ int main(int argc,char **argv){
ProgData pdata;
int exit_status = 0;
- SetupDefaultArgs(&pdata.args);
+ rmdSetupDefaultArgs(&pdata.args);
- if (!ParseArgs(argc, argv, &pdata.args)) {
+ if (!rmdParseArgs(argc, argv, &pdata.args)) {
exit(1);
}
if (pdata.args.rescue_path != NULL) {
@@ -100,7 +100,7 @@ int main(int argc,char **argv){
" color depth modes are currently supported.\n");
exit(10);
}
- if (!SetBRWindow(pdata.dpy, &pdata.brwin, &pdata.specs, &pdata.args))
+ if (!rmdSetBRWindow(pdata.dpy, &pdata.brwin, &pdata.specs, &pdata.args))
exit(11);
if( !pdata.args.nowmcheck &&
@@ -116,38 +116,38 @@ int main(int argc,char **argv){
}
- QueryExtensions(pdata.dpy,
- &pdata.args,
- &pdata.damage_event,
- &pdata.damage_error,
- &pdata.shm_opcode);
+ rmdQueryExtensions(pdata.dpy,
+ &pdata.args,
+ &pdata.damage_event,
+ &pdata.damage_error,
+ &pdata.shm_opcode);
- if((exit_status=InitializeData(&pdata,&enc_data,&cache_data))==0){
+ if((exit_status=rmdInitializeData(&pdata,&enc_data,&cache_data))==0){
if(!strcmp(pdata.args.pause_shortcut,
pdata.args.stop_shortcut)||
- RegisterShortcut(pdata.dpy,
- pdata.specs.root,
- pdata.args.pause_shortcut,
- &(pdata.pause_key)) ||
- RegisterShortcut(pdata.dpy,
- pdata.specs.root,
- pdata.args.stop_shortcut,
- &(pdata.stop_key))){
+ rmdRegisterShortcut(pdata.dpy,
+ pdata.specs.root,
+ pdata.args.pause_shortcut,
+ &(pdata.pause_key)) ||
+ rmdRegisterShortcut(pdata.dpy,
+ pdata.specs.root,
+ pdata.args.stop_shortcut,
+ &(pdata.stop_key))){
fprintf(stderr,"Invalid shortcut,"
" or shortcuts are the same!\n\n"
"Using defaults.\n");
- RegisterShortcut(pdata.dpy,
- pdata.specs.root,
- "Control+Mod1+p",
- &(pdata.pause_key));
- RegisterShortcut(pdata.dpy,
- pdata.specs.root,
- "Control+Mod1+s",
- &(pdata.stop_key));
+ rmdRegisterShortcut(pdata.dpy,
+ pdata.specs.root,
+ "Control+Mod1+p",
+ &(pdata.pause_key));
+ rmdRegisterShortcut(pdata.dpy,
+ pdata.specs.root,
+ "Control+Mod1+s",
+ &(pdata.stop_key));
}
//this is where the capturing happens.
@@ -159,10 +159,10 @@ int main(int argc,char **argv){
//encode and then cleanup cache
if(!pdata.args.encOnTheFly && !pdata.args.no_encode){
if (!pdata.aborted) {
- EncodeCache(&pdata);
+ rmdEncodeCache(&pdata);
}
fprintf(stderr,"Cleanning up cache...\n");
- if(PurgeCache(pdata.cache_data,!pdata.args.nosound))
+ if(rmdPurgeCache(pdata.cache_data,!pdata.args.nosound))
fprintf(stderr,"Some error occured "
"while cleaning up cache!\n");
fprintf(stderr,"Done!!!\n");
@@ -184,7 +184,7 @@ int main(int argc,char **argv){
fprintf(stderr,"Goodbye!\n");
- CleanUp();
+ rmdCleanUp();
}
}
diff --git a/recordmydesktop/src/rmd_cache.c b/recordmydesktop/src/rmd_cache.c
index 56e4301..2d0b00e 100644
--- a/recordmydesktop/src/rmd_cache.c
+++ b/recordmydesktop/src/rmd_cache.c
@@ -46,7 +46,7 @@
* \n number to be used as a postfix
*
*/
-static void CacheFileN(char *name, char **newname, int n) { // Nth cache file
+static void rmdCacheFileN(char *name, char **newname, int n) { // Nth cache file
char numbuf[8];
strcpy(*newname,name);
strcat(*newname,".");
@@ -54,9 +54,9 @@ static void CacheFileN(char *name, char **newname, int n) { // Nth cache file
strcat(*newname,numbuf);
}
-int SwapCacheFilesWrite(char *name,int n,gzFile **fp,FILE **ucfp){
+int rmdSwapCacheFilesWrite(char *name,int n,gzFile **fp,FILE **ucfp){
char *newname=malloc(strlen(name)+10);
- CacheFileN(name,&newname,n);
+ rmdCacheFileN(name,&newname,n);
if(*fp==NULL){
fflush(*ucfp);
fclose(*ucfp);
@@ -71,9 +71,9 @@ int SwapCacheFilesWrite(char *name,int n,gzFile **fp,FILE **ucfp){
return ((*fp==NULL)&&(*ucfp==NULL));
}
-int SwapCacheFilesRead(char *name,int n,gzFile **fp,FILE **ucfp){
+int rmdSwapCacheFilesRead(char *name,int n,gzFile **fp,FILE **ucfp){
char *newname=malloc(strlen(name)+10);
- CacheFileN(name,&newname,n);
+ rmdCacheFileN(name,&newname,n);
if(*fp==NULL){
fclose(*ucfp);
*ucfp=fopen(newname,"rb");
@@ -87,7 +87,7 @@ int SwapCacheFilesRead(char *name,int n,gzFile **fp,FILE **ucfp){
return ((*fp==NULL)&&(*ucfp==NULL));
}
-int PurgeCache(CacheData *cache_data_t,int sound){
+int rmdPurgeCache(CacheData *cache_data_t,int sound){
struct stat buff;
char *fname;
fname=malloc(strlen(cache_data_t->imgdata)+10);
@@ -101,7 +101,7 @@ int PurgeCache(CacheData *cache_data_t,int sound){
cache_data_t->imgdata);
exit_value=1;
}
- CacheFileN(cache_data_t->imgdata,&fname,nth_cache);
+ rmdCacheFileN(cache_data_t->imgdata,&fname,nth_cache);
nth_cache++;
}
free(fname);
@@ -125,9 +125,9 @@ int PurgeCache(CacheData *cache_data_t,int sound){
return exit_value;
}
-void InitCacheData(ProgData *pdata,
- EncData *enc_data_t,
- CacheData *cache_data_t){
+void rmdInitCacheData(ProgData *pdata,
+ EncData *enc_data_t,
+ CacheData *cache_data_t){
int width,height,offset_x,offset_y,pid;
char pidbuf[8];
@@ -215,7 +215,7 @@ void InitCacheData(ProgData *pdata,
exit(13);
}
}
- if(WriteSpecsFile(pdata)){
+ if(rmdWriteSpecsFile(pdata)){
fprintf(stderr,"Could not write specsfile %s !!!\n",
cache_data_t->specsfile);
exit(13);
diff --git a/recordmydesktop/src/rmd_cache.h b/recordmydesktop/src/rmd_cache.h
index a4ee79f..2def0e3 100644
--- a/recordmydesktop/src/rmd_cache.h
+++ b/recordmydesktop/src/rmd_cache.h
@@ -49,7 +49,7 @@
*
* \returns 0 on Success 1 on Failure
*/
-int SwapCacheFilesWrite(char *name,int n,gzFile **fp,FILE **ucfp);
+int rmdSwapCacheFilesWrite(char *name,int n,gzFile **fp,FILE **ucfp);
/**
* Change file pointer to a new file while reading
@@ -65,7 +65,7 @@ int SwapCacheFilesWrite(char *name,int n,gzFile **fp,FILE **ucfp);
*
* \returns 0 on Success 1 on Failure
*/
-int SwapCacheFilesRead(char *name,int n,gzFile **fp,FILE **ucfp);
+int rmdSwapCacheFilesRead(char *name,int n,gzFile **fp,FILE **ucfp);
/**
* Delete all cache files
@@ -74,7 +74,7 @@ int SwapCacheFilesRead(char *name,int n,gzFile **fp,FILE **ucfp);
*
* \returns 0 if all files and folders where deleted, 1 otherwise
*/
-int PurgeCache(CacheData *cache_data_t,int sound);
+int rmdPurgeCache(CacheData *cache_data_t,int sound);
/**
* Initializes paths and everything else needed to start caching
@@ -86,9 +86,9 @@ int PurgeCache(CacheData *cache_data_t,int sound);
* \param cache_data_t Caching options
*
*/
-void InitCacheData(ProgData *pdata,
- EncData *enc_data_t,
- CacheData *cache_data_t);
+void rmdInitCacheData(ProgData *pdata,
+ EncData *enc_data_t,
+ CacheData *cache_data_t);
#endif
diff --git a/recordmydesktop/src/rmd_cache_audio.c b/recordmydesktop/src/rmd_cache_audio.c
index c061ed3..aad5496 100644
--- a/recordmydesktop/src/rmd_cache_audio.c
+++ b/recordmydesktop/src/rmd_cache_audio.c
@@ -38,7 +38,7 @@
-void *CacheSoundBuffer(ProgData *pdata){
+void *rmdCacheSoundBuffer(ProgData *pdata){
//We are simply going to throw sound on the disk.
//It's sound is tiny compared to that of image, so
//compressing would reducethe overall size by only an
diff --git a/recordmydesktop/src/rmd_cache_audio.h b/recordmydesktop/src/rmd_cache_audio.h
index 2820c42..1ba3221 100644
--- a/recordmydesktop/src/rmd_cache_audio.h
+++ b/recordmydesktop/src/rmd_cache_audio.h
@@ -36,7 +36,7 @@
* \param pdata ProgData struct containing all program data
*
*/
-void *CacheSoundBuffer(ProgData *pdata);
+void *rmdCacheSoundBuffer(ProgData *pdata);
#endif
diff --git a/recordmydesktop/src/rmd_cache_frame.c b/recordmydesktop/src/rmd_cache_frame.c
index 92c9955..41197a8 100644
--- a/recordmydesktop/src/rmd_cache_frame.c
+++ b/recordmydesktop/src/rmd_cache_frame.c
@@ -43,14 +43,14 @@
#define CACHE_FILE_SIZE_LIMIT (500 * 1024 * 1024)
-static int FlushBlock(unsigned char *buf,
- int blockno,
- int width,
- int height,
- int blockwidth,
- gzFile *fp,
- FILE *ucfp,
- int flush) {
+static int rmdFlushBlock(unsigned char *buf,
+ int blockno,
+ int width,
+ int height,
+ int blockwidth,
+ gzFile *fp,
+ FILE *ucfp,
+ int flush) {
int j,i,
bytes_written=0,
block_i=(!blockwidth)?0:(blockno/(width/blockwidth)),//place on the grid
@@ -83,7 +83,7 @@ static int FlushBlock(unsigned char *buf,
return bytes_written;
}
-void *CacheImageBuffer(ProgData *pdata){
+void *rmdCacheImageBuffer(ProgData *pdata){
gzFile *fp=NULL;
FILE *ucfp=NULL;
@@ -206,42 +206,42 @@ void *CacheImageBuffer(ProgData *pdata){
//flush the blocks for each buffer
if(ynum){
for(j=0;j<ynum;j++)
- nbytes+=FlushBlock( pdata->enc_data->yuv.y,y_short_blocks[j],
- pdata->enc_data->yuv.y_width,
- pdata->enc_data->yuv.y_height,
- Y_UNIT_WIDTH,
- fp,
- ucfp,
- 0);
+ nbytes+=rmdFlushBlock(pdata->enc_data->yuv.y,y_short_blocks[j],
+ pdata->enc_data->yuv.y_width,
+ pdata->enc_data->yuv.y_height,
+ Y_UNIT_WIDTH,
+ fp,
+ ucfp,
+ 0);
}
if(unum){
for(j=0;j<unum;j++)
- nbytes+=FlushBlock( pdata->enc_data->yuv.u,u_short_blocks[j],
- pdata->enc_data->yuv.uv_width,
- pdata->enc_data->yuv.uv_height,
- UV_UNIT_WIDTH,
- fp,
- ucfp,
- 0);
+ nbytes+=rmdFlushBlock(pdata->enc_data->yuv.u,u_short_blocks[j],
+ pdata->enc_data->yuv.uv_width,
+ pdata->enc_data->yuv.uv_height,
+ UV_UNIT_WIDTH,
+ fp,
+ ucfp,
+ 0);
}
if(vnum){
for(j=0;j<vnum;j++)
- nbytes+=FlushBlock( pdata->enc_data->yuv.v,v_short_blocks[j],
- pdata->enc_data->yuv.uv_width,
- pdata->enc_data->yuv.uv_height,
- UV_UNIT_WIDTH,
- fp,
- ucfp,
- 0);
+ nbytes+=rmdFlushBlock(pdata->enc_data->yuv.v,v_short_blocks[j],
+ pdata->enc_data->yuv.uv_width,
+ pdata->enc_data->yuv.uv_height,
+ UV_UNIT_WIDTH,
+ fp,
+ ucfp,
+ 0);
}
//release main buffer
pthread_mutex_unlock(&pdata->yuv_mutex);
- nbytes+=FlushBlock(NULL,0,0,0,0,fp,ucfp,1);
+ nbytes+=rmdFlushBlock(NULL,0,0,0,0,fp,ucfp,1);
/**@________________@**/
pdata->avd+=pdata->frametime;
if(nbytes>CACHE_FILE_SIZE_LIMIT){
- if(SwapCacheFilesWrite(pdata->cache_data->imgdata,
+ if(rmdSwapCacheFilesWrite(pdata->cache_data->imgdata,
nth_cache,&fp,&ucfp)){
fprintf(stderr,"New cache file could not be created.\n"
"Ending recording...\n");
diff --git a/recordmydesktop/src/rmd_cache_frame.h b/recordmydesktop/src/rmd_cache_frame.h
index 347c50d..9361e35 100644
--- a/recordmydesktop/src/rmd_cache_frame.h
+++ b/recordmydesktop/src/rmd_cache_frame.h
@@ -37,7 +37,7 @@
* \param pdata ProgData struct containing all program data
*
*/
-void *CacheImageBuffer(ProgData *pdata);
+void *rmdCacheImageBuffer(ProgData *pdata);
#endif
diff --git a/recordmydesktop/src/rmd_capture_sound.c b/recordmydesktop/src/rmd_capture_sound.c
index 33c5814..8057311 100644
--- a/recordmydesktop/src/rmd_capture_sound.c
+++ b/recordmydesktop/src/rmd_capture_sound.c
@@ -36,7 +36,7 @@
#include <errno.h>
-void *CaptureSound(ProgData *pdata){
+void *rmdCaptureSound(ProgData *pdata){
#ifdef HAVE_LIBASOUND
int frames=pdata->periodsize;
@@ -62,15 +62,15 @@ void *CaptureSound(ProgData *pdata){
pthread_cond_wait(&pdata->pause_cond, &pdata->pause_mutex);
pthread_mutex_unlock(&pdata->pause_mutex);
pdata->sound_handle=
- OpenDev(pdata->args.device,
- &pdata->args.channels,
- &pdata->args.frequency,
- &pdata->args.buffsize,
- NULL,
- NULL,
- NULL//let's hope that the device capabilities
- //didn't magically change
- );
+ rmdOpenDev(pdata->args.device,
+ &pdata->args.channels,
+ &pdata->args.frequency,
+ &pdata->args.buffsize,
+ NULL,
+ NULL,
+ NULL//let's hope that the device capabilities
+ //didn't magically change
+ );
if(pdata->sound_handle==NULL){
fprintf(stderr,"Couldn't reopen sound device.Exiting\n");
pdata->running = FALSE;
@@ -84,9 +84,9 @@ void *CaptureSound(ProgData *pdata){
pthread_cond_wait(&pdata->pause_cond, &pdata->pause_mutex);
pthread_mutex_unlock(&pdata->pause_mutex);
pdata->sound_handle=
- OpenDev(pdata->args.device,
- pdata->args.channels,
- pdata->args.frequency);
+ rmdOpenDev(pdata->args.device,
+ pdata->args.channels,
+ pdata->args.frequency);
if(pdata->sound_handle<0){
fprintf(stderr,"Couldn't reopen sound device.Exiting\n");
pdata->running = FALSE;
diff --git a/recordmydesktop/src/rmd_capture_sound.h b/recordmydesktop/src/rmd_capture_sound.h
index b4e6531..b403fa8 100644
--- a/recordmydesktop/src/rmd_capture_sound.h
+++ b/recordmydesktop/src/rmd_capture_sound.h
@@ -36,7 +36,7 @@
*
* \param pdata ProgData struct containing all program data
*/
-void *CaptureSound(ProgData *pdata);
+void *rmdCaptureSound(ProgData *pdata);
#endif
diff --git a/recordmydesktop/src/rmd_encode_cache.c b/recordmydesktop/src/rmd_encode_cache.c
index 1ada5d0..adf6063 100644
--- a/recordmydesktop/src/rmd_encode_cache.c
+++ b/recordmydesktop/src/rmd_encode_cache.c
@@ -39,7 +39,7 @@
-void EncodeCache(ProgData *pdata){
+void rmdEncodeCache(ProgData *pdata){
pthread_t flush_to_ogg_t,
load_cache_t;
fprintf(stderr,"STATE:ENCODING\n");fflush(stderr);
@@ -49,7 +49,7 @@ void EncodeCache(ProgData *pdata){
"any portion of the video, which is already encoded won't be deleted).\n"
"Please wait...\n");
pdata->running = TRUE;
- InitEncoder(pdata,pdata->enc_data,1);
+ rmdInitEncoder(pdata,pdata->enc_data,1);
//load encoding and flushing threads
if(!pdata->args.nosound){
//before we start loading again
@@ -59,10 +59,10 @@ void EncodeCache(ProgData *pdata){
pdata->sound_buffer=pdata->sound_buffer->next;
}
}
- pthread_create(&flush_to_ogg_t,NULL,(void *)FlushToOgg,(void *)pdata);
+ pthread_create(&flush_to_ogg_t,NULL,(void *)rmdFlushToOgg,(void *)pdata);
//start loading image and audio
- pthread_create(&load_cache_t,NULL,(void *)LoadCache,(void *)pdata);
+ pthread_create(&load_cache_t,NULL,(void *)rmdLoadCache,(void *)pdata);
//join and finish
pthread_join(load_cache_t,NULL);
diff --git a/recordmydesktop/src/rmd_encode_cache.h b/recordmydesktop/src/rmd_encode_cache.h
index 2c021c3..4c37f97 100644
--- a/recordmydesktop/src/rmd_encode_cache.h
+++ b/recordmydesktop/src/rmd_encode_cache.h
@@ -35,7 +35,7 @@
* ogg stream.
* \param pdata ProgData struct containing all program data
*/
-void EncodeCache(ProgData *pdata);
+void rmdEncodeCache(ProgData *pdata);
#endif
diff --git a/recordmydesktop/src/rmd_encode_image_buffer.c b/recordmydesktop/src/rmd_encode_image_buffer.c
index 957ad66..9c984ea 100644
--- a/recordmydesktop/src/rmd_encode_image_buffer.c
+++ b/recordmydesktop/src/rmd_encode_image_buffer.c
@@ -32,7 +32,7 @@
#include <errno.h>
-void *EncodeImageBuffer(ProgData *pdata){
+void *rmdEncodeImageBuffer(ProgData *pdata){
pdata->th_encoding_clean=0;
while(pdata->running){
pdata->th_enc_thread_waiting=1;
@@ -77,7 +77,7 @@ void *EncodeImageBuffer(ProgData *pdata){
//this function is meant to be called normally
//not through a thread of it's own
-void SyncEncodeImageBuffer(ProgData *pdata){
+void rmdSyncEncodeImageBuffer(ProgData *pdata){
if(theora_encode_YUVin(&pdata->enc_data->m_th_st,
&pdata->enc_data->yuv)){
fprintf(stderr,"Encoder not ready!\n");
diff --git a/recordmydesktop/src/rmd_encode_image_buffer.h b/recordmydesktop/src/rmd_encode_image_buffer.h
index dcb2435..e5ca3db 100644
--- a/recordmydesktop/src/rmd_encode_image_buffer.h
+++ b/recordmydesktop/src/rmd_encode_image_buffer.h
@@ -35,16 +35,16 @@
* the ogg stream.
* \param pdata ProgData struct containing all program data
*/
-void *EncodeImageBuffer(ProgData *pdata);
+void *rmdEncodeImageBuffer(ProgData *pdata);
/**
-* As EncodeImageBuffer, only with the assumption that
+* As rmdEncodeImageBuffer, only with the assumption that
* this is not a thread on it's own
*
* \param pdata ProgData struct containing all program data
*
*/
-void SyncEncodeImageBuffer(ProgData *pdata);
+void rmdSyncEncodeImageBuffer(ProgData *pdata);
#endif
diff --git a/recordmydesktop/src/rmd_encode_sound_buffer.c b/recordmydesktop/src/rmd_encode_sound_buffer.c
index 3a6572c..1d88a59 100644
--- a/recordmydesktop/src/rmd_encode_sound_buffer.c
+++ b/recordmydesktop/src/rmd_encode_sound_buffer.c
@@ -36,7 +36,7 @@
#include <errno.h>
-void *EncodeSoundBuffer(ProgData *pdata){
+void *rmdEncodeSoundBuffer(ProgData *pdata){
int sampread=pdata->periodsize;
#ifdef HAVE_LIBJACK
void *jackbuf=NULL;
@@ -143,7 +143,7 @@ void *EncodeSoundBuffer(ProgData *pdata){
pthread_exit(&errno);
}
-void SyncEncodeSoundBuffer(ProgData *pdata,signed char *buff){
+void rmdSyncEncodeSoundBuffer(ProgData *pdata,signed char *buff){
float **vorbis_buffer;
int count=0,i,j;
int sampread=(buff!=NULL)?pdata->periodsize:0;
diff --git a/recordmydesktop/src/rmd_encode_sound_buffer.h b/recordmydesktop/src/rmd_encode_sound_buffer.h
index b773e12..7d5c312 100644
--- a/recordmydesktop/src/rmd_encode_sound_buffer.h
+++ b/recordmydesktop/src/rmd_encode_sound_buffer.h
@@ -36,16 +36,16 @@
*
* \param pdata ProgData struct containing all program data
*/
-void *EncodeSoundBuffer(ProgData *pdata);
+void *rmdEncodeSoundBuffer(ProgData *pdata);
/**
-* As EncodeSoundBuffer, only with the assumption that
+* As rmdEncodeSoundBuffer, only with the assumption that
* this is not a thread on it's own
*
* \param pdata ProgData struct containing all program data
*
*/
-void SyncEncodeSoundBuffer(ProgData *pdata,signed char *buff);
+void rmdSyncEncodeSoundBuffer(ProgData *pdata,signed char *buff);
#endif
diff --git a/recordmydesktop/src/rmd_flush_to_ogg.c b/recordmydesktop/src/rmd_flush_to_ogg.c
index ae94b2f..f672137 100644
--- a/recordmydesktop/src/rmd_flush_to_ogg.c
+++ b/recordmydesktop/src/rmd_flush_to_ogg.c
@@ -69,7 +69,7 @@ static void ogg_page_cp_free(ogg_page *pg) {
free(pg->body);
}
-void *FlushToOgg(ProgData *pdata){
+void *rmdFlushToOgg(ProgData *pdata){
int videoflag=0,audioflag=0;
double video_bytesout=0,audio_bytesout=0;
ogg_page videopage,//owned by libogg
@@ -123,7 +123,7 @@ void *FlushToOgg(ProgData *pdata){
&pdata->theora_lib_mutex);
pthread_mutex_unlock(&pdata->theora_lib_mutex);
}
- SyncEncodeImageBuffer(pdata);
+ rmdSyncEncodeImageBuffer(pdata);
}
}
if(!pdata->args.nosound && !v_st_fin &&!audioflag){
@@ -143,7 +143,7 @@ void *FlushToOgg(ProgData *pdata){
&pdata->vorbis_lib_mutex);
pthread_mutex_unlock(&pdata->vorbis_lib_mutex);
}
- SyncEncodeSoundBuffer(pdata,NULL);
+ rmdSyncEncodeSoundBuffer(pdata,NULL);
}
}
}
diff --git a/recordmydesktop/src/rmd_flush_to_ogg.h b/recordmydesktop/src/rmd_flush_to_ogg.h
index a97a3b3..64094a8 100644
--- a/recordmydesktop/src/rmd_flush_to_ogg.h
+++ b/recordmydesktop/src/rmd_flush_to_ogg.h
@@ -35,6 +35,6 @@
* flush them on the disk
* \param pdata ProgData struct containing all program data
*/
-void *FlushToOgg(ProgData *pdata);
+void *rmdFlushToOgg(ProgData *pdata);
#endif
diff --git a/recordmydesktop/src/rmd_get_frame.c b/recordmydesktop/src/rmd_get_frame.c
index 0baff5e..cb00edb 100644
--- a/recordmydesktop/src/rmd_get_frame.c
+++ b/recordmydesktop/src/rmd_get_frame.c
@@ -195,10 +195,10 @@
//besides taking the first screenshot, this functions primary purpose is to
//initialize the structures and memory.
-static int FirstFrame(ProgData *pdata,
- XImage **image,
- XShmSegmentInfo *shminfo,
- char **pxl_data) {
+static int rmdFirstFrame(ProgData *pdata,
+ XImage **image,
+ XShmSegmentInfo *shminfo,
+ char **pxl_data) {
if((pdata->args.noshared)){
@@ -215,12 +215,12 @@ static int FirstFrame(ProgData *pdata,
8,
0);
XInitImage((*image));
- GetZPixmap(pdata->dpy,pdata->specs.root,
- (*image)->data,
- pdata->brwin.rrect.x,
- pdata->brwin.rrect.y,
- pdata->brwin.rrect.width,
- pdata->brwin.rrect.height);
+ rmdGetZPixmap(pdata->dpy,pdata->specs.root,
+ (*image)->data,
+ pdata->brwin.rrect.x,
+ pdata->brwin.rrect.y,
+ pdata->brwin.rrect.width,
+ pdata->brwin.rrect.height);
}
else{
(*image)=XShmCreateImage(pdata->dpy,
@@ -265,7 +265,7 @@ static int FirstFrame(ProgData *pdata,
}
//make a deep copy
-static void BRWinCpy(BRWindow *target, BRWindow *source) {
+static void rmdBRWinCpy(BRWindow *target, BRWindow *source) {
target->rect.x=source->rect.x;
target->rect.y=source->rect.y;
@@ -282,11 +282,11 @@ static void BRWinCpy(BRWindow *target, BRWindow *source) {
//recenters the capture area to the mouse
//without exiting the display bounding box
-static void MoveCaptureArea(BRWindow *brwin,
- int cursor_x,
- int cursor_y,
- int width,
- int height) {
+static void rmdMoveCaptureArea(BRWindow *brwin,
+ int cursor_x,
+ int cursor_y,
+ int width,
+ int height) {
int t_x=0,t_y=0;
t_x=cursor_x-brwin->rrect.width/2;
@@ -312,11 +312,11 @@ static void MoveCaptureArea(BRWindow *brwin,
*
* \param blocknum_y Height of image in blocks
*/
-static void BlocksFromList (RectArea **root,
- unsigned int x_offset,
- unsigned int y_offset,
- unsigned int blocknum_x,
- unsigned int blocknum_y) {
+static void rmdBlocksFromList (RectArea **root,
+ unsigned int x_offset,
+ unsigned int y_offset,
+ unsigned int blocknum_x,
+ unsigned int blocknum_y) {
RectArea *temp;
unsigned int i,
@@ -353,7 +353,7 @@ static void BlocksFromList (RectArea **root,
}
}
-void *GetFrame(ProgData *pdata){
+void *rmdGetFrame(ProgData *pdata){
int i=0,
blocknum_x=pdata->enc_data->yuv.y_width/Y_UNIT_WIDTH,
blocknum_y=pdata->enc_data->yuv.y_height/Y_UNIT_WIDTH;
@@ -375,7 +375,7 @@ void *GetFrame(ProgData *pdata){
img_sel=d_buff=pdata->args.full_shots;
- if((init_img1=FirstFrame(pdata,&image,&shminfo,&pxl_data)!=0)){
+ if((init_img1=rmdFirstFrame(pdata,&image,&shminfo,&pxl_data)!=0)){
if(pdata->args.encOnTheFly){
if(remove(pdata->args.filename)){
perror("Error while removing file:\n");
@@ -386,13 +386,13 @@ void *GetFrame(ProgData *pdata){
}
}
else{
- PurgeCache(pdata->cache_data,!pdata->args.nosound);
+ rmdPurgeCache(pdata->cache_data,!pdata->args.nosound);
}
exit(init_img1);
}
if(d_buff){
- if((init_img2=FirstFrame(pdata,&image_back,&shminfo_back,
- &pxl_data_back)!=0)){
+ if((init_img2=rmdFirstFrame(pdata,&image_back,&shminfo_back,
+ &pxl_data_back)!=0)){
if(pdata->args.encOnTheFly){
if(remove(pdata->args.filename)){
perror("Error while removing file:\n");
@@ -403,7 +403,7 @@ void *GetFrame(ProgData *pdata){
}
}
else{
- PurgeCache(pdata->cache_data,!pdata->args.nosound);
+ rmdPurgeCache(pdata->cache_data,!pdata->args.nosound);
}
exit(init_img2);
}
@@ -429,7 +429,7 @@ void *GetFrame(ProgData *pdata){
//This is the the place where we call XSelectInput
//and arrange so that we listen for damage on all
//windows
- InitEventsPolling(pdata);
+ rmdInitEventsPolling(pdata);
while(pdata->running){
@@ -443,20 +443,20 @@ void *GetFrame(ProgData *pdata){
if (pdata->paused) {
//this is necessary since event loop processes
//the shortcuts which will unpause the program
- EventLoop(pdata);
+ rmdEventLoop(pdata);
continue;
}
}
//read all events and construct list with damage
//events (if not full_shots)
- EventLoop(pdata);
+ rmdEventLoop(pdata);
//switch back and front buffers (full_shots only)
if(d_buff)
img_sel=(img_sel)?0:1;
pdata->capture_busy = TRUE;
- BRWinCpy(&temp_brwin,&pdata->brwin);
+ rmdBRWinCpy(&temp_brwin,&pdata->brwin);
if(pdata->args.xfixes_cursor ||
@@ -465,15 +465,15 @@ void *GetFrame(ProgData *pdata){
// Pointer sequence:
- // * Mark previous position as dirty with RectInsert()
+ // * Mark previous position as dirty with rmdRectInsert()
// * Update to new position
- // * Mark new position as dirty with RectInsert()
+ // * Mark new position as dirty with rmdRectInsert()
if (!pdata->args.full_shots &&
mouse_pos_temp.x >=0 &&
mouse_pos_temp.y >=0 &&
mouse_pos_temp.width > 0 &&
mouse_pos_temp.height > 0) {
- RectInsert(&pdata->rect_root,&mouse_pos_temp);
+ rmdRectInsert(&pdata->rect_root,&mouse_pos_temp);
}
if(pdata->args.xfixes_cursor){
xcim=XFixesGetCursorImage(pdata->dpy);
@@ -508,7 +508,7 @@ void *GetFrame(ProgData *pdata){
if (!pdata->args.full_shots) {
- RectInsert(&pdata->rect_root,&mouse_pos_temp);
+ rmdRectInsert(&pdata->rect_root,&mouse_pos_temp);
}
else if(d_buff){
@@ -531,13 +531,13 @@ void *GetFrame(ProgData *pdata){
}
}
if(pdata->args.follow_mouse){
- MoveCaptureArea(&pdata->brwin,
- mouse_pos_abs.x+
- ((pdata->args.xfixes_cursor)?xcim->xhot:0),
- mouse_pos_abs.y+
- ((pdata->args.xfixes_cursor)?xcim->yhot:0),
- pdata->specs.width,
- pdata->specs.height);
+ rmdMoveCaptureArea(&pdata->brwin,
+ mouse_pos_abs.x+
+ ((pdata->args.xfixes_cursor)?xcim->xhot:0),
+ mouse_pos_abs.y+
+ ((pdata->args.xfixes_cursor)?xcim->yhot:0),
+ pdata->specs.width,
+ pdata->specs.height);
if(!pdata->args.noframe){
rmdMoveFrame(pdata->dpy,
pdata->shaped_w,
@@ -549,22 +549,22 @@ void *GetFrame(ProgData *pdata){
if(!pdata->args.full_shots){
pthread_mutex_lock(&pdata->yuv_mutex);
- UpdateImage(pdata->dpy,
- &pdata->enc_data->yuv,
- &pdata->specs,
- &pdata->rect_root,
- &temp_brwin,
- pdata->enc_data,
- image->data,
- pdata->args.noshared,
- &shminfo,
- pdata->shm_opcode,
- pdata->args.no_quick_subsample);
- BlocksFromList(&pdata->rect_root,
- temp_brwin.rrect.x,
- temp_brwin.rrect.y,
- pdata->enc_data->yuv.y_width/Y_UNIT_WIDTH,
- pdata->enc_data->yuv.y_height/Y_UNIT_WIDTH);
+ rmdUpdateImage(pdata->dpy,
+ &pdata->enc_data->yuv,
+ &pdata->specs,
+ &pdata->rect_root,
+ &temp_brwin,
+ pdata->enc_data,
+ image->data,
+ pdata->args.noshared,
+ &shminfo,
+ pdata->shm_opcode,
+ pdata->args.no_quick_subsample);
+ rmdBlocksFromList(&pdata->rect_root,
+ temp_brwin.rrect.x,
+ temp_brwin.rrect.y,
+ pdata->enc_data->yuv.y_width/Y_UNIT_WIDTH,
+ pdata->enc_data->yuv.y_height/Y_UNIT_WIDTH);
pthread_mutex_unlock(&pdata->yuv_mutex);
}
else{
@@ -581,13 +581,13 @@ void *GetFrame(ProgData *pdata){
(temp_brwin.rrect.y),AllPlanes);
}
if(pdata->args.noshared){
- GetZPixmap( pdata->dpy,
- pdata->specs.root,
- image->data,
- temp_brwin.rrect.x,
- temp_brwin.rrect.y,
- temp_brwin.rrect.width,
- temp_brwin.rrect.height);
+ rmdGetZPixmap( pdata->dpy,
+ pdata->specs.root,
+ image->data,
+ temp_brwin.rrect.x,
+ temp_brwin.rrect.y,
+ temp_brwin.rrect.width,
+ temp_brwin.rrect.height);
}
pthread_mutex_lock(&pdata->yuv_mutex);
for(i=0;i<blocknum_x*blocknum_y;i++){
@@ -680,7 +680,7 @@ void *GetFrame(ProgData *pdata){
}
}
if(!pdata->args.full_shots){
- ClearList(&pdata->rect_root);
+ rmdClearList(&pdata->rect_root);
}
if (pdata->encoder_busy) {
pdata->frames_lost++;
diff --git a/recordmydesktop/src/rmd_get_frame.h b/recordmydesktop/src/rmd_get_frame.h
index 36c378d..162c05e 100644
--- a/recordmydesktop/src/rmd_get_frame.h
+++ b/recordmydesktop/src/rmd_get_frame.h
@@ -35,7 +35,7 @@
* either directly(full shots) or by calling UpdateImage.
* \param pdata ProgData struct containing all program data
*/
-void *GetFrame(ProgData *pdata);
+void *rmdGetFrame(ProgData *pdata);
#endif
diff --git a/recordmydesktop/src/rmd_getzpixmap.c b/recordmydesktop/src/rmd_getzpixmap.c
index 33c31c2..60ce465 100644
--- a/recordmydesktop/src/rmd_getzpixmap.c
+++ b/recordmydesktop/src/rmd_getzpixmap.c
@@ -37,13 +37,13 @@
-int GetZPixmap(Display *dpy,
- Window root,
- char *data,
- int x,
- int y,
- int width,
- int height){
+int rmdGetZPixmap(Display *dpy,
+ Window root,
+ char *data,
+ int x,
+ int y,
+ int width,
+ int height){
xGetImageReply reply;
xGetImageReq *request;
long nbytes;
@@ -69,15 +69,15 @@ int GetZPixmap(Display *dpy,
return 0;
}
-int GetZPixmapSHM(Display *dpy,
- Window root,
- XShmSegmentInfo *shminfo,
- int shm_opcode,
- char *data,
- int x,
- int y,
- int width,
- int height){
+int rmdGetZPixmapSHM(Display *dpy,
+ Window root,
+ XShmSegmentInfo *shminfo,
+ int shm_opcode,
+ char *data,
+ int x,
+ int y,
+ int width,
+ int height){
xShmGetImageReply reply;
xShmGetImageReq *request=NULL;
long nbytes;
diff --git a/recordmydesktop/src/rmd_getzpixmap.h b/recordmydesktop/src/rmd_getzpixmap.h
index 81e0025..87ad7bb 100644
--- a/recordmydesktop/src/rmd_getzpixmap.h
+++ b/recordmydesktop/src/rmd_getzpixmap.h
@@ -52,13 +52,13 @@
*
* \returns 0 on Success 1 on Failure
*/
-int GetZPixmap(Display *dpy,
- Window root,
- char *data,
- int x,
- int y,
- int width,
- int height);
+int rmdGetZPixmap(Display *dpy,
+ Window root,
+ char *data,
+ int x,
+ int y,
+ int width,
+ int height);
/**
* Rerieve pixmap data from xserver through the MIT-Shm extension
@@ -85,15 +85,15 @@ int GetZPixmap(Display *dpy,
*
* \returns 0 on Success 1 on Failure
*/
-int GetZPixmapSHM(Display *dpy,
- Window root,
- XShmSegmentInfo *shminfo,
- int shm_opcode,
- char *data,
- int x,
- int y,
- int width,
- int height);
+int rmdGetZPixmapSHM(Display *dpy,
+ Window root,
+ XShmSegmentInfo *shminfo,
+ int shm_opcode,
+ char *data,
+ int x,
+ int y,
+ int width,
+ int height);
#endif
diff --git a/recordmydesktop/src/rmd_init_encoder.c b/recordmydesktop/src/rmd_init_encoder.c
index ad4e976..036009f 100644
--- a/recordmydesktop/src/rmd_init_encoder.c
+++ b/recordmydesktop/src/rmd_init_encoder.c
@@ -53,7 +53,7 @@ static void m_add_fishead_packet(ogg_stream_state *m_ogg_state) {
}
-static int IncrementalNaming(char **name) {
+static int rmdIncrementalNaming(char **name) {
struct stat buff;
char *base_name__;
int i=0,
@@ -90,7 +90,7 @@ static int IncrementalNaming(char **name) {
return 0;
}
-void InitEncoder(ProgData *pdata,EncData *enc_data_t,int buffer_ready){
+void rmdInitEncoder(ProgData *pdata,EncData *enc_data_t,int buffer_ready){
int y0,
y1,
@@ -124,7 +124,7 @@ void InitEncoder(ProgData *pdata,EncData *enc_data_t,int buffer_ready){
}
if (!pdata->args.overwrite) {
- IncrementalNaming(&(pdata)->args.filename);
+ rmdIncrementalNaming(&(pdata)->args.filename);
fprintf(stderr, "Output file: %s\n", pdata->args.filename);
}
diff --git a/recordmydesktop/src/rmd_init_encoder.h b/recordmydesktop/src/rmd_init_encoder.h
index fd871bb..bbf73c7 100644
--- a/recordmydesktop/src/rmd_init_encoder.h
+++ b/recordmydesktop/src/rmd_init_encoder.h
@@ -38,10 +38,10 @@
* \param enc_data_t Encoding options
*
* \param buffer_ready when 1, the yuv buffer must be preallocated
-* when 0 InitEncoder will alocate a new one
+* when 0 rmdInitEncoder will alocate a new one
*
*/
-void InitEncoder(ProgData *pdata,EncData *enc_data_t,int buffer_ready);
+void rmdInitEncoder(ProgData *pdata,EncData *enc_data_t,int buffer_ready);
#endif
diff --git a/recordmydesktop/src/rmd_initialize_data.c b/recordmydesktop/src/rmd_initialize_data.c
index dec594f..a95da82 100644
--- a/recordmydesktop/src/rmd_initialize_data.c
+++ b/recordmydesktop/src/rmd_initialize_data.c
@@ -42,10 +42,10 @@
#include <string.h>
#ifdef HAVE_LIBASOUND
-static void FixBufferSize(snd_pcm_uframes_t *buffsize) {
+static void rmdFixBufferSize(snd_pcm_uframes_t *buffsize) {
snd_pcm_uframes_t buffsize_t=*buffsize,
#else
-static void FixBufferSize(u_int32_t *buffsize) {
+static void rmdFixBufferSize(u_int32_t *buffsize) {
u_int32_t buffsize_t=*buffsize,
#endif
buffsize_ret=1;
@@ -57,20 +57,20 @@ static void FixBufferSize(u_int32_t *buffsize) {
(int)buffsize_ret,(int)*buffsize);
}
-int InitializeData(ProgData *pdata,
- EncData *enc_data,
- CacheData *cache_data){
+int rmdInitializeData(ProgData *pdata,
+ EncData *enc_data,
+ CacheData *cache_data){
int i;
fprintf(stderr,"Initializing...\n");
- MakeMatrices();
+ rmdMakeMatrices();
if(pdata->args.have_dummy_cursor){
- pdata->dummy_pointer = MakeDummyPointer(pdata->dpy,
- &pdata->specs,
- 16,
- pdata->args.cursor_color,
- 0,
- &pdata->npxl);
+ pdata->dummy_pointer = rmdMakeDummyPointer(pdata->dpy,
+ &pdata->specs,
+ 16,
+ pdata->args.cursor_color,
+ 0,
+ &pdata->npxl);
pdata->dummy_p_size=16;
}
else
@@ -107,24 +107,24 @@ int InitializeData(ProgData *pdata,
if(!pdata->args.nosound){
if(!pdata->args.use_jack){
- FixBufferSize(&pdata->args.buffsize);
+ rmdFixBufferSize(&pdata->args.buffsize);
#ifdef HAVE_LIBASOUND
- pdata->sound_handle=OpenDev( pdata->args.device,
- &pdata->args.channels,
- &pdata->args.frequency,
- &pdata->args.buffsize,
- &pdata->periodsize,
- &pdata->periodtime,
- &pdata->hard_pause);
+ pdata->sound_handle=rmdOpenDev(pdata->args.device,
+ &pdata->args.channels,
+ &pdata->args.frequency,
+ &pdata->args.buffsize,
+ &pdata->periodsize,
+ &pdata->periodtime,
+ &pdata->hard_pause);
pdata->sound_framesize=((snd_pcm_format_width(
SND_PCM_FORMAT_S16_LE))/8)*
pdata->args.channels;
if(pdata->sound_handle==NULL){
#else
- pdata->sound_handle=OpenDev(pdata->args.device,
- pdata->args.channels,
- pdata->args.frequency);
+ pdata->sound_handle=rmdOpenDev(pdata->args.device,
+ pdata->args.channels,
+ pdata->args.frequency);
pdata->periodtime=(1000000*pdata->args.buffsize)/
((pdata->args.channels<<1)*pdata->args.frequency);
//when using OSS periodsize serves as an alias of buffsize
@@ -149,7 +149,7 @@ int InitializeData(ProgData *pdata,
pdata->jdata->sound_data_read=&pdata->sound_data_read;
pdata->jdata->capture_started=0;
- if((jack_error=StartJackClient(pdata->jdata))!=0)
+ if((jack_error=rmdStartJackClient(pdata->jdata))!=0)
return jack_error;
pdata->args.buffsize=pdata->jdata->buffersize;
@@ -169,9 +169,9 @@ int InitializeData(ProgData *pdata,
}
if(pdata->args.encOnTheFly)
- InitEncoder(pdata,enc_data,0);
+ rmdInitEncoder(pdata,enc_data,0);
else
- InitCacheData(pdata,enc_data,cache_data);
+ rmdInitCacheData(pdata,enc_data,cache_data);
for(i=0;i<(pdata->enc_data->yuv.y_width*pdata->enc_data->yuv.y_height);i++)
pdata->enc_data->yuv.y[i]=0;
@@ -193,7 +193,7 @@ int InitializeData(ProgData *pdata,
}
-void SetupDefaultArgs(ProgArgs *args) {
+void rmdSetupDefaultArgs(ProgArgs *args) {
args->delay = 0;
args->windowid = 0;
@@ -253,7 +253,7 @@ void SetupDefaultArgs(ProgArgs *args) {
strcpy(args->filename, "out.ogv");
}
-void CleanUp(void){
+void rmdCleanUp(void){
free(yblocks);
free(ublocks);
diff --git a/recordmydesktop/src/rmd_initialize_data.h b/recordmydesktop/src/rmd_initialize_data.h
index 29bd2fc..a5e43dd 100644
--- a/recordmydesktop/src/rmd_initialize_data.h
+++ b/recordmydesktop/src/rmd_initialize_data.h
@@ -42,21 +42,21 @@
*
* \returns 0 on success, other values must cause the program to exit
*/
-int InitializeData(ProgData *pdata,
- EncData *enc_data,
- CacheData *cache_data);
+int rmdInitializeData(ProgData *pdata,
+ EncData *enc_data,
+ CacheData *cache_data);
/**
* Sets up the ProgArgs structure to default values.
*/
-void SetupDefaultArgs(ProgArgs *args);
+void rmdSetupDefaultArgs(ProgArgs *args);
/**
* Currently only frees some memory
* (y,u,v blocks)
*
*/
-void CleanUp(void);
+void rmdCleanUp(void);
#endif
diff --git a/recordmydesktop/src/rmd_jack.c b/recordmydesktop/src/rmd_jack.c
index eb9de28..fb7a55e 100644
--- a/recordmydesktop/src/rmd_jack.c
+++ b/recordmydesktop/src/rmd_jack.c
@@ -46,7 +46,7 @@
*
* \returns Zero always
*/
-static int JackCapture(jack_nframes_t nframes,void *jdata_t) {
+static int rmdJackCapture(jack_nframes_t nframes,void *jdata_t) {
int i=0;
JackData *jdata=(JackData *)jdata_t;
@@ -67,7 +67,7 @@ static int JackCapture(jack_nframes_t nframes,void *jdata_t) {
/*FIXME */
//This is not safe.
//cond_var signaling must move away from signal handlers
-//alltogether (JackCapture, SetExpired, SetPaused).
+//alltogether (rmdJackCapture, 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
@@ -87,7 +87,7 @@ static int JackCapture(jack_nframes_t nframes,void *jdata_t) {
*
* \returns 0 on Success, 1 on failure
*/
-static int SetupPorts(JackData *jdata) {
+static int rmdSetupPorts(JackData *jdata) {
int i=0;
jdata->ports=malloc(sizeof(jack_port_t *)*
jdata->nports);
@@ -126,7 +126,7 @@ static int SetupPorts(JackData *jdata) {
//the program should stop recording,
//encode the result(if not on the fly)
//an exit cleanly.
-static void JackShutdown(void *jdata_t) {
+static void rmdJackShutdown(void *jdata_t) {
JackData *jdata = (JackData *)jdata_t;
jdata->pdata->running = FALSE;
@@ -134,7 +134,7 @@ static void JackShutdown(void *jdata_t) {
fprintf (stderr, "JACK shutdown\n");
}
-int StartJackClient(JackData *jdata){
+int rmdStartJackClient(JackData *jdata){
float ring_buffer_size=0.0;
int pid;
char pidbuf[8];
@@ -176,14 +176,14 @@ int StartJackClient(JackData *jdata){
jdata->nports);
jdata->sound_buffer=
(*jack_ringbuffer_create)((int)(ring_buffer_size+0.5));//round up
- jack_set_process_callback(jdata->client,JackCapture,jdata);
- jack_on_shutdown(jdata->client,JackShutdown,jdata);
+ jack_set_process_callback(jdata->client,rmdJackCapture,jdata);
+ jack_on_shutdown(jdata->client,rmdJackShutdown,jdata);
if (jack_activate(jdata->client)) {
fprintf(stderr,"cannot activate client!\n");
return 16;
}
- if(SetupPorts(jdata)){
+ if(rmdSetupPorts(jdata)){
jack_client_close(jdata->client);
return 17;
}
@@ -191,7 +191,7 @@ int StartJackClient(JackData *jdata){
return 0;
}
-int StopJackClient(JackData *jdata){
+int rmdStopJackClient(JackData *jdata){
int ret=0;
(*jack_ringbuffer_free)(jdata->sound_buffer);
diff --git a/recordmydesktop/src/rmd_jack.h b/recordmydesktop/src/rmd_jack.h
index e322cba..a216c1b 100644
--- a/recordmydesktop/src/rmd_jack.h
+++ b/recordmydesktop/src/rmd_jack.h
@@ -41,7 +41,7 @@
* \returns 0 on Success, error code on failure
* (depending on where the error occured)
*/
-int StartJackClient(JackData *jdata);
+int rmdStartJackClient(JackData *jdata);
/**
* Close Jack Client
@@ -51,7 +51,7 @@ int StartJackClient(JackData *jdata);
*
* \returns 0 on Success, 1 on failure
*/
-int StopJackClient(JackData *jdata);
+int rmdStopJackClient(JackData *jdata);
#endif
diff --git a/recordmydesktop/src/rmd_load_cache.c b/recordmydesktop/src/rmd_load_cache.c
index 1e527a2..e744ce5 100644
--- a/recordmydesktop/src/rmd_load_cache.c
+++ b/recordmydesktop/src/rmd_load_cache.c
@@ -66,12 +66,12 @@ typedef struct _CachedFrame{
}CachedFrame;
-static void LoadBlock(unsigned char *dest,
- unsigned char *source,
- int blockno,
- int width,
- int height,
- int blockwidth) {
+static void rmdLoadBlock(unsigned char *dest,
+ unsigned char *source,
+ int blockno,
+ int width,
+ int height,
+ int blockwidth) {
int j,
block_i=blockno/(width/blockwidth),//place on the grid
block_k=blockno%(width/blockwidth);
@@ -82,7 +82,7 @@ static void LoadBlock(unsigned char *dest,
}
//returns number of bytes
-static int ReadZF(void * buffer, size_t size, size_t nmemb, FILE *ucfp, gzFile *ifp) {
+static int rmdReadZF(void * buffer, size_t size, size_t nmemb, FILE *ucfp, gzFile *ifp) {
if((ifp!=NULL && ucfp!=NULL)||
(ifp==NULL && ucfp==NULL))
return -1;
@@ -93,66 +93,66 @@ static int ReadZF(void * buffer, size_t size, size_t nmemb, FILE *ucfp, gzFile *
return gzread(ifp,buffer,size*nmemb);
}
-static int ReadFrame(CachedFrame *frame, FILE *ucfp, gzFile *ifp) {
+static int rmdReadFrame(CachedFrame *frame, FILE *ucfp, gzFile *ifp) {
int index_entry_size=sizeof(u_int32_t);
if(frame->header->Ynum>0){
- if(ReadZF(frame->YBlocks,
- index_entry_size,
- frame->header->Ynum,
- ucfp,
- ifp)!=index_entry_size*frame->header->Ynum){
+ if(rmdReadZF(frame->YBlocks,
+ index_entry_size,
+ frame->header->Ynum,
+ ucfp,
+ ifp)!=index_entry_size*frame->header->Ynum){
return -1;
}
}
if(frame->header->Unum>0){
- if(ReadZF(frame->UBlocks,
- index_entry_size,
- frame->header->Unum,
- ucfp,
- ifp)!=index_entry_size*frame->header->Unum){
+ if(rmdReadZF(frame->UBlocks,
+ index_entry_size,
+ frame->header->Unum,
+ ucfp,
+ ifp)!=index_entry_size*frame->header->Unum){
return -1;
}
}
if(frame->header->Vnum>0){
- if(ReadZF(frame->VBlocks,
- index_entry_size,
- frame->header->Vnum,
- ucfp,
- ifp)!=index_entry_size*frame->header->Vnum){
+ if(rmdReadZF(frame->VBlocks,
+ index_entry_size,
+ frame->header->Vnum,
+ ucfp,
+ ifp)!=index_entry_size*frame->header->Vnum){
return -1;
}
}
if(frame->header->Ynum>0){
- if(ReadZF(frame->YData,
- Y_UNIT_BYTES,
- frame->header->Ynum,
- ucfp,
- ifp)!=Y_UNIT_BYTES*frame->header->Ynum){
+ if(rmdReadZF(frame->YData,
+ Y_UNIT_BYTES,
+ frame->header->Ynum,
+ ucfp,
+ ifp)!=Y_UNIT_BYTES*frame->header->Ynum){
return -2;
}
}
if(frame->header->Unum>0){
- if(ReadZF(frame->UData,
- UV_UNIT_BYTES,
- frame->header->Unum,
- ucfp,
- ifp)!=UV_UNIT_BYTES*frame->header->Unum){
+ if(rmdReadZF(frame->UData,
+ UV_UNIT_BYTES,
+ frame->header->Unum,
+ ucfp,
+ ifp)!=UV_UNIT_BYTES*frame->header->Unum){
return -2;
}
}
if(frame->header->Vnum>0){
- if(ReadZF(frame->VData,
- UV_UNIT_BYTES,
- frame->header->Vnum,
- ucfp,
- ifp)!=UV_UNIT_BYTES*frame->header->Vnum){
+ if(rmdReadZF(frame->VData,
+ UV_UNIT_BYTES,
+ frame->header->Vnum,
+ ucfp,
+ ifp)!=UV_UNIT_BYTES*frame->header->Vnum){
return -2;
}
}
return 0;
}
-void *LoadCache(ProgData *pdata){
+void *rmdLoadCache(ProgData *pdata){
yuv_buffer *yuv=&pdata->enc_data->yuv;
gzFile *ifp=NULL;
@@ -223,7 +223,7 @@ void *LoadCache(ProgData *pdata){
if(missing_frames>0){
extra_frames++;
missing_frames--;
- SyncEncodeImageBuffer(pdata);
+ rmdSyncEncodeImageBuffer(pdata);
}
else if(((!pdata->args.zerocompression)&&
(gzread(ifp,frame.header,sizeof(FrameHeader))==
@@ -245,40 +245,40 @@ void *LoadCache(ProgData *pdata){
if( (frame.header->Ynum<=blocknum_x*blocknum_y) &&
(frame.header->Unum<=blocknum_x*blocknum_y) &&
(frame.header->Vnum<=blocknum_x*blocknum_y) &&
- (!ReadFrame(&frame,
- ((pdata->args.zerocompression)?ucfp:NULL),
- ((pdata->args.zerocompression)?NULL:ifp)))
+ (!rmdReadFrame(&frame,
+ ((pdata->args.zerocompression)?ucfp:NULL),
+ ((pdata->args.zerocompression)?NULL:ifp)))
){
//load the blocks for each buffer
if(frame.header->Ynum)
for(j=0;j<frame.header->Ynum;j++)
- LoadBlock( yuv->y,
- &frame.YData[j*blockszy],
- frame.YBlocks[j],
- yuv->y_width,
- yuv->y_height,
- Y_UNIT_WIDTH);
+ rmdLoadBlock(yuv->y,
+ &frame.YData[j*blockszy],
+ frame.YBlocks[j],
+ yuv->y_width,
+ yuv->y_height,
+ Y_UNIT_WIDTH);
if(frame.header->Unum)
for(j=0;j<frame.header->Unum;j++)
- LoadBlock( yuv->u,
- &frame.UData[j*blockszuv],
- frame.UBlocks[j],
- yuv->uv_width,
- yuv->uv_height,
- UV_UNIT_WIDTH);
+ rmdLoadBlock(yuv->u,
+ &frame.UData[j*blockszuv],
+ frame.UBlocks[j],
+ yuv->uv_width,
+ yuv->uv_height,
+ UV_UNIT_WIDTH);
if(frame.header->Vnum)
for(j=0;j<frame.header->Vnum;j++)
- LoadBlock( yuv->v,
- &frame.VData[j*blockszuv],
- frame.VBlocks[j],
- yuv->uv_width,
- yuv->uv_height,
- UV_UNIT_WIDTH);
+ rmdLoadBlock(yuv->v,
+ &frame.VData[j*blockszuv],
+ frame.VBlocks[j],
+ yuv->uv_width,
+ yuv->uv_height,
+ UV_UNIT_WIDTH);
//encode. This is not made in a thread since
//now blocking is not a problem
//and this way sync problems
//can be avoided more easily.
- SyncEncodeImageBuffer(pdata);
+ rmdSyncEncodeImageBuffer(pdata);
}
else{
raise(SIGINT);
@@ -286,10 +286,10 @@ void *LoadCache(ProgData *pdata){
}
}
else{
- if(SwapCacheFilesRead(pdata->cache_data->imgdata,
- nth_cache,
- &ifp,
- &ucfp)){
+ if(rmdSwapCacheFilesRead(pdata->cache_data->imgdata,
+ nth_cache,
+ &ifp,
+ &ucfp)){
raise(SIGINT);
}
else{
@@ -307,7 +307,7 @@ void *LoadCache(ProgData *pdata){
if(nbytes<=0)
audio_end=1;
else
- SyncEncodeSoundBuffer(pdata,sound_data);
+ rmdSyncEncodeSoundBuffer(pdata,sound_data);
}
}
}
diff --git a/recordmydesktop/src/rmd_load_cache.h b/recordmydesktop/src/rmd_load_cache.h
index 055c720..917f31f 100644
--- a/recordmydesktop/src/rmd_load_cache.h
+++ b/recordmydesktop/src/rmd_load_cache.h
@@ -36,7 +36,7 @@
* \param pdata ProgData struct containing all program data
*
*/
-void *LoadCache(ProgData *pdata);
+void *rmdLoadCache(ProgData *pdata);
#endif
diff --git a/recordmydesktop/src/rmd_make_dummy_pointer.c b/recordmydesktop/src/rmd_make_dummy_pointer.c
index 527fe43..d86c7e5 100644
--- a/recordmydesktop/src/rmd_make_dummy_pointer.c
+++ b/recordmydesktop/src/rmd_make_dummy_pointer.c
@@ -33,12 +33,12 @@
#include <X11/Xlib.h>
-unsigned char *MakeDummyPointer(Display *display,
- DisplaySpecs *specs,
- int size,
- int color,
- int type,
- unsigned char *npxl){
+unsigned char *rmdMakeDummyPointer(Display *display,
+ DisplaySpecs *specs,
+ int size,
+ int color,
+ int type,
+ unsigned char *npxl){
unsigned long bpixel = XBlackPixel(display, specs->screen);
unsigned long wpixel = XWhitePixel(display, specs->screen);
int i,k,o='.';
diff --git a/recordmydesktop/src/rmd_make_dummy_pointer.h b/recordmydesktop/src/rmd_make_dummy_pointer.h
index cd7a9a0..3eccd42 100644
--- a/recordmydesktop/src/rmd_make_dummy_pointer.h
+++ b/recordmydesktop/src/rmd_make_dummy_pointer.h
@@ -48,12 +48,12 @@
*
* \returns Pointer to pixel data of the cursor
*/
-unsigned char *MakeDummyPointer(Display *display,
- DisplaySpecs *specs,
- int size,
- int color,
- int type,
- unsigned char *npxl);
+unsigned char *rmdMakeDummyPointer(Display *display,
+ DisplaySpecs *specs,
+ int size,
+ int color,
+ int type,
+ unsigned char *npxl);
#endif
diff --git a/recordmydesktop/src/rmd_opendev.c b/recordmydesktop/src/rmd_opendev.c
index 65d3dac..51783c7 100644
--- a/recordmydesktop/src/rmd_opendev.c
+++ b/recordmydesktop/src/rmd_opendev.c
@@ -42,13 +42,13 @@
#ifdef HAVE_LIBASOUND
-snd_pcm_t *OpenDev( const char *pcm_dev,
- unsigned int *channels,
- unsigned int *frequency,
- snd_pcm_uframes_t *buffsize,
- snd_pcm_uframes_t *periodsize,
- unsigned int *periodtime,
- int *hard_pause){
+snd_pcm_t *rmdOpenDev(const char *pcm_dev,
+ unsigned int *channels,
+ unsigned int *frequency,
+ snd_pcm_uframes_t *buffsize,
+ snd_pcm_uframes_t *periodsize,
+ unsigned int *periodtime,
+ int *hard_pause){
snd_pcm_t *mhandle;
snd_pcm_hw_params_t *hwparams;
@@ -129,9 +129,9 @@ snd_pcm_t *OpenDev( const char *pcm_dev,
#else
-int OpenDev( const char *pcm_dev,
- unsigned int channels,
- unsigned int frequency){
+int rmdOpenDev(const char *pcm_dev,
+ unsigned int channels,
+ unsigned int frequency){
int fd ;
fd=open(pcm_dev,O_RDONLY);
diff --git a/recordmydesktop/src/rmd_opendev.h b/recordmydesktop/src/rmd_opendev.h
index c782a02..06dfc64 100644
--- a/recordmydesktop/src/rmd_opendev.h
+++ b/recordmydesktop/src/rmd_opendev.h
@@ -54,13 +54,13 @@
*
* \returns snd_pcm_t handle on success, NULL on failure
*/
-snd_pcm_t *OpenDev( const char *pcm_dev,
- unsigned int *channels,
- unsigned int *frequency,
- snd_pcm_uframes_t *buffsize,
- snd_pcm_uframes_t *periodsize,
- unsigned int *periodtime,
- int *hardpause);
+snd_pcm_t *rmdOpenDev(const char *pcm_dev,
+ unsigned int *channels,
+ unsigned int *frequency,
+ snd_pcm_uframes_t *buffsize,
+ snd_pcm_uframes_t *periodsize,
+ unsigned int *periodtime,
+ int *hardpause);
#else
/**
* Try to open (OSS) sound device, with the desired parameters.
@@ -75,9 +75,9 @@ snd_pcm_t *OpenDev( const char *pcm_dev,
*
* \returns file descriptor of open device,-1 on failure
*/
-int OpenDev( const char *pcm_dev,
- unsigned int channels,
- unsigned int frequency);
+int rmdOpenDev(const char *pcm_dev,
+ unsigned int channels,
+ unsigned int frequency);
#endif
diff --git a/recordmydesktop/src/rmd_parseargs.c b/recordmydesktop/src/rmd_parseargs.c
index 12cf0ea..a2b110c 100644
--- a/recordmydesktop/src/rmd_parseargs.c
+++ b/recordmydesktop/src/rmd_parseargs.c
@@ -46,7 +46,7 @@
#define RMD_LIBASOUND_STATUS "OSS"
#endif
-static void PrintConfig(void) {
+static void rmdPrintConfig(void) {
fprintf(stderr,
"\n"
"recordMyDesktop was compiled with the following options:\n"
@@ -57,7 +57,7 @@ static void PrintConfig(void) {
"\n");
}
-boolean ParseArgs(int argc, char **argv, ProgArgs *arg_return) {
+boolean rmdParseArgs(int argc, char **argv, ProgArgs *arg_return) {
int i;
char *usage =
"\n"
@@ -553,7 +553,7 @@ boolean ParseArgs(int argc, char **argv, ProgArgs *arg_return) {
exit(0);
}
else if(!strcmp(argv[i],"--print-config")){
- PrintConfig();
+ rmdPrintConfig();
exit(0);
}
else{
diff --git a/recordmydesktop/src/rmd_parseargs.h b/recordmydesktop/src/rmd_parseargs.h
index 02c3966..42f2bac 100644
--- a/recordmydesktop/src/rmd_parseargs.h
+++ b/recordmydesktop/src/rmd_parseargs.h
@@ -41,7 +41,7 @@
*
* \returns 0 on Success 1 on Failure
*/
-boolean ParseArgs(int argc, char **argv, ProgArgs *arg_return);
+boolean rmdParseArgs(int argc, char **argv, ProgArgs *arg_return);
#endif
diff --git a/recordmydesktop/src/rmd_poll_events.c b/recordmydesktop/src/rmd_poll_events.c
index 4ba33b6..db56219 100644
--- a/recordmydesktop/src/rmd_poll_events.c
+++ b/recordmydesktop/src/rmd_poll_events.c
@@ -82,7 +82,7 @@
}
-void InitEventsPolling(ProgData *pdata){
+void rmdInitEventsPolling(ProgData *pdata){
Window root_return,
parent_return,
*children;
@@ -122,7 +122,7 @@ void InitEventsPolling(ProgData *pdata){
}
-void EventLoop(ProgData *pdata){
+void rmdEventLoop(ProgData *pdata){
int inserts=0;
XEvent event;
@@ -195,7 +195,7 @@ void EventLoop(ProgData *pdata){
if((xrect.x>=0)&&(xrect.y>=0)&&
(xrect.width>0)&&(xrect.height>0)){
- inserts+=RectInsert(&pdata->rect_root,&xrect);
+ inserts+=rmdRectInsert(&pdata->rect_root,&xrect);
}
}
diff --git a/recordmydesktop/src/rmd_poll_events.h b/recordmydesktop/src/rmd_poll_events.h
index b0418b9..a1902cb 100644
--- a/recordmydesktop/src/rmd_poll_events.h
+++ b/recordmydesktop/src/rmd_poll_events.h
@@ -32,10 +32,10 @@
/**
* Start listening to damage and substructure notify events
-* (needed before EventLoop call)
+* (needed before rmdEventLoop call)
* \param pdata ProgData struct containing all program data
*/
-void InitEventsPolling(ProgData *pdata);
+void rmdInitEventsPolling(ProgData *pdata);
/**
* Loop calling XNextEvent.Retrieve and place on
@@ -43,7 +43,7 @@ void InitEventsPolling(ProgData *pdata);
* and pickup key events for shortcuts.
* \param pdata ProgData struct containing all program data
*/
-void EventLoop(ProgData *pdata);
+void rmdEventLoop(ProgData *pdata);
#endif
diff --git a/recordmydesktop/src/rmd_queryextensions.c b/recordmydesktop/src/rmd_queryextensions.c
index 3a196d4..0995844 100644
--- a/recordmydesktop/src/rmd_queryextensions.c
+++ b/recordmydesktop/src/rmd_queryextensions.c
@@ -35,11 +35,11 @@
-void QueryExtensions(Display *dpy,
- ProgArgs *args,
- int *damage_event,
- int *damage_error,
- int *shm_opcode){
+void rmdQueryExtensions(Display *dpy,
+ ProgArgs *args,
+ int *damage_event,
+ int *damage_error,
+ int *shm_opcode){
int xf_event_basep,
xf_error_basep,
shm_event_base,
diff --git a/recordmydesktop/src/rmd_queryextensions.h b/recordmydesktop/src/rmd_queryextensions.h
index 578bd73..432fa6c 100644
--- a/recordmydesktop/src/rmd_queryextensions.h
+++ b/recordmydesktop/src/rmd_queryextensions.h
@@ -43,11 +43,11 @@
*
* \note Can be an exit point if extensions are not found
*/
-void QueryExtensions(Display *dpy,
- ProgArgs *args,
- int *damage_event,
- int *damage_error,
- int *shm_opcode);
+void rmdQueryExtensions(Display *dpy,
+ ProgArgs *args,
+ int *damage_event,
+ int *damage_error,
+ int *shm_opcode);
#endif
diff --git a/recordmydesktop/src/rmd_rectinsert.c b/recordmydesktop/src/rmd_rectinsert.c
index 8b9ea95..33addea 100644
--- a/recordmydesktop/src/rmd_rectinsert.c
+++ b/recordmydesktop/src/rmd_rectinsert.c
@@ -56,10 +56,10 @@
* \retval -10 Grouping the two rects is possible
*
*/
-static int CollideRects(XRectangle *xrect1,
- XRectangle *xrect2,
- XRectangle xrect_return[],
- int *nrects) {
+static int rmdCollideRects(XRectangle *xrect1,
+ XRectangle *xrect2,
+ XRectangle xrect_return[],
+ int *nrects) {
//1 fits in 2
if((xrect1->x>=xrect2->x)&&
(xrect1->x+xrect1->width<=xrect2->x+xrect2->width)&&
@@ -89,7 +89,7 @@ static int CollideRects(XRectangle *xrect1,
//this happens because libxdamage may generate many events for one change
//and some of them may be in the the exact same region
//so identical rects would be considered not colliding
-//in order though to avoid endless recursion on the RectInsert
+//in order though to avoid endless recursion on the rmdRectInsert
//function should always start at the next element(which is logical since
//if any rect makes it to a points none of it's part collides with previous
//nodes on the list, too)
@@ -293,7 +293,7 @@ static int CollideRects(XRectangle *xrect1,
}
}
-int RectInsert(RectArea **root,XRectangle *xrect){
+int rmdRectInsert(RectArea **root,XRectangle *xrect){
int total_insertions=0;
RectArea *temp=NULL,*newnode=(RectArea *)malloc(sizeof(RectArea));
@@ -323,7 +323,7 @@ int RectInsert(RectArea **root,XRectangle *xrect){
temp=*root;
while(insert_ok){ //if something is broken list does not procceed
//(except on -1 collres case)
- int collres = CollideRects(&temp->rect, xrect, &xrect_return[0], &nrects);
+ int collres = rmdCollideRects(&temp->rect, xrect, &xrect_return[0], &nrects);
if((!collres))
insert_ok=1;
else{
@@ -348,7 +348,7 @@ int RectInsert(RectArea **root,XRectangle *xrect){
temp->next->prev=temp->prev;
free(temp);
if((xrect->width>0)&&(xrect->height>0))
- total_insertions+=RectInsert(&temp1,xrect);
+ total_insertions+=rmdRectInsert(&temp1,xrect);
}
else{
temp->prev->next=newnode;
@@ -362,7 +362,7 @@ int RectInsert(RectArea **root,XRectangle *xrect){
(*root)=(*root)->next;
(*root)->prev=NULL;
if((xrect->width>0)&&(xrect->height>0))
- total_insertions+=RectInsert(root,xrect);
+ total_insertions+=rmdRectInsert(root,xrect);
}
else if((xrect->width>0)&&(xrect->height>0)){
*root=newnode;
@@ -413,8 +413,8 @@ int RectInsert(RectArea **root,XRectangle *xrect){
total_insertions--;
temp->next->prev=temp->prev;
temp->prev->next=temp->next;
- total_insertions+=RectInsert(&temp->next,
- xrect);
+ total_insertions+=rmdRectInsert(&temp->next,
+ xrect);
}
free(temp);
}
@@ -446,7 +446,7 @@ int RectInsert(RectArea **root,XRectangle *xrect){
if(xrect_return[i].width > 0 &&
xrect_return[i].height > 0)
total_insertions+=
- RectInsert(&temp->next, &xrect_return[i]);
+ rmdRectInsert(&temp->next, &xrect_return[i]);
}
}
break;
@@ -469,7 +469,7 @@ int RectInsert(RectArea **root,XRectangle *xrect){
if(xrect_return[0].width > 0 &&
xrect_return[0].height > 0)
total_insertions+=
- RectInsert(root, &xrect_return[0]);
+ rmdRectInsert(root, &xrect_return[0]);
}
}
else if(temp->next==NULL){//last, enter anyway
@@ -490,7 +490,7 @@ int RectInsert(RectArea **root,XRectangle *xrect){
if(xrect_return[0].width > 0 &&
xrect_return[0].height > 0)
total_insertions+=
- RectInsert(&temp1, &xrect_return[0]);
+ rmdRectInsert(&temp1, &xrect_return[0]);
}
break;
}
@@ -514,7 +514,7 @@ int RectInsert(RectArea **root,XRectangle *xrect){
return total_insertions;
}
-void ClearList(RectArea **root){
+void rmdClearList(RectArea **root){
RectArea *temp;
temp=*root;
diff --git a/recordmydesktop/src/rmd_rectinsert.h b/recordmydesktop/src/rmd_rectinsert.h
index 9f26f7b..1f8b2c8 100644
--- a/recordmydesktop/src/rmd_rectinsert.h
+++ b/recordmydesktop/src/rmd_rectinsert.h
@@ -43,13 +43,13 @@
* \note This function is reentrant and recursive. The number
* of insertions takes this into account.
*/
-int RectInsert(RectArea **root, XRectangle *xrect);
+int rmdRectInsert(RectArea **root, XRectangle *xrect);
/**
* Clean up a list of areas marked for update.
* \param root Root entry of the list
*/
-void ClearList(RectArea **root);
+void rmdClearList(RectArea **root);
#endif
diff --git a/recordmydesktop/src/rmd_register_callbacks.c b/recordmydesktop/src/rmd_register_callbacks.c
index fa322d5..844fece 100644
--- a/recordmydesktop/src/rmd_register_callbacks.c
+++ b/recordmydesktop/src/rmd_register_callbacks.c
@@ -40,12 +40,12 @@ static int *pdata_aborted = NULL;
static int *pdata_pause_state_changed = NULL;
-static void SetPaused(int signum) {
+static void rmdSetPaused(int signum) {
*pdata_pause_state_changed = TRUE;
}
-static void SetRunning(int signum) {
+static void rmdSetRunning(int signum) {
if (!*pdata_paused) {
@@ -57,7 +57,7 @@ static void SetRunning(int signum) {
}
}
-void RegisterCallbacks(ProgData *pdata) {
+void rmdRegisterCallbacks(ProgData *pdata) {
struct sigaction pause_act;
struct sigaction end_act;
@@ -71,14 +71,14 @@ void RegisterCallbacks(ProgData *pdata) {
// Setup pause_act
sigfillset(&pause_act.sa_mask);
pause_act.sa_flags = SA_RESTART;
- pause_act.sa_handler = SetPaused;
+ pause_act.sa_handler = rmdSetPaused;
sigaction(SIGUSR1, &pause_act, NULL);
// Setup end_act
sigfillset(&end_act.sa_mask);
end_act.sa_flags = SA_RESTART;
- end_act.sa_handler = SetRunning;
+ end_act.sa_handler = rmdSetRunning;
sigaction(SIGINT, &end_act, NULL);
sigaction(SIGTERM, &end_act, NULL);
diff --git a/recordmydesktop/src/rmd_register_callbacks.h b/recordmydesktop/src/rmd_register_callbacks.h
index b1e41e2..abe8783 100644
--- a/recordmydesktop/src/rmd_register_callbacks.h
+++ b/recordmydesktop/src/rmd_register_callbacks.h
@@ -35,7 +35,7 @@
* Set up all callbacks and signal handlers
* \param pdata ProgData struct containing all program data
*/
-void RegisterCallbacks(ProgData *prog_data);
+void rmdRegisterCallbacks(ProgData *prog_data);
#endif
diff --git a/recordmydesktop/src/rmd_rescue.c b/recordmydesktop/src/rmd_rescue.c
index f8776b0..64d9c73 100644
--- a/recordmydesktop/src/rmd_rescue.c
+++ b/recordmydesktop/src/rmd_rescue.c
@@ -52,7 +52,7 @@ int rmdRescue(const char *path){
EncData enc_data;
CacheData cache_data;
- SetupDefaultArgs(&pdata.args);
+ rmdSetupDefaultArgs(&pdata.args);
pdata.enc_data=&enc_data;
pdata.cache_data=&cache_data;
@@ -75,7 +75,7 @@ int rmdRescue(const char *path){
strcat(cache_data.specsfile,"specs.txt");
- if(ReadSpecsFile(&pdata))
+ if(rmdReadSpecsFile(&pdata))
return 1;
@@ -124,14 +124,14 @@ int rmdRescue(const char *path){
pdata.running = TRUE;
pdata.aborted = FALSE;
- RegisterCallbacks(&pdata);
+ rmdRegisterCallbacks(&pdata);
fprintf(stderr,"Restoring %s!!!\n",path);
- EncodeCache(&pdata);
+ rmdEncodeCache(&pdata);
fprintf(stderr,"Done!!!\n");
fprintf(stderr,"Goodbye!\n");
- CleanUp();
+ rmdCleanUp();
return 0;
}
diff --git a/recordmydesktop/src/rmd_setbrwindow.c b/recordmydesktop/src/rmd_setbrwindow.c
index df77620..8a29b1a 100644
--- a/recordmydesktop/src/rmd_setbrwindow.c
+++ b/recordmydesktop/src/rmd_setbrwindow.c
@@ -42,7 +42,7 @@
*
* \note This is called separately for width and height.
*/
-static void SizePack2_8_16(short *start, unsigned short *size, unsigned short limit) {
+static void rmdSizePack2_8_16(short *start, unsigned short *size, unsigned short limit) {
int octoffset,hexoffset;
//align in two
@@ -123,10 +123,10 @@ static void SizePack2_8_16(short *start, unsigned short *size, unsigned short li
-boolean SetBRWindow(Display *dpy,
- BRWindow *brwin,
- DisplaySpecs *specs,
- ProgArgs *args) {
+boolean rmdSetBRWindow(Display *dpy,
+ BRWindow *brwin,
+ DisplaySpecs *specs,
+ ProgArgs *args) {
//before we start recording we have to make sure the ranges are valid
if(args->windowid==0){//root window
//first set it up
@@ -194,8 +194,8 @@ boolean SetBRWindow(Display *dpy,
"X:%d Y:%d Width:%d Height:%d\n",
brwin->rrect.x,brwin->rrect.y,
brwin->rrect.width,brwin->rrect.height);
- SizePack2_8_16(&brwin->rrect.x,&brwin->rrect.width,specs->width);
- SizePack2_8_16(&brwin->rrect.y,&brwin->rrect.height,specs->height);
+ rmdSizePack2_8_16(&brwin->rrect.x,&brwin->rrect.width,specs->width);
+ rmdSizePack2_8_16(&brwin->rrect.y,&brwin->rrect.height,specs->height);
fprintf(stderr, "Adjusted recording window is set to:\n"
"X:%d Y:%d Width:%d Height:%d\n",
diff --git a/recordmydesktop/src/rmd_setbrwindow.h b/recordmydesktop/src/rmd_setbrwindow.h
index 91894fd..e036856 100644
--- a/recordmydesktop/src/rmd_setbrwindow.h
+++ b/recordmydesktop/src/rmd_setbrwindow.h
@@ -44,10 +44,10 @@
*
* \returns 0 on Success 1 on Failure
*/
-int SetBRWindow(Display *dpy,
- BRWindow *brwin,
- DisplaySpecs *specs,
- ProgArgs *args);
+int rmdSetBRWindow(Display *dpy,
+ BRWindow *brwin,
+ DisplaySpecs *specs,
+ ProgArgs *args);
#endif
diff --git a/recordmydesktop/src/rmd_shortcuts.c b/recordmydesktop/src/rmd_shortcuts.c
index dcd39d0..1712b93 100644
--- a/recordmydesktop/src/rmd_shortcuts.c
+++ b/recordmydesktop/src/rmd_shortcuts.c
@@ -37,10 +37,10 @@
#include <stdlib.h>
#include <string.h>
-int RegisterShortcut(Display *dpy,
- Window root,
- const char *shortcut,
- HotKey *hotkey){
+int rmdRegisterShortcut(Display *dpy,
+ Window root,
+ const char *shortcut,
+ HotKey *hotkey){
int keycode=0,
i, j ;
diff --git a/recordmydesktop/src/rmd_shortcuts.h b/recordmydesktop/src/rmd_shortcuts.h
index 6b36854..a0dc2af 100644
--- a/recordmydesktop/src/rmd_shortcuts.h
+++ b/recordmydesktop/src/rmd_shortcuts.h
@@ -48,10 +48,10 @@
* \returns 0 on Success, 1 on Failure.
*
*/
-int RegisterShortcut(Display *dpy,
- Window root,
- const char *shortcut,
- HotKey *hotkey);
+int rmdRegisterShortcut(Display *dpy,
+ Window root,
+ const char *shortcut,
+ HotKey *hotkey);
#endif
diff --git a/recordmydesktop/src/rmd_specsfile.c b/recordmydesktop/src/rmd_specsfile.c
index 201a36a..1b25eeb 100644
--- a/recordmydesktop/src/rmd_specsfile.c
+++ b/recordmydesktop/src/rmd_specsfile.c
@@ -33,7 +33,7 @@
#include <stdio.h>
-int WriteSpecsFile(ProgData *pdata){
+int rmdWriteSpecsFile(ProgData *pdata){
FILE *fp;
@@ -68,7 +68,7 @@ int WriteSpecsFile(ProgData *pdata){
}
-int ReadSpecsFile(ProgData *pdata){
+int rmdReadSpecsFile(ProgData *pdata){
FILE *fp;
diff --git a/recordmydesktop/src/rmd_specsfile.h b/recordmydesktop/src/rmd_specsfile.h
index f381eaa..67cbd46 100644
--- a/recordmydesktop/src/rmd_specsfile.h
+++ b/recordmydesktop/src/rmd_specsfile.h
@@ -39,7 +39,7 @@
* \returns 0 on Success, 1 on failure
*
*/
-int WriteSpecsFile(ProgData *pdata);
+int rmdWriteSpecsFile(ProgData *pdata);
@@ -53,7 +53,7 @@ int WriteSpecsFile(ProgData *pdata);
* \returns 0 on Success, 1 on failure
*
*/
-int ReadSpecsFile(ProgData *pdata);
+int rmdReadSpecsFile(ProgData *pdata);
#endif
diff --git a/recordmydesktop/src/rmd_threads.c b/recordmydesktop/src/rmd_threads.c
index 6716fe2..320e8f4 100644
--- a/recordmydesktop/src/rmd_threads.c
+++ b/recordmydesktop/src/rmd_threads.c
@@ -63,43 +63,43 @@ void rmdThreads(ProgData *pdata){
/*start threads*/
pthread_create(&image_capture_t,
NULL,
- (void *)GetFrame,
+ (void *)rmdGetFrame,
(void *)pdata);
if(pdata->args.encOnTheFly)
pthread_create(&image_encode_t,
NULL,
- (void *)EncodeImageBuffer,
+ (void *)rmdEncodeImageBuffer,
(void *)pdata);
else
pthread_create(&image_cache_t,
NULL,
- (void *)CacheImageBuffer,
+ (void *)rmdCacheImageBuffer,
(void *)pdata);
if(!pdata->args.nosound){
if(!pdata->args.use_jack)
pthread_create(&sound_capture_t,
NULL,
- (void *)CaptureSound,
+ (void *)rmdCaptureSound,
(void *)pdata);
if(pdata->args.encOnTheFly)
pthread_create(&sound_encode_t,
NULL,
- (void *)EncodeSoundBuffer,
+ (void *)rmdEncodeSoundBuffer,
(void *)pdata);
else
pthread_create(&sound_cache_t,
NULL,
- (void *)CacheSoundBuffer,
+ (void *)rmdCacheSoundBuffer,
(void *)pdata);
}
if(pdata->args.encOnTheFly)
pthread_create(&flush_to_ogg_t,
NULL,
- (void *)FlushToOgg,
+ (void *)rmdFlushToOgg,
(void *)pdata);
- RegisterCallbacks(pdata);
+ rmdRegisterCallbacks(pdata);
pdata->timer_alive=1;
pthread_create(&timer_t,
NULL,
@@ -133,7 +133,7 @@ void rmdThreads(ProgData *pdata){
if(!pdata->args.nosound){
#ifdef HAVE_LIBJACK
if(pdata->args.use_jack)
- StopJackClient(pdata->jdata);
+ rmdStopJackClient(pdata->jdata);
#endif
if(!pdata->args.use_jack)
pthread_join(sound_capture_t,NULL);
diff --git a/recordmydesktop/src/rmd_update_image.c b/recordmydesktop/src/rmd_update_image.c
index 502b859..d2bfc39 100644
--- a/recordmydesktop/src/rmd_update_image.c
+++ b/recordmydesktop/src/rmd_update_image.c
@@ -36,17 +36,17 @@
#include <X11/extensions/XShm.h>
-void UpdateImage(Display * dpy,
- yuv_buffer *yuv,
- DisplaySpecs *specs,
- RectArea **root,
- BRWindow *brwin,
- EncData *enc,
- char *datatemp,
- int noshmem,
- XShmSegmentInfo *shminfo,
- int shm_opcode,
- int no_quick_subsample){
+void rmdUpdateImage(Display * dpy,
+ yuv_buffer *yuv,
+ DisplaySpecs *specs,
+ RectArea **root,
+ BRWindow *brwin,
+ EncData *enc,
+ char *datatemp,
+ int noshmem,
+ XShmSegmentInfo *shminfo,
+ int shm_opcode,
+ int no_quick_subsample){
RectArea *temp;
unsigned char *dtap=(unsigned char*)datatemp;
temp=*root;
@@ -54,24 +54,24 @@ void UpdateImage(Display * dpy,
if(temp!=NULL){
do{
if(noshmem){
- GetZPixmap( dpy,
- specs->root,
- datatemp,
- temp->rect.x,
- temp->rect.y,
- temp->rect.width,
- temp->rect.height);
- }
- else{
- GetZPixmapSHM(dpy,
+ rmdGetZPixmap(dpy,
specs->root,
- shminfo,
- shm_opcode,
- datatemp,temp->rect.x,
+ datatemp,
+ temp->rect.x,
temp->rect.y,
temp->rect.width,
temp->rect.height);
}
+ else{
+ rmdGetZPixmapSHM(dpy,
+ specs->root,
+ shminfo,
+ shm_opcode,
+ datatemp,temp->rect.x,
+ temp->rect.y,
+ temp->rect.width,
+ temp->rect.height);
+ }
UPDATE_YUV_BUFFER(yuv,dtap,NULL,
(temp->rect.x-brwin->rrect.x+enc->x_offset),
(temp->rect.y-brwin->rrect.y+enc->y_offset),
diff --git a/recordmydesktop/src/rmd_update_image.h b/recordmydesktop/src/rmd_update_image.h
index 5ffe8fd..e157f35 100644
--- a/recordmydesktop/src/rmd_update_image.h
+++ b/recordmydesktop/src/rmd_update_image.h
@@ -55,17 +55,17 @@
* \param no_quick_subsample Don't do quick subsampling
*
*/
-void UpdateImage(Display * dpy,
- yuv_buffer *yuv,
- DisplaySpecs *specs,
- RectArea **root,
- BRWindow *brwin,
- EncData *enc,
- char *datatemp,
- int noshmem,
- XShmSegmentInfo *shminfo,
- int shm_opcode,
- int no_quick_subsample);
+void rmdUpdateImage(Display * dpy,
+ yuv_buffer *yuv,
+ DisplaySpecs *specs,
+ RectArea **root,
+ BRWindow *brwin,
+ EncData *enc,
+ char *datatemp,
+ int noshmem,
+ XShmSegmentInfo *shminfo,
+ int shm_opcode,
+ int no_quick_subsample);
#endif
diff --git a/recordmydesktop/src/rmd_yuv_utils.c b/recordmydesktop/src/rmd_yuv_utils.c
index dbe87ae..ff5316e 100644
--- a/recordmydesktop/src/rmd_yuv_utils.c
+++ b/recordmydesktop/src/rmd_yuv_utils.c
@@ -42,7 +42,7 @@ u_int32_t *yblocks,
*ublocks,
*vblocks;
-void MakeMatrices (void) {
+void rmdMakeMatrices (void) {
int i;
diff --git a/recordmydesktop/src/rmd_yuv_utils.h b/recordmydesktop/src/rmd_yuv_utils.h
index a8960a4..d38b1b7 100644
--- a/recordmydesktop/src/rmd_yuv_utils.h
+++ b/recordmydesktop/src/rmd_yuv_utils.h
@@ -374,7 +374,7 @@ extern u_int32_t *yblocks,
/**
* Fill Yr,Yg,Yb,Ur,Ug.Ub,Vr,Vg,Vb arrays(globals) with values.
*/
-void MakeMatrices(void);
+void rmdMakeMatrices(void);
#endif
diff --git a/recordmydesktop/src/test-rectinsert.c b/recordmydesktop/src/test-rectinsert.c
index 007cfb9..71d2030 100644
--- a/recordmydesktop/src/test-rectinsert.c
+++ b/recordmydesktop/src/test-rectinsert.c
@@ -29,7 +29,7 @@
-static void SetPixel(boolean *state, int x, int y, boolean value) {
+static void rmdSetPixel(boolean *state, int x, int y, boolean value) {
int index = y * STATE_WIDTH + x;
// Guard against non-optimal implementations
@@ -40,7 +40,7 @@ static void SetPixel(boolean *state, int x, int y, boolean value) {
state[y * STATE_WIDTH + x] = value;
}
-static boolean GetPixel(boolean *state, int x, int y) {
+static boolean rmdGetPixel(boolean *state, int x, int y) {
int index = y * STATE_WIDTH + x;
// Guard against non-optimal implementations
@@ -51,34 +51,34 @@ static boolean GetPixel(boolean *state, int x, int y) {
return state[y * STATE_WIDTH + x];
}
-static void WriteGeomToState(XRectangle *rect, boolean *state) {
+static void rmdWriteGeomToState(XRectangle *rect, boolean *state) {
int x, y;
for (y = rect->y; y < rect->y + rect->height; y++) {
for (x = rect->x; x < rect->x + rect->width; x++) {
- SetPixel(state, x, y, TRUE);
+ rmdSetPixel(state, x, y, TRUE);
}
}
}
-static void ClearState(boolean *state) {
+static void rmdClearState(boolean *state) {
int x, y;
for (y = 0; y < STATE_HEIGHT; y++) {
for (x = 0; x < STATE_WIDTH; x++) {
- SetPixel(state, x, y, FALSE);
+ rmdSetPixel(state, x, y, FALSE);
}
}
}
-static void WarnIfNonOptimal(XRectangle *rect) {
+static void rmdWarnIfNonOptimal(XRectangle *rect) {
if (rect->x < 0 || rect->x >= STATE_WIDTH ||
rect->y < 0 || rect->y >= STATE_HEIGHT ||
rect->width == 0 || rect->width > STATE_WIDTH ||
rect->height == 0 || rect->height > STATE_HEIGHT)
{
- // The RectInsert() implementation is not optimal
- printf(" Non-optimal rect (and RectInsert() implementation) encountered!\n"
+ // The rmdRectInsert() implementation is not optimal
+ printf(" Non-optimal rect (and rmdRectInsert() implementation) encountered!\n"
" rect x = %d, y = %d, width = %hu, height = %hu\n",
rect->x,
rect->y,
@@ -90,24 +90,24 @@ static void WarnIfNonOptimal(XRectangle *rect) {
static void GetState(RectArea *root, boolean *state) {
RectArea *current = root;
- ClearState(state);
+ rmdClearState(state);
while (current)
{
- WarnIfNonOptimal(&current->rect);
+ rmdWarnIfNonOptimal(&current->rect);
- WriteGeomToState(&current->rect, state);
+ rmdWriteGeomToState(&current->rect, state);
current = current->next;
}
}
-static boolean StatesEqual(boolean *a, boolean *b) {
+static boolean rmdStatesEqual(boolean *a, boolean *b) {
int x, y;
for (y = 0; y < STATE_HEIGHT; y++) {
for (x = 0; x < STATE_WIDTH; x++) {
- if (GetPixel(a, x, y) != GetPixel(b, x, y)) {
+ if (rmdGetPixel(a, x, y) != rmdGetPixel(b, x, y)) {
return FALSE;
}
}
@@ -116,14 +116,14 @@ static boolean StatesEqual(boolean *a, boolean *b) {
return TRUE;
}
-static void PrintState(boolean *state) {
+static void rmdPrintState(boolean *state) {
int x, y;
for (y = 0; y < STATE_HEIGHT; y++) {
printf(" ");
for (x = 0; x < STATE_WIDTH; x++) {
- printf(GetPixel(state, x, y) ? "X" : "O");
+ printf(rmdGetPixel(state, x, y) ? "X" : "O");
printf(x != STATE_WIDTH - 1 ? "," : "");
printf((x + 1) % 5 == 0 ? " " : "");
}
@@ -134,8 +134,8 @@ static void PrintState(boolean *state) {
}
/**
- * This program tests the RectInsert() functionality by calling
- * RectInsert() with various testdata and after each call comparing
+ * This program tests the rmdRectInsert() functionality by calling
+ * rmdRectInsert() with various testdata and after each call comparing
* the current state with a predefied set of expected states.
*/
int main(int argc, char **argv) {
@@ -144,22 +144,22 @@ int main(int argc, char **argv) {
int i = 0;
int result = 0;
- printf("== Testing RectInsert() ==\n");
+ printf("== Testing rmdRectInsert() ==\n");
// Run until there we find end of tests data
while (rectinsert_test_data[i].description != NULL) {
printf("Test #%d: %s\n", i + 1, rectinsert_test_data[i].description);
- RectInsert(&root, &rectinsert_test_data[i].new_rect);
+ rmdRectInsert(&root, &rectinsert_test_data[i].new_rect);
GetState(root, current_state);
- if (!StatesEqual(current_state, rectinsert_test_data[i].expected_state)) {
+ if (!rmdStatesEqual(current_state, rectinsert_test_data[i].expected_state)) {
printf(" FAILURE!\n");
printf(" Current state:\n");
- PrintState(current_state);
+ rmdPrintState(current_state);
printf(" Expected state:\n");
- PrintState(rectinsert_test_data[i].expected_state);
+ rmdPrintState(rectinsert_test_data[i].expected_state);
// Just set to failure and keep going...
result = -1;
© All Rights Reserved