From dc5f0404a90f43b95b7b7e65b5b2563293bc037c Mon Sep 17 00:00:00 2001 From: gn64_jp Date: Tue, 31 Jan 2012 00:02:07 +0000 Subject: [PATCH 1/1] modify tune software and recording script. git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/rec10@904 4e526526-5e11-4fc0-8910-f8fd03428081 --- rec10/trunk/src/recording_earth_pt1.py | 28 ++++++++++++++-------------- rec10/trunk/src/scan_ch.py | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/rec10/trunk/src/recording_earth_pt1.py b/rec10/trunk/src/recording_earth_pt1.py index 5bb15a5..57df045 100644 --- a/rec10/trunk/src/recording_earth_pt1.py +++ b/rec10/trunk/src/recording_earth_pt1.py @@ -79,22 +79,22 @@ def record(channel,tsid,out,timelength,decode=1): adapt=getActiveAdapter(channel) my_env=recdblist.getEnv() if adapt!=None: - tunecmd=configreader.getConfDVB("DVBtune")+u" "+adapt+u" "+channel2freq(channel)+u" "+tsid - reccmd=u"/bin/cat \""+configreader.getConfDVB("DVBadapter")+adapt+u"/dvr0\" > \""+out+u"\"" - if decode==1: - reccmd=configreader.getConfPath("b25")+u" -v 0 \""+configreader.getConfDVB("DVBadapter")+adapt+u"/dvr0\" \""+out+"\"" + tunecmd=configreader.getConfDVB("DVBtune")+u" "+adapt+u" "+channel2freq(channel)+u" "+tsid+u" "+timelength+u" "+out + #reccmd=u"/bin/cat \""+configreader.getConfDVB("DVBadapter")+adapt+u"/dvr0\" > \""+out+u"\"" + #if decode==1: + # reccmd=configreader.getConfPath("b25")+u" -v 0 \""+configreader.getConfDVB("DVBadapter")+adapt+u"/dvr0\" \""+out+"\"" recdblist.addLog(out, tunecmd+"\n"+reccmd, "record(DVB)",100) - p1=subprocess.Popen([configreader.getConfDVB("DVBtune"),adapt,channel2freq(channel),tsid],env=my_env) - time.sleep(0.2) - if decode==1: - p2=subprocess.Popen([configreader.getConfPath("b25"),u"-v 0",u"\""+configreader.getConfDVB("DVBadapter")+adapt+"/dvr0\"","\""+out+"\""],preexec_fn=os.setsid,env=my_env,bufsize=-1) - else: - p2=subprocess.Popen([tmppath+u"rec.sh",configreader.getConfDVB("DVBadapter")+adapt+"/dvr0",out],preexec_fn=os.setsid,env=my_env,bufsize=-1) + p1=subprocess.Popen([configreader.getConfDVB("DVBtune"),adapt,channel2freq(channel),tsid,timelength,out],env=my_env) + #time.sleep(0.2) + #if decode==1: + # p2=subprocess.Popen([configreader.getConfPath("b25"),u"-v 0",u"\""+configreader.getConfDVB("DVBadapter")+adapt+"/dvr0\"","\""+out+"\""],preexec_fn=os.setsid,env=my_env,bufsize=-1) + #else: + # p2=subprocess.Popen([tmppath+u"rec.sh",configreader.getConfDVB("DVBadapter")+adapt+"/dvr0",out],preexec_fn=os.setsid,env=my_env,bufsize=-1) #p2=subprocess.Popen(reccmd,shell=True,preexec_fn=os.setsid,env=my_env,bufsize=-1) - time.sleep(float(timelength)) - os.killpg(p2.pid,signal.SIGKILL) - p2.wait() - os.kill(p1.pid,signal.SIGKILL) + #time.sleep(float(timelength)) + #os.killpg(p2.pid,signal.SIGKILL) + #p2.wait() + #os.kill(p1.pid,signal.SIGKILL) p1.wait() else: recdblist.printutf8ex(u"tuner busy",100,100) diff --git a/rec10/trunk/src/scan_ch.py b/rec10/trunk/src/scan_ch.py index a7d30cb..28f1b78 100644 --- a/rec10/trunk/src/scan_ch.py +++ b/rec10/trunk/src/scan_ch.py @@ -114,7 +114,7 @@ def getTsProgNum(ch,tspath): pin=tspath pout=os.path.join(tmppath,"chscan.txt") chopt="-ch" - if ch.find("CS")>-1 or ch.find("BS"): + if ch.find("CS")>-1 or ch.find("BS")>-1 : chopt="-cs" elif int(ch)>99: chopt="-bs" -- 2.11.0