OSDN Git Service

fix status double counting bug.
[rec10/rec10-git.git] / rec10 / trunk / src / tester.py
1 #!/usr/bin/python
2 # coding: UTF-8
3 # Rec10 TS Recording Tools
4 # Copyright (C) 2009 Yukikaze
5 #import sys
6 #import os
7 import datetime
8 import os
9 import time
10
11 import status
12 import chdb
13 import checker
14 import configreader
15 import epgdb
16 import rec10d
17 import recdb
18 from ts2x264 import ts2x264
19 import tv2avi
20 import xml2db
21 __author__ = "yukikaze"
22 __date__ = "$2009/08/01 22:25:13$"
23 path = str(os.path.dirname(os.path.abspath(__file__))) + "/"
24 recpath = "/home/ftpusr/ftp3/Recording/"
25 ftpusr = "/home/ftpusr/ftp-tmp"
26 dualtest = ftpusr + "/Encode-Test/DualAudioTest"
27 if __name__ == "__main__":
28     #d=time.time()#
29     #tspath=basepath.replace(".b25","")
30     #print checker.checkB25Decode(recpath+basepath,recpath+tspath)
31     #print configreader.getdbpath("test")
32     #epgdb.updateall_bak()
33     #import rectime data from SQLite to MySQL
34     #rec10d.rec10db.import_from_SQLite(path+"ch.db")
35     #tnow=datetime.datetime.now()
36     #bt=tnow+datetime.timedelta(seconds=20)
37     #et=bt+datetime.timedelta(seconds=20)
38     #btime=bt.strftime("%Y-%m-%d %H:%M:%S")
39     #etime=et.strftime("%Y-%m-%d %H:%M:%S")
40     #recdb.rec_reckey(recdb.REC_FINAL_RESERVE,u"ใƒ†ใ‚นใƒˆ", "hisch", btime, etime, "Sd")
41     #os.system("echo $PATH")
42     #tv2avi.dualaudio2sep(dualtest+"/testd.ts", dualtest+"/new-test/new-delay167sa.avi","167")
43     #ts2x264(dualtest + "/new-test/new-delay167sa.avi", dualtest + "/new-test/new-delay167.avi", "SX")
44     #status.setB25Decoding(2)
45     #rec10d.rec10db.new_status()
46     #status.changeBSCSRecording(1)
47     #print rec10d.rec10db.select_all_status()
48     #status.changeBSCSRecording(-1)
49     #print rec10d.rec10db.select_all_status()
50     #print str(status.getBSCSRecording())
51     #print str(status.getTERecording())
52     xml2db.xml2db("te18.xml", "te20")
53     ""