From: <iwa...@us...> - 2003-08-10 01:40:22
|
Update of /cvsroot/quickrip/quickrip In directory sc8-pr-cvs1:/tmp/cvs-serv20834 Modified Files: base.py Log Message: Some of toms changes merged Index: base.py =================================================================== RCS file: /cvsroot/quickrip/quickrip/base.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** base.py 10 Aug 2003 01:22:03 -0000 1.14 --- base.py 10 Aug 2003 01:40:19 -0000 1.15 *************** *** 20,25 **** class CommandThread(threading.Thread): """Handle threading of external commands""" ! def __init__(self, command, updatefunc, finalfunc, flushbuffer, data, lock): threading.Thread.__init__(self) self.updateFunc = updatefunc self.finalFunc = finalfunc --- 20,26 ---- class CommandThread(threading.Thread): """Handle threading of external commands""" ! def __init__(self, parent, command, updatefunc, finalfunc, flushbuffer, data, lock): threading.Thread.__init__(self) + self.parent = parent self.updateFunc = updatefunc self.finalFunc = finalfunc *************** *** 30,34 **** def run(self): - # self.lock = thread.allocate_lock() self.lock.acquire() self.pipe = popen2.Popen4(self.command) --- 31,34 ---- *************** *** 191,195 **** command[:0] = [self.config[program]] ! self.thread = CommandThread(command, updatefunc, finalfunc, flushbuffer, data, self.lock) self.thread.start() --- 191,195 ---- command[:0] = [self.config[program]] ! self.thread = CommandThread(self, command, updatefunc, finalfunc, flushbuffer, data, self.lock) self.thread.start() *************** *** 208,212 **** """Scan the DVD and build up a data structure for the titles""" self.ui_startScanning() ! self.lock = thread.allocate_lock() #threading.allocate_lock() # Reset values to default (in case user scans two different discs in same session) --- 208,212 ---- """Scan the DVD and build up a data structure for the titles""" self.ui_startScanning() ! self.lock = thread.allocate_lock() # Reset values to default (in case user scans two different discs in same session) *************** *** 218,231 **** self.re_title = re.compile('There are (\d*) titles on this DVD') self.re_error = re.compile('libdvdread: Could not open device') ! self.run('mplayer', arguments, self.total_DVDInfo) #self.up_DVDInfo) ! ! # def up_DVDInfo(self, line, data): ! # could do some status update here as well... ! # if self.re_error.search(line): ! # print "no titles" ! # self.ui_noTitles() ! # elif self.re_title.search(line): ! # self.numtitles = int(re_title.search(line).group(1)) ! # print "***GOT NUMTITLES***" def total_DVDInfo(self, lines, data): --- 218,222 ---- self.re_title = re.compile('There are (\d*) titles on this DVD') self.re_error = re.compile('libdvdread: Could not open device') ! self.run('mplayer', arguments, self.total_DVDInfo) def total_DVDInfo(self, lines, data): *************** *** 309,313 **** title['timelabel'] = time_label title['size'] = 680 ! title['vbr'] = max(2000, self.calcRate(int(time), 96, 680)) title['abr'] = 128 #biggs added title['rip'] = "no" --- 300,304 ---- title['timelabel'] = time_label title['size'] = 680 ! title['vbr'] = min(2000, self.calcRate(int(time), 96, 680)) title['abr'] = 128 #biggs added title['rip'] = "no" *************** *** 377,381 **** crop_options[crop] = 1 ! title['crop'] = common_crop if self.config['videocodec'] is 2: --- 368,372 ---- crop_options[crop] = 1 ! data['crop'] = common_crop if self.config['videocodec'] is 2: |