summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rMD-exp/include/recordmydesktop.h1
-rw-r--r--rMD-exp/src/Makefile.am3
-rw-r--r--rMD-exp/src/load_cache.c42
-rw-r--r--rMD-exp/src/recordmydesktop.c43
4 files changed, 81 insertions, 8 deletions
diff --git a/rMD-exp/include/recordmydesktop.h b/rMD-exp/include/recordmydesktop.h
index 9c55caf..e0eb0d9 100644
--- a/rMD-exp/include/recordmydesktop.h
+++ b/rMD-exp/include/recordmydesktop.h
@@ -590,5 +590,6 @@ void SizePack2_8_16(int *start,int *size,int limit);
void *CacheImageBuffer(void *pdata);
void InitCacheData(ProgData *pdata,EncData *enc_data_t,CacheData *cache_data_t);
void *CacheSoundBuffer(void *pdata);
+void *LoadCache(void *pdata);
#endif
diff --git a/rMD-exp/src/Makefile.am b/rMD-exp/src/Makefile.am
index 66b8706..7bc3e1b 100644
--- a/rMD-exp/src/Makefile.am
+++ b/rMD-exp/src/Makefile.am
@@ -22,7 +22,8 @@ recordmydesktop_SOURCES= recordmydesktop.c\
init_encoder.c\
cache_frame.c\
cache_audio.c\
- rmd_cache.c
+ rmd_cache.c\
+ load_cache.c
INCLUDES= $(all_includes) -I../include -I$x_includes
diff --git a/rMD-exp/src/load_cache.c b/rMD-exp/src/load_cache.c
new file mode 100644
index 0000000..dbe6057
--- /dev/null
+++ b/rMD-exp/src/load_cache.c
@@ -0,0 +1,42 @@
+/*********************************************************************************
+* recordMyDesktop *
+**********************************************************************************
+* *
+* Copyright (C) 2006 John Varouhakis *
+* *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the Free Software *
+* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+* *
+* *
+* *
+* For further information contact me at johnvarouhakis@gmail.com *
+**********************************************************************************/
+
+
+#include <recordmydesktop.h>
+
+
+void *LoadCache(void *pdata){
+
+
+
+
+
+
+
+
+ pthread_exit(&errno);
+}
+
diff --git a/rMD-exp/src/recordmydesktop.c b/rMD-exp/src/recordmydesktop.c
index 24037ce..9d05bf0 100644
--- a/rMD-exp/src/recordmydesktop.c
+++ b/rMD-exp/src/recordmydesktop.c
@@ -59,7 +59,8 @@ int main(int argc,char **argv){
sound_capture_t,
sound_encode_t,
sound_cache_t,
- flush_to_ogg_t;
+ flush_to_ogg_t,
+ load_cache_t;
XShmSegmentInfo shminfo;
int i;
@@ -265,13 +266,41 @@ int main(int argc,char **argv){
/** Encoding */
+ if(!pdata.args.encOnTheFly){
+ if(!Aborted){
+
+ pdata.running=1;
+ InitEncoder(&pdata,&enc_data,1);
+
+ //load encoding and flushing threads
+ pthread_create(&image_encode_t,NULL,EncodeImageBuffer,(void *)&pdata);
+ if(!pdata.args.nosound)
+ pthread_create(&sound_encode_t,NULL,EncodeSoundBuffer,(void *)&pdata);
+ pthread_create(&flush_to_ogg_t,NULL,FlushToOgg,(void *)&pdata);
+
+
+ //start loading image and audio
+ pthread_create(&load_cache_t,NULL,LoadCache,(void *)&pdata);
+
+
+ //call loading func{
+ //if avd>=0
+ //load image from cache
+ //signal buffer
+ ////if avd<0
+ //load sound from cache
+ //signal buffer
+ //}
+
+ //join and finish
+ pthread_join(load_cache_t,NULL);
+ pthread_join(image_encode_t,NULL);
+ if(!pdata.args.nosound)
+ pthread_join(sound_encode_t,NULL);
-
-
-
-
-
-
+ }
+ //clean-up data
+ }
/**@_______________________________________________@*/
© All Rights Reserved