From 9ed6f5963df909cb4710b7dac1ca27d9e6147f90 Mon Sep 17 00:00:00 2001 From: iovar Date: Sun, 10 Dec 2006 14:56:00 +0000 Subject: Many changes, mostly focusing around proper interleaving of theora and vorbis streams (which should now be correct). Also missing eos has been taken care. New condition variables have been added to signal end of encoding threads and avoid lockups, caused by the new configuration for eos. Also the main thread handles better the joins now, making sure that the encoding threads do not get stuck waiting. git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@230 f606c939-3180-4ac9-a4b8-4b8779d57d0a --- recordmydesktop/include/recordmydesktop.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'recordmydesktop/include') diff --git a/recordmydesktop/include/recordmydesktop.h b/recordmydesktop/include/recordmydesktop.h index 585a3d1..59ac109 100644 --- a/recordmydesktop/include/recordmydesktop.h +++ b/recordmydesktop/include/recordmydesktop.h @@ -255,7 +255,9 @@ typedef struct _ProgData{ frametime; pthread_mutex_t list_mutex[2],//mutexes for concurrency protection of the lists sound_buffer_mutex, - libogg_mutex,//libogg is not thread safe + libogg_mutex,//libogg is not thread safe, +// libtheora_mutex,//same for libtheora +// libvorbis_mutex,//and libvorbis. yuv_mutex;//this might not be needed since we only have //one read-only and one write-only thread //also on previous versions, y component was looped separately @@ -265,7 +267,13 @@ typedef struct _ProgData{ pause_cond,//this is blocks execution, when program is paused sound_buffer_ready,//sound encoding finished sound_data_read,//a buffer is ready for proccessing - image_buffer_ready;//image encoding finished + image_buffer_ready,//image encoding finished + theora_lib_clean,//the flush_ogg thread cannot procceed to creating last + vorbis_lib_clean;//packages until these two libs are no longer used, by other threads + int th_encoding_clean,//these indicate a wait condition on the above cond vars + v_encoding_clean; + int v_enc_thread_waiting, + th_enc_thread_waiting; snd_pcm_t *sound_handle; snd_pcm_uframes_t periodsize; }ProgData; -- cgit v1.2.1