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/recordmydesktop.c | |
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/recordmydesktop.c')
-rw-r--r-- | rMD-exp/src/recordmydesktop.c | 43 |
1 files changed, 36 insertions, 7 deletions
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 + } /**@_______________________________________________@*/ |