- tv2avi.timetv2avi(recpath+"/"+title+".avi",chtxt,btime,etime,opt)
- if not os.access(recpath+"/"+title+".ts", os.F_OK):
- recdb.delend(title,chtxt,btime)
- recdb.misrecwrite(title,chtxt,btime,etime,opt)
- sys.exit(0)
- elif task["type"]=="b25-avi":
- title=task['title']
- opt=task['opt']
- pid=os.fork()
- """if pid>0:#親プロセスの場合
- ""
+ tv2avi.timetv2b25(recpath+"/"+title+".avi", chtxt, btime, etime, opt)
+ recdb.del_reckey(recdb.REC_TS_RECORDING, title, chtxt, btime)
+ tnow=datetime.datetime.now()
+ bt=datetime.datetime.strptime(btime,"%Y-%m-%d %H:%M:%S")
+ et=datetime.datetime.strptime(etime,"%Y-%m-%d %H:%M:%S")
+ dt=tnow-bt
+ bt=tnow+datetime.timedelta(seconds=600)
+ et=et+dt+datetime.timedelta(seconds=600)
+ btime=bt.strftime("%Y-%m-%d %H:%M:%S")
+ etime=et.strftime("%Y-%m-%d %H:%M:%S")
+ recdb.rec_reckey(recdb.REC_TS_DECODE_QUE,title,chtxt,btime,etime,opt)
+ sys.exit()
+ elif task["type"]==recdb.REC_TS_DECODE_QUE:
+ if dt<10*60:
+ if status.getB25Decoding()<2:
+ pid=os.fork()
+ if pid!=0:#親プロセスの場合
+ ""
+ else:
+ pin=recpath+"/"+title
+ recdb.del_reckey(recdb.REC_TS_DECODE_QUE,title,chtxt,btime)
+ recdb.rec_reckey(recdb.REC_TS_DECODING, title, chtxt, btime, etime, opt)
+ tv2avi.b252ts(pin, chtxt, btime, etime, opt)
+ recdb.del_reckey(recdb.REC_TS_DECODING,title,chtxt,btime)
+ if not os.access(recpath+"/"+title+".ts", os.F_OK):
+ recdb.del_reckey(recdb.REC_TS_DECODING, title, chtxt, btime)
+ recdb.rec_reckey(recdb.REC_MISS_DECODE, title, chtxt, btime, etime, opt)
+ tnow=datetime.datetime.now()
+ bt=datetime.datetime.strptime(btime,"%Y-%m-%d %H:%M:%S")
+ et=datetime.datetime.strptime(etime,"%Y-%m-%d %H:%M:%S")
+ dt=tnow-bt
+ bt=tnow+datetime.timedelta(seconds=600)
+ et=et+dt+datetime.timedelta(seconds=600)
+ btime=bt.strftime("%Y-%m-%d %H:%M:%S")
+ etime=et.strftime("%Y-%m-%d %H:%M:%S")
+ recdb.rec_reckey(recdb.REC_ENCODE_QUE, title, chtxt, btime, etime, opt)
+ print "b25check "+recpath+"/"+title+".ts.b25 "+recpath+"/"+title+".ts"
+ print checker.checkB25Decode(recpath+"/"+title+".ts.b25",recpath+"/"+title+".ts")
+ if checker.checkB25Decode(recpath+"/"+title+".ts.b25",recpath+"/"+title+".ts")==1:
+ os.remove(recpath+"/"+title+".ts.b25")
+ sys.exit()