OSDN Git Service

fix auto suggest.
authorgn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Sat, 16 Jan 2010 06:57:53 +0000 (06:57 +0000)
committergn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Sat, 16 Jan 2010 06:57:53 +0000 (06:57 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/rec10@403 4e526526-5e11-4fc0-8910-f8fd03428081

rec10/trunk/src/auto_process.py
rec10/trunk/src/dbMySQL.py
rec10/trunk/src/ts2x264.py

index 88a584b..8d911a6 100644 (file)
@@ -67,11 +67,13 @@ def auto_check(path):
             file = os.path.split(fn)[1]
             title = os.path.splitext(file)[0]
             title = unicode(title,'utf-8')
-            dbs=rec10d.rec10db.select_by_name_time_timeline(self,title,tbtime,tbtime2)
+            
+            #print dbs
+            ext = os.path.splitext(file)[1]
+            if ext == ".b25":
+                title=title.replace(".ts","")
+            dbs=rec10d.rec10db.select_by_name_time_timeline(title,tbtime,tbtime2)
             if len(dbs)==0:
-                ext = os.path.splitext(file)[1]
-                if ext == ".b25":
-                    title=title.replace(".ts","")
                 proc=check_process(dir, title)
                 chtxtt=rec10d.rec10db.select_chtxt_by_title_timeline_log(title)
                 nchtxt=""
@@ -89,13 +91,12 @@ def auto_check(path):
                     add.append([recdblist.REC_AUTO_SUGGEST_AVI2FP,title,nchtxt])
                 #elif proc =="mp4":
                 #    add.append([recdblist.REC_AUTO_SUGGEST_AP2FP,title,nchtxt])
+    #print add
     if len(add)>0:
-        rec10d.rec10db.new_auto_proc_tmp()
+        rec10d.rec10db.new_auto_proc()
         for a in add:
-            rec10d.rec10db.add_auto_proc_tmp(a[0],a[1],a[2])
+            rec10d.rec10db.add_auto_proc(a[0],a[1],a[2])
         time.sleep(1)
-        rec10d.rec10db.new_auto_proc()
-        rec10d.rec10db.update_auto_proc()
 """
     処理がどの段階まで言ったのかを調査し返す。
     return
@@ -129,6 +130,8 @@ def check_process(path,title):
     elif os.path.exists(os.path.join(path,title+".ts.log")):
         if int(time.time()-os.path.getmtime(os.path.join(path,title+".ts")))<300:
             return "encoding"
+        else:
+            return "ts"
     elif os.path.exists(os.path.join(path,title+".ts")):
         if int(time.time()-os.path.getmtime(os.path.join(path,title+".ts")))>300:
             return "ts"
index 0bbb69d..5c4e7c3 100644 (file)
@@ -298,6 +298,14 @@ class DB_MySQL:
         except:
             ""
         self.close_db(db)
+    def add_auto_proc(self,type,title,chtxt):
+        db = self.connect_db()
+        db[1].execute('\
+        INSERT IGNORE into auto_proc \
+        (type,title,chtxt) \
+        values (%s,%s,%s)',(type,title,chtxt))
+        ##db.commit()
+        self.close_db(db)
     def drop_in_settings(self):
         db = self.connect_db()
         try:
index f369e6b..77ae4c4 100644 (file)
@@ -54,8 +54,8 @@ def encode(pin,pout,size,isvfr,is2pass,is24fps):
         encvf="-vf pullup,softskip"
         harddup=",pp=ac,pp=l5,unsharp=l3x3:0.75:c3x3:0.75,hqdn3d=2:1:2,harddup"
         bm=1
-        x264enc1=":me=hex:bframes=3:cqm=jvt"
-        x264enc2=":frameref=3:subme=8:subq=7:mixed_refs:partitions=all:8x8dct:direct_pred=auto:me=umh:bframes=3:weight_b:cqm=jvt"
+        x264enc1=":me=hex:bframes=3"
+        x264enc2=":frameref=6:subme=8:subq=7:trellis=2:aq-strength=0.6:deblock=1,1:psy-rd=0.4:partitions=all:8x8dct:direct_pred=auto:me=umh:bframes=3"
     if isvfr==1:
         ofps="-ofps 60000/1001"
         fps="-fps 60000/1001"