X-Git-Url: http://git.osdn.net/view?p=rec10%2Frec10-git.git;a=blobdiff_plain;f=rec10%2Ftrunk%2Fsrc%2Fauto_test.py;fp=rec10%2Ftrunk%2Fsrc%2Fauto_test.py;h=0000000000000000000000000000000000000000;hp=74fd961bf5735317ec9b1877ca215dc43f0fe8b1;hb=930d3dbdc17ad4179a9b512f4e787a896a544943;hpb=d63ca135202a679bd918561b65e806966f94546e diff --git a/rec10/trunk/src/auto_test.py b/rec10/trunk/src/auto_test.py deleted file mode 100644 index 74fd961..0000000 --- a/rec10/trunk/src/auto_test.py +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/python -# coding: UTF-8 -# Rec10 TS Recording Tools -# Copyright (C) 2009-2011 Yukikaze -import os -import os.path -import time -import optparse -import sys -import datetime - -import configreader -import chdb -import tv2mp4 -import tv2ts -def testAllCHEncode(option,stime): - chl=chdb.getAllCH() - print chl - path= configreader.getConfPath("test") - tpath=os.path.join(path, "encode_test") - if not os.path.exists(tpath): - os.mkdir(tpath) - dnowt=datetime.datetime.now().strftime("%Y-%m-%d_%H-%M-%S")+"_"+option+"" - tpatht=os.path.join(tpath,dnowt) - if not os.path.exists(tpatht): - os.mkdir(tpatht) - if len(chl)>0: - for t in chl: - print t - pathname=os.path.join(tpatht,t['chtxt']) - print pathname - tv2ts.tv2ts(pathname+".ts",t['ch'],t['csch'], stime,t['tsid']) - tv2mp4.ts2mp4(pathname+".ts", pathname+".mp4", option) - time.sleep(2) -if __name__ == "__main__": - usage="usage: " - version="%prog 0.9.7" - parser=optparse.OptionParser(usage=usage,version=version) - parser.add_option("-e","--Encode",action="store",type="string",dest="encode_option",default="",metavar="TITLE",help="encode test(option)") - (opts,args)=parser.parse_args(sys.argv) - if opts.encode_option != "":##-sの場合 - print "test_all_ch_encode" - testAllCHEncode(opts.encode_option, "10")