From: yomguy Date: Tue, 23 Nov 2010 17:20:56 +0000 (+0000) Subject: fix deefuzzer kill when only lock is removed, fix buffers, reduce stop time X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=50df21adf18b26d565e4ad185b366b1869dcc68b;p=telecaster-cgi.git fix deefuzzer kill when only lock is removed, fix buffers, reduce stop time --- diff --git a/station.py b/station.py index 8dbdc3f..cffbbd6 100644 --- a/station.py +++ b/station.py @@ -228,6 +228,6 @@ class Station(Conference): def stop(self): self.rec_stop() - time.sleep(3) + time.sleep(1) self.deefuzzer_stop() self.del_lock() diff --git a/telecaster.py b/telecaster.py index b866593..dc260eb 100755 --- a/telecaster.py +++ b/telecaster.py @@ -113,18 +113,22 @@ class TeleCaster: self.logger.write_info('started') elif deefuzzer_pid and form.has_key("action") and form["action"].value == "stop": + self.logger.write_info('stopping') if os.path.exists(self.lock_file): self.conference_dict = get_conference_from_lock(self.lock_file) - s = Station(self.conf_file, self.conference_dict, self.lock_file) - s.stop() - self.logger.write_info('stopping') - time.sleep(1) - self.main() + s = Station(self.conf_file, self.conference_dict, self.lock_file) + s.stop() + time.sleep(1) + self.main() elif deefuzzer_pid == []: form.start_form(writing, casting) self.logger.write_info('stopped') + else: + os.system('kill -9 '+deefuzzer_pid[0]) + self.main() + conf_file = '/etc/telecaster/telecaster.xml' diff --git a/tools/edcast-jack/edcast.cpp b/tools/edcast-jack/edcast.cpp index 3c73053..4edd7fd 100644 --- a/tools/edcast-jack/edcast.cpp +++ b/tools/edcast-jack/edcast.cpp @@ -67,7 +67,7 @@ jack_nframes_t nframes; const size_t sample_size = sizeof(jack_default_audio_sample_t); /* Synchronization between process thread and edcast thread. */ -#define DEFAULT_RB_SIZE 16384*16 /* ringbuffer size in frames */ +#define DEFAULT_RB_SIZE 16384*4 /* ringbuffer size in frames */ jack_ringbuffer_t **rb; pthread_mutex_t edcast_thread_lock = PTHREAD_MUTEX_INITIALIZER; pthread_cond_t data_ready = PTHREAD_COND_INITIALIZER; diff --git a/tools/edcast-jack/libedcast/Makefile b/tools/edcast-jack/libedcast/Makefile index 7c2b845..855fde4 100644 --- a/tools/edcast-jack/libedcast/Makefile +++ b/tools/edcast-jack/libedcast/Makefile @@ -87,12 +87,12 @@ HEADERS = $(include_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = ${SHELL} /home/momo/dev/telecaster/telecaster/tools/edcast-jack/missing --run aclocal-1.10 -AMTAR = ${SHELL} /home/momo/dev/telecaster/telecaster/tools/edcast-jack/missing --run tar +ACLOCAL = ${SHELL} /home/telecaster/apps/telecaster/tools/edcast-jack/missing --run aclocal-1.10 +AMTAR = ${SHELL} /home/telecaster/apps/telecaster/tools/edcast-jack/missing --run tar AR = ar -AUTOCONF = ${SHELL} /home/momo/dev/telecaster/telecaster/tools/edcast-jack/missing --run autoconf -AUTOHEADER = ${SHELL} /home/momo/dev/telecaster/telecaster/tools/edcast-jack/missing --run autoheader -AUTOMAKE = ${SHELL} /home/momo/dev/telecaster/telecaster/tools/edcast-jack/missing --run automake-1.10 +AUTOCONF = ${SHELL} /home/telecaster/apps/telecaster/tools/edcast-jack/missing --run autoconf +AUTOHEADER = ${SHELL} /home/telecaster/apps/telecaster/tools/edcast-jack/missing --run autoheader +AUTOMAKE = ${SHELL} /home/telecaster/apps/telecaster/tools/edcast-jack/missing --run automake-1.10 AWK = gawk CC = gcc CCDEPMODE = depmode=gcc3 @@ -136,7 +136,7 @@ LN_S = ln -s LTLIBOBJS = MAD_CFLAGS = MAD_LIBS = -lmad -MAKEINFO = ${SHELL} /home/momo/dev/telecaster/telecaster/tools/edcast-jack/missing --run makeinfo +MAKEINFO = ${SHELL} /home/telecaster/apps/telecaster/tools/edcast-jack/missing --run makeinfo MKDIR_P = /bin/mkdir -p OBJEXT = o OGG_CFLAGS = @@ -161,10 +161,10 @@ VORBIS_CFLAGS = VORBIS_LDFLAGS = VORBIS_LIBS = -lvorbis VORBIS_PREFIX = -abs_builddir = /home/momo/dev/telecaster/telecaster/tools/edcast-jack/libedcast -abs_srcdir = /home/momo/dev/telecaster/telecaster/tools/edcast-jack/libedcast -abs_top_builddir = /home/momo/dev/telecaster/telecaster/tools/edcast-jack -abs_top_srcdir = /home/momo/dev/telecaster/telecaster/tools/edcast-jack +abs_builddir = /home/telecaster/apps/telecaster/tools/edcast-jack/libedcast +abs_srcdir = /home/telecaster/apps/telecaster/tools/edcast-jack/libedcast +abs_top_builddir = /home/telecaster/apps/telecaster/tools/edcast-jack +abs_top_srcdir = /home/telecaster/apps/telecaster/tools/edcast-jack ac_ct_CC = gcc ac_ct_CXX = g++ ac_ct_F77 = @@ -193,7 +193,7 @@ host_vendor = unknown htmldir = ${docdir} includedir = ${prefix}/include infodir = ${datarootdir}/info -install_sh = $(SHELL) /home/momo/dev/telecaster/telecaster/tools/edcast-jack/install-sh +install_sh = $(SHELL) /home/telecaster/apps/telecaster/tools/edcast-jack/install-sh libdir = ${exec_prefix}/lib libexecdir = ${exec_prefix}/libexec localedir = ${datarootdir}/locale