From: <iwa...@us...> - 2003-08-10 02:41:18
|
Update of /cvsroot/quickrip/quickrip In directory sc8-pr-cvs1:/tmp/cvs-serv27190 Modified Files: base.py Log Message: Threaded rip somewhat working. Index: base.py =================================================================== RCS file: /cvsroot/quickrip/quickrip/base.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** base.py 10 Aug 2003 01:40:19 -0000 1.15 --- base.py 10 Aug 2003 02:41:15 -0000 1.16 *************** *** 307,310 **** --- 307,311 ---- title['slangs'] = slangs title['slang'] = ' ' # biggs changed to a double space + title['crop'] = "" self.titles.append(title) *************** *** 331,340 **** self.numrips = len(self.torip) - # Check PDA mode (universal to all ripping methods) - if int(self.config['pdamode']) is 1: - resolution = "320" - else: - resolution = "720" - i = 0 for title in self.torip: --- 332,335 ---- *************** *** 348,352 **** arguments = ["-dvd ", str(title['id']), "-vop", "cropdetect", "-nosound", "-vo", "null", "-frames", "10", "-sstep", str(sstep)] ! self.run('mplayer', arguments, self.preRip, None, title) # Clean up output dir in case QuickRip crashed out there # os.popen("".join(["rm ", self.config['outputdir'], "frameno.avi 2>/dev/null"])) --- 343,347 ---- arguments = ["-dvd ", str(title['id']), "-vop", "cropdetect", "-nosound", "-vo", "null", "-frames", "10", "-sstep", str(sstep)] ! self.run('mplayer', arguments, self.preRip, None, 0, title) # Clean up output dir in case QuickRip crashed out there # os.popen("".join(["rm ", self.config['outputdir'], "frameno.avi 2>/dev/null"])) *************** *** 354,361 **** def preRip(self, lines, data): re_crop = re.compile('.*-vop crop=(\d*:\d*:\d*:\d*).*') - title = data crop_options = {} common_crop = "" cc_hits = 0 for line in lines: if re_crop.search(line): --- 349,356 ---- def preRip(self, lines, data): re_crop = re.compile('.*-vop crop=(\d*:\d*:\d*:\d*).*') crop_options = {} common_crop = "" cc_hits = 0 + title = data for line in lines: if re_crop.search(line): *************** *** 368,372 **** crop_options[crop] = 1 ! data['crop'] = common_crop if self.config['videocodec'] is 2: --- 363,373 ---- crop_options[crop] = 1 ! title['crop'] = common_crop ! ! # Check PDA mode (universal to all ripping methods) ! if int(self.config['pdamode']) is 1: ! resolution = "320" ! else: ! resolution = "720" if self.config['videocodec'] is 2: *************** *** 400,404 **** else: vol = "" ! lameopts = "".join(["cbr=", str(config.abr[self.title['abr']]), str(vol)]) arguments = ["-dvd", str(title['id']), "-alang", title['alang'], "-oac", \ --- 401,405 ---- else: vol = "" ! lameopts = "".join(["cbr=", str(title['abr']), str(vol)]) arguments = ["-dvd", str(title['id']), "-alang", title['alang'], "-oac", \ *************** *** 435,444 **** if int(self.config['aspectratio']) is not 0: ! arguments.insert(3, "-aspect") ! arguments.insert(4, self.aro[self.config['aspectratio']]) if title['slang']: ! arguments.insert(3, "-slang") ! arguments.insert(4, title['slang']) self.mencode(arguments, "video") --- 436,445 ---- if int(self.config['aspectratio']) is not 0: ! arguments.insert(4, "-aspect") ! arguments.insert(5, self.aro[self.config['aspectratio']]) if title['slang']: ! arguments.insert(4, "-slang") ! arguments.insert(5, title['slang']) self.mencode(arguments, "video") *************** *** 450,454 **** def mencodeProgress(self, line, data): """Run mencoder with given arguments and report progress""" - self.run('mencoder', arguments, self.mencodeReturned, self.mencodeProgress, 1, passtype) perc = 0 trem = 0 --- 451,454 ---- |