3 # Rec10 TS Recording Tools
4 # Copyright (C) 2009 Yukikaze
7 def checkB25Decode(b25filepath, decodedfilepath):
9 if os.path.isfile(decodedfilepath):##tsファイルが存在している
10 dtime = time.time()-os.path.getmtime(decodedfilepath)
13 if (compareFilesize(b25filepath, decodedfilepath, 10) and minimizeCheck(decodedfilepath, 800)):
18 if (compareFilesize(b25filepath, decodedfilepath, 10) and minimizeCheck(decodedfilepath, 800)):
20 #print "delete b25 is " + str(ret)
22 def compareFilesize(pathbase, path, percentage):
24 return true if size of path is larger than that of pathbase.
25 percentage is int(0< <100)
27 basesize = os.path.getsize(pathbase)
28 pathsize = os.path.getsize(path)
29 size = pathsize * 100-basesize * percentage
34 def minimizeCheck(filepath, minsize):
38 print os.path.getsize(filepath)
39 if os.path.getsize(filepath) > minsize * 1000 * 1000: