Author: duncan
Date: Sat Jun 30 11:03:18 2007
New Revision: 9736

Modified:
   branches/rel-1/freevo/src/childapp.py
   branches/rel-1/freevo/src/tv/plugins/generic_record.py
   branches/rel-1/freevo/src/tv/plugins/vbi2srt_record.py

Log:
Changes to debugging levels and messages


Modified: branches/rel-1/freevo/src/childapp.py
==============================================================================
--- branches/rel-1/freevo/src/childapp.py       (original)
+++ branches/rel-1/freevo/src/childapp.py       Sat Jun 30 11:03:18 2007
@@ -130,7 +130,7 @@
         self.child = None
         try:
             self.child = Popen(command, shell=False, stdin=PIPE, stdout=PIPE, 
stderr=PIPE)
-            _debug_('Running (%s) "%s" with pid %s prioity %s' % (\
+            _debug_('Running (%s) "%s" with pid %s priority %s' % (\
                 command_isstr and 'str' or 'list', command_str, 
self.child.pid, prio), 1)
         except OSError, e:
             _debug_('Cannot run "%s": %s' % (command_str, e), config.DERROR)

Modified: branches/rel-1/freevo/src/tv/plugins/generic_record.py
==============================================================================
--- branches/rel-1/freevo/src/tv/plugins/generic_record.py      (original)
+++ branches/rel-1/freevo/src/tv/plugins/generic_record.py      Sat Jun 30 
11:03:18 2007
@@ -82,7 +82,10 @@
                        'base_filename' : os.path.basename(rec_prog.filename),
                        'title' : rec_prog.title,
                        'sub-title' : rec_prog.sub_title,
-                       'seconds'  : rec_prog.rec_duration }
+                       'seconds'  : rec_prog.rec_duration,
+                       'start'  : rec_prog.start,
+                       'pdc-start'  : rec_prog.pdc_start,
+        }
 
         self.rec_command = config.VCR_CMD % cl_options
 
@@ -110,8 +113,9 @@
                 self.log_stdout = open(fname_out, 'a')
                 self.log_stderr = open(fname_err, 'a')
             except IOError:
+                _debug_('Cannot open "%s" and "%s" for record logging!' % \
+                    (fname_out, fname_err), config.DERROR)
                 print
-                print 'ERROR: Cannot open "%s" and "%s" for record logging!' % 
(fname_out, fname_err)
                 print 'Please set DEBUG=0 or start Freevo from a directory 
that is writeable!'
                 print
             else:
@@ -141,31 +145,32 @@
 
     def run(self):
         while 1:
-            _debug_('Record_Thread::run: mode=%s' % self.mode, config.DINFO)
+            _debug_('Record_Thread::run: mode=%s' % self.mode)
             if self.mode == 'idle':
                 self.mode_flag.wait()
                 self.mode_flag.clear()
 
             elif self.mode == 'record':
                 rc.post_event(Event('RECORD_START', arg=self.prog))
-                _debug_('Record_Thread::run: cmd=%s' % self.command, 
config.DINFO)
+                _debug_('Record_Thread::run: cmd=%s' % self.command)
 
                 self.app = RecordApp(self.command)
+                _debug_('app child pid: %s' % self.app.child.pid)
 
                 while self.mode == 'record' and self.app.isAlive():
                     self.autokill -= 0.5
                     time.sleep(0.5)
                     if self.autokill <= 0:
-                        _debug_('autokill timeout, stopping recording', 
config.DINFO)
+                        _debug_('autokill timeout, stopping recording')
                         self.mode = 'stop'
 
                 if self.app.isAlive():
-                    _debug_('Record_Thread::run: past wait()!!', config.DINFO)
+                    _debug_('Record_Thread::run: past wait!!')
                     rc.post_event(Event(OS_EVENT_KILL, (self.app.child.pid, 
15)))
                     self.app.kill()
 
                 rc.post_event(Event('RECORD_STOP', arg=self.prog))
-                _debug_('Record_Thread::run: finished recording', config.DINFO)
+                _debug_('Record_Thread::run: finished recording')
 
                 self.mode = 'idle'
             else:

Modified: branches/rel-1/freevo/src/tv/plugins/vbi2srt_record.py
==============================================================================
--- branches/rel-1/freevo/src/tv/plugins/vbi2srt_record.py      (original)
+++ branches/rel-1/freevo/src/tv/plugins/vbi2srt_record.py      Sat Jun 30 
11:03:18 2007
@@ -4,13 +4,7 @@
 # -----------------------------------------------------------------------
 # $Id$
 #
-# Author: [EMAIL PROTECTED] (Duncan Webb)
-# Notes: This module requires vbi2srt, see:
-#   http://www.linuxowl.com/vbi2srt.html
-#   Currently only ivtv cards and teletext is supported
-#   To use this plug-in add the following to local_conf.py
-#   plugin.remove('tv.generic_record')
-#   plugin_record = plugin.activate('tv.vbi2srt_record')
+# Notes:
 # Todo:
 #   Clean up the code and remove unused stuff
 # Bugs:
@@ -38,6 +32,13 @@
 #
 # -----------------------------------------------------------------------
 
+__author__ = 'Duncan Webb <[EMAIL PROTECTED]>'
+__doc__ = '''This module requires vbi2srt, see:
+http://www.linuxowl.com/vbi2srt.html
+Currently only ivtv cards and teletext is supported
+To use this plug-in add the following to local_conf.py
+plugin.remove('tv.generic_record')
+plugin_record = plugin.activate('tv.vbi2srt_record')'''
 
 import sys, string
 import random
@@ -112,6 +113,7 @@
         self.thread.mode = 'idle'
         self.thread.start()
 
+
     def Record(self, rec_prog):
         frequency = self.fc.chanSet(str(rec_prog.tunerid), False, 'record 
plugin')
 
@@ -121,6 +123,7 @@
 
         cl_options = { 'channel'  : rec_prog.tunerid,
                        'frequency' : frequency,
+                       'frequencyMHz' : float(frequency) / 1000,
                        'filename' : rec_prog.filename,
                        'base_filename' : os.path.basename(rec_prog.filename),
                        'title' : rec_prog.title,
@@ -180,7 +183,7 @@
                 print 'Please set DEBUG=0 or start Freevo from a directory 
that is writeable!'
                 print
             else:
-                _debug_('Record logging to "%s" and "%s"' % (fname_out, 
fname_err))
+                _debug_('Record logging to "%s" and "%s"' % (fname_out, 
fname_err), config.DINFO)
 
         childapp.ChildApp.__init__(self, app)
 

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to