3 # Rec10 TS Recording Tools
4 # Copyright (C) 2009-2011 Yukikaze
9 def checkB25Decode(b25filepath, decodedfilepath , csch):
11 if os.path.isfile(decodedfilepath):##tsファイルが存在している
12 dtime = time.time()-os.path.getmtime(decodedfilepath)
16 if (compareFilesize(b25filepath, decodedfilepath, 10) and minimizeCheck(decodedfilepath, 800)):
19 if (compareFilesize(b25filepath, decodedfilepath, 60) and minimizeCheck(decodedfilepath, 800)):
23 dtime = time.time()-os.path.getmtime(decodedfilepath)
27 if (compareFilesize(b25filepath, decodedfilepath, 10) and minimizeCheck(decodedfilepath, 800)):
30 if (compareFilesize(b25filepath, decodedfilepath, 60) and minimizeCheck(decodedfilepath, 800)):
32 #recdblist.printutf8("deleting b25 is " + str(ret))
34 def compareFilesize(pathbase, path, percentage):
36 return true if size of path is larger than that of pathbase.
37 percentage is int(0< <100)
39 if not os.path.exists(pathbase):
41 basesize = os.path.getsize(pathbase)
42 pathsize = os.path.getsize(path)
43 size = pathsize * 100-basesize * percentage
48 def minimizeCheck(filepath, minsize):
52 if os.path.getsize(filepath) > minsize * 1000 * 1000: