diff options
author | iovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a> | 2006-10-26 14:49:51 +0000 |
---|---|---|
committer | iovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a> | 2006-10-26 14:49:51 +0000 |
commit | 1849f72f524948dddc02e530f7bfaa108a107ef1 (patch) | |
tree | b6679a65b3e6228872db9e0e1afd84c70ee680ee /rMD-exp/src | |
parent | ef155ccbd15bdfca39b755dd8194854422f854e4 (diff) |
stub load_cache.c
git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@122 f606c939-3180-4ac9-a4b8-4b8779d57d0a
Diffstat (limited to 'rMD-exp/src')
-rw-r--r-- | rMD-exp/src/Makefile.am | 3 | ||||
-rw-r--r-- | rMD-exp/src/load_cache.c | 42 | ||||
-rw-r--r-- | rMD-exp/src/recordmydesktop.c | 43 |
3 files changed, 80 insertions, 8 deletions
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 + } /**@_______________________________________________@*/ |