Update of /cvsroot/freevo/freevo/src/tv/plugins
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11284
Modified Files:
generic_record.py
Log Message:
o add autokill to stop recording when the app can't take care of that
o try to add suffix to the filename
Index: generic_record.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/tv/plugins/generic_record.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** generic_record.py 10 Jun 2004 02:32:17 -0000 1.19
--- generic_record.py 21 Jun 2004 07:21:22 -0000 1.20
***************
*** 11,14 ****
--- 11,18 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.20 2004/06/21 07:21:22 dischi
+ # o add autokill to stop recording when the app can't take care of that
+ # o try to add suffix to the filename
+ #
# Revision 1.19 2004/06/10 02:32:17 rshortt
# Add RECORD_START/STOP events along with VCR_PRE/POST_REC commands.
***************
*** 133,140 ****
self.rec_command = config.VCR_CMD % cl_options
! self.thread.mode = 'record'
! self.thread.prog = rec_prog
! self.thread.command = self.rec_command
self.thread.mode_flag.set()
--- 137,154 ----
self.rec_command = config.VCR_CMD % cl_options
+
+ if config.VCR_CMD.find('%(filename)s') > 0:
+ ext = config.VCR_CMD[config.VCR_CMD.find('%(filename)s')+12:]
+ for bad_char in (' ', '"', '\''):
+ if ext.find(bad_char) > 0:
+ ext = ext[:ext.find(bad_char)]
+ print ext
+ if ext.startswith('.') and len(ext) < 5:
+ rec_prog.filename += ext
! self.thread.mode = 'record'
! self.thread.prog = rec_prog
! self.thread.command = self.rec_command
! self.thread.autokill = float(rec_prog.rec_duration + 10)
self.thread.mode_flag.set()
***************
*** 202,207 ****
while self.mode == 'record' and self.app.isAlive():
time.sleep(0.5)
!
if DEBUG: print('Record_Thread::run: past wait()!!')
--- 216,226 ----
while self.mode == 'record' and self.app.isAlive():
+ self.autokill -= 0.5
time.sleep(0.5)
! if self.autokill <= 0:
! if DEBUG:
! print 'autokill timeout, stopping recording'
! self.mode = 'stop'
!
if DEBUG: print('Record_Thread::run: past wait()!!')
-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog