| 1 | 
=== modified file 'install/perl/digitaltvrecording.pl' | 
|---|
| 2 | 
--- install/perl/digitaltvrecording.pl  2010-06-06 15:35:27 +0000 | 
|---|
| 3 | 
+++ install/perl/digitaltvrecording.pl  2010-07-17 16:07:51 +0000 | 
|---|
| 4 | 
@@ -149,70 +149,30 @@ | 
|---|
| 5 | 
 my $oserr = 0; | 
|---|
| 6 | 
 my $originalrecch = $recch; | 
|---|
| 7 | 
 my $errorflag = 0; | 
|---|
| 8 | 
-if ($bandtype == 0){ | 
|---|
| 9 | 
-# 地デジ friio | 
|---|
| 10 | 
-}elsif($bandtype == 1){ | 
|---|
| 11 | 
-# BS/CS friio | 
|---|
| 12 | 
-               #recfriiobs用チャンネルリマップ | 
|---|
| 13 | 
-               if ($recch == 101) { | 
|---|
| 14 | 
-                       $bssplitflag = $recch; | 
|---|
| 15 | 
-                       $recch = "b10";#22 : NHK BS1/BS2  | 
|---|
| 16 | 
-               }elsif($recch == 102){ | 
|---|
| 17 | 
-                       $bssplitflag = $recch; | 
|---|
| 18 | 
-                       $recch = "b10";#22 : NHK BS1/BS2  | 
|---|
| 19 | 
-               }elsif($recch == 103){ | 
|---|
| 20 | 
-                       $recch = "b11";#23 : NHK hi   | 
|---|
| 21 | 
-               }elsif($recch == 141){ | 
|---|
| 22 | 
-                       $recch = "b8";# 20 : BS-NTV   | 
|---|
| 23 | 
-               }elsif($recch == 151){ | 
|---|
| 24 | 
-                       $recch = "b1";#13 : BS-Asahi  | 
|---|
| 25 | 
-               }elsif($recch == 161){ | 
|---|
| 26 | 
-                       $recch = "b2";#14 : BS-i   | 
|---|
| 27 | 
-               }elsif($recch == 171){ | 
|---|
| 28 | 
-                       $recch = "b4";#16 : BS-Japan  | 
|---|
| 29 | 
-               }elsif($recch == 181){ | 
|---|
| 30 | 
-                       $recch = "b9";#21 : BS-Fuji  | 
|---|
| 31 | 
-               }elsif($recch == 191){ | 
|---|
| 32 | 
-                       $recch = "b3";#15 : WOWOW  | 
|---|
| 33 | 
-               }elsif($recch == 192){ | 
|---|
| 34 | 
-                       $recch = "b3";#15 : WOWOW  | 
|---|
| 35 | 
-               }elsif($recch == 193){ | 
|---|
| 36 | 
-                       $recch = "b3";#15 : WOWOW  | 
|---|
| 37 | 
-               }elsif($recch == 211){ | 
|---|
| 38 | 
-                       $recch = "b5";#17 : BS11   | 
|---|
| 39 | 
-               }else{ | 
|---|
| 40 | 
-                       $recch = "b7";#19 : TwellV  | 
|---|
| 41 | 
-               } | 
|---|
| 42 | 
-               # b6 # Star Channel | 
|---|
| 43 | 
- | 
|---|
| 44 | 
-}elsif($bandtype == 2){ | 
|---|
| 45 | 
-# recpt1でのみ動作確認 | 
|---|
| 46 | 
-               if ($recch == 333) { | 
|---|
| 47 | 
-                       $recch = "CS16";#333ch:アニメシアターX(AT-X)  | 
|---|
| 48 | 
-               }elsif($recch == 330){ | 
|---|
| 49 | 
-                       $recch = "CS22";#330ch:キッズステーション  | 
|---|
| 50 | 
-               }elsif($recch == 332){ | 
|---|
| 51 | 
-                       $recch = "CS20";#332ch:アニマックス  | 
|---|
| 52 | 
-               }else{ | 
|---|
| 53 | 
-                       $recch = "CS16";#333ch:アニメシアターX(AT-X)  | 
|---|
| 54 | 
-               } | 
|---|
| 55 | 
- | 
|---|
| 56 | 
- | 
|---|
| 57 | 
-}else{ | 
|---|
| 58 | 
-       &writelog("digitaltvrecording :ERROR :Unsupported and type (digital CS)."); | 
|---|
| 59 | 
-       exit 3; | 
|---|
| 60 | 
-} | 
|---|
| 61 | 
  | 
|---|
| 62 | 
 # PT1 | 
|---|
| 63 | 
 # b25,recpt1があるか確認 | 
|---|
| 64 | 
        if  (-e "$toolpath/perl/tool/recpt1"){ | 
|---|
| 65 | 
-               if ($bandtype >= 1){ #BS/CSなら | 
|---|
| 66 | 
+               if ($bandtype == 2){ #CSなら | 
|---|
| 67 | 
+                               if ($recch == 333) { | 
|---|
| 68 | 
+                                       $recch = "CS16";#333ch:アニメシアターX(AT-X)  | 
|---|
| 69 | 
+                               }elsif($recch == 330){ | 
|---|
| 70 | 
+                                       $recch = "CS22";#330ch:キッズステーション  | 
|---|
| 71 | 
+                               }elsif($recch == 332){ | 
|---|
| 72 | 
+                                       $recch = "CS20";#332ch:アニマックス  | 
|---|
| 73 | 
+                               }else{ | 
|---|
| 74 | 
+                                       $recch = "CS16";#333ch:アニメシアターX(AT-X)  | 
|---|
| 75 | 
+                               } | 
|---|
| 76 | 
                #[foltia@velvia tool]$ ./recpt1 --b25 --sid 333 CS16 180 ~/php/tv/atxtest.m2t | 
|---|
| 77 | 
                &writelog("digitaltvrecording DEBUGrecpt1 --b25 --sid $originalrecch  $recch $reclengthsec $outputfile   "); | 
|---|
| 78 | 
                $oserr = system("$toolpath/perl/tool/recpt1 --b25 --sid $originalrecch  $recch $reclengthsec $outputfile  "); | 
|---|
| 79 | 
-               }else{  | 
|---|
| 80 | 
+               }elsif($bandtype == 0 || $bandtype == 1){ #地デジ or BS | 
|---|
| 81 | 
                &writelog("digitaltvrecording DEBUG recpt1 --b25  $originalrecch $reclengthsec $outputfile  "); | 
|---|
| 82 | 
                $oserr = system("$toolpath/perl/tool/recpt1 --b25  $originalrecch $reclengthsec $outputfile  "); | 
|---|
| 83 | 
+               }else{ | 
|---|
| 84 | 
+               &writelog("digitaltvrecording :ERROR :Unsupported and type (digital CS)."); | 
|---|
| 85 | 
+               exit 3; | 
|---|
| 86 | 
                } | 
|---|
| 87 | 
                $oserr = $oserr >> 8; | 
|---|
| 88 | 
                        if ($oserr > 0){ | 
|---|
| 89 | 
@@ -234,6 +194,60 @@ | 
|---|
| 90 | 
                system("chmod 775 $toolpath/perl/tool/friiodetect"); | 
|---|
| 91 | 
                &writelog("digitaltvrecording :DEBUG make lock file.$toolpath/perl/tool/friiodetect"); | 
|---|
| 92 | 
        } | 
|---|
| 93 | 
+ | 
|---|
| 94 | 
+       if ($bandtype == 0){ | 
|---|
| 95 | 
+       # 地デジ friio | 
|---|
| 96 | 
+       }elsif($bandtype == 1){ | 
|---|
| 97 | 
+       # BS/CS friio | 
|---|
| 98 | 
+                       #recfriiobs用チャンネルリマップ | 
|---|
| 99 | 
+                       if ($recch == 101) { | 
|---|
| 100 | 
+                               $bssplitflag = $recch; | 
|---|
| 101 | 
+                               $recch = "b10";#22 : NHK BS1/BS2  | 
|---|
| 102 | 
+                       }elsif($recch == 102){ | 
|---|
| 103 | 
+                               $bssplitflag = $recch; | 
|---|
| 104 | 
+                               $recch = "b10";#22 : NHK BS1/BS2  | 
|---|
| 105 | 
+                       }elsif($recch == 103){ | 
|---|
| 106 | 
+                               $recch = "b11";#23 : NHK hi   | 
|---|
| 107 | 
+                       }elsif($recch == 141){ | 
|---|
| 108 | 
+                               $recch = "b8";# 20 : BS-NTV   | 
|---|
| 109 | 
+                       }elsif($recch == 151){ | 
|---|
| 110 | 
+                               $recch = "b1";#13 : BS-Asahi  | 
|---|
| 111 | 
+                       }elsif($recch == 161){ | 
|---|
| 112 | 
+                               $recch = "b2";#14 : BS-i   | 
|---|
| 113 | 
+                       }elsif($recch == 171){ | 
|---|
| 114 | 
+                               $recch = "b4";#16 : BS-Japan  | 
|---|
| 115 | 
+                       }elsif($recch == 181){ | 
|---|
| 116 | 
+                               $recch = "b9";#21 : BS-Fuji  | 
|---|
| 117 | 
+                       }elsif($recch == 191){ | 
|---|
| 118 | 
+                               $recch = "b3";#15 : WOWOW  | 
|---|
| 119 | 
+                       }elsif($recch == 192){ | 
|---|
| 120 | 
+                               $recch = "b3";#15 : WOWOW  | 
|---|
| 121 | 
+                       }elsif($recch == 193){ | 
|---|
| 122 | 
+                               $recch = "b3";#15 : WOWOW  | 
|---|
| 123 | 
+                       }elsif($recch == 211){ | 
|---|
| 124 | 
+                               $recch = "b5";#17 : BS11   | 
|---|
| 125 | 
+                       }else{ | 
|---|
| 126 | 
+                               $recch = "b7";#19 : TwellV  | 
|---|
| 127 | 
+                       } | 
|---|
| 128 | 
+                       # b6 # Star Channel | 
|---|
| 129 | 
+ | 
|---|
| 130 | 
+       }elsif($bandtype == 2){ | 
|---|
| 131 | 
+       # recpt1でのみ動作確認 | 
|---|
| 132 | 
+                       if ($recch == 333) { | 
|---|
| 133 | 
+                               $recch = "CS16";#333ch:アニメシアターX(AT-X)  | 
|---|
| 134 | 
+                       }elsif($recch == 330){ | 
|---|
| 135 | 
+                               $recch = "CS22";#330ch:キッズステーション  | 
|---|
| 136 | 
+                       }elsif($recch == 332){ | 
|---|
| 137 | 
+                               $recch = "CS20";#332ch:アニマックス  | 
|---|
| 138 | 
+                       }else{ | 
|---|
| 139 | 
+                               $recch = "CS16";#333ch:アニメシアターX(AT-X)  | 
|---|
| 140 | 
+                       } | 
|---|
| 141 | 
+       }else{ | 
|---|
| 142 | 
+               &writelog("digitaltvrecording :ERROR :Unsupported and type (digital CS)."); | 
|---|
| 143 | 
+               exit 3; | 
|---|
| 144 | 
+       } | 
|---|
| 145 | 
+ | 
|---|
| 146 | 
+ | 
|---|
| 147 | 
                &writelog("digitaltvrecording DEBUG recfriio --b25 --lockfile $toolpath/perl/tool/friiodetect $recch $reclengthsec $outputfile  "); | 
|---|
| 148 | 
                $oserr = system("$toolpath/perl/tool/recfriio --b25 --lockfile $toolpath/perl/tool/friiodetect $recch $reclengthsec $outputfile  "); | 
|---|
| 149 | 
                $oserr = $oserr >> 8; | 
|---|
| 150 | 
@@ -241,46 +255,49 @@ | 
|---|
| 151 | 
                        &writelog("digitaltvrecording :ERROR :friio is BUSY.$oserr"); | 
|---|
| 152 | 
                        exit 2; | 
|---|
| 153 | 
                        } | 
|---|
| 154 | 
+ | 
|---|
| 155 | 
+               #BS1/BS2などのスプリットを | 
|---|
| 156 | 
+               if ($bssplitflag == 101){ | 
|---|
| 157 | 
+                       if (-e "$toolpath/perl/tool/TsSplitter.exe"){ | 
|---|
| 158 | 
+                       # BS1            | 
|---|
| 159 | 
+                       system("wine $toolpath/perl/tool/TsSplitter.exe  -EIT -ECM  -EMM  -OUT \"$outputpath\" -HD  -SD2 -SD3 -1SEG  -LOGFILE -WAIT2 $outputfile"); | 
|---|
| 160 | 
+                       $splitfile = $outputfile; | 
|---|
| 161 | 
+                       $splitfile =~ s/\.m2t$/_SD1.m2t/; | 
|---|
| 162 | 
+                               if (-e "$splitfile"){ | 
|---|
| 163 | 
+                               system("rm -rf $outputfile ; mv $splitfile $outputfile"); | 
|---|
| 164 | 
+                               &writelog("digitaltvrecording DEBUG rm -rf $outputfile ; mv $splitfile $outputfile: $?."); | 
|---|
| 165 | 
+                               }else{ | 
|---|
| 166 | 
+                               &writelog("digitaltvrecording ERROR File not found:$splitfile."); | 
|---|
| 167 | 
+                               } | 
|---|
| 168 | 
+                       }else{ | 
|---|
| 169 | 
+                       &writelog("digitaltvrecording ERROR $toolpath/perl/tool/TsSplitter.exe not found."); | 
|---|
| 170 | 
+                       } | 
|---|
| 171 | 
+               }elsif($bssplitflag == 102){ | 
|---|
| 172 | 
+                       if (-e "$toolpath/perl/tool/TsSplitter.exe"){ | 
|---|
| 173 | 
+                       # BS2            | 
|---|
| 174 | 
+                       system("wine $toolpath/perl/tool/TsSplitter.exe  -EIT -ECM  -EMM  -OUT \"$outputpath\" -HD  -SD1 -SD3 -1SEG  -LOGFILE -WAIT2 $outputfile"); | 
|---|
| 175 | 
+                       $splitfile = $outputfile; | 
|---|
| 176 | 
+                       $splitfile =~ s/\.m2t$/_SD2.m2t/; | 
|---|
| 177 | 
+                               if (-e "$splitfile"){ | 
|---|
| 178 | 
+                               system("rm -rf $outputfile ; mv $splitfile $outputfile"); | 
|---|
| 179 | 
+                               &writelog("digitaltvrecording DEBUG rm -rf $outputfile ; mv $splitfile $outputfile: $?."); | 
|---|
| 180 | 
+                               }else{ | 
|---|
| 181 | 
+                               &writelog("digitaltvrecording ERROR File not found:$splitfile."); | 
|---|
| 182 | 
+                               } | 
|---|
| 183 | 
+                       }else{ | 
|---|
| 184 | 
+                       &writelog("digitaltvrecording ERROR $toolpath/perl/tool/TsSplitter.exe not found."); | 
|---|
| 185 | 
+                       } | 
|---|
| 186 | 
+               }else{ | 
|---|
| 187 | 
+                       &writelog("digitaltvrecording DEBUG not split TS.$bssplitflag"); | 
|---|
| 188 | 
+               }# endif #BS1/BS2などのスプリットを | 
|---|
| 189 | 
+ | 
|---|
| 190 | 
+ | 
|---|
| 191 | 
        }else{ # エラー recfriioがありません | 
|---|
| 192 | 
                &writelog("digitaltvrecording :ERROR :recfriio  not found. You must install $toolpath/perl/tool/b25 and $toolpath/perl/tool/recfriio."); | 
|---|
| 193 | 
        exit 1; | 
|---|
| 194 | 
        } | 
|---|
| 195 | 
 }#end if errorflag | 
|---|
| 196 | 
  | 
|---|
| 197 | 
-#BS1/BS2などのスプリットを | 
|---|
| 198 | 
-if ($bssplitflag == 101){ | 
|---|
| 199 | 
-       if (-e "$toolpath/perl/tool/TsSplitter.exe"){ | 
|---|
| 200 | 
-       # BS1            | 
|---|
| 201 | 
-       system("wine $toolpath/perl/tool/TsSplitter.exe  -EIT -ECM  -EMM  -OUT \"$outputpath\" -HD  -SD2 -SD3 -1SEG  -LOGFILE -WAIT2 $outputfile"); | 
|---|
| 202 | 
-       $splitfile = $outputfile; | 
|---|
| 203 | 
-       $splitfile =~ s/\.m2t$/_SD1.m2t/; | 
|---|
| 204 | 
-               if (-e "$splitfile"){ | 
|---|
| 205 | 
-               system("rm -rf $outputfile ; mv $splitfile $outputfile"); | 
|---|
| 206 | 
-               &writelog("digitaltvrecording DEBUG rm -rf $outputfile ; mv $splitfile $outputfile: $?."); | 
|---|
| 207 | 
-               }else{ | 
|---|
| 208 | 
-               &writelog("digitaltvrecording ERROR File not found:$splitfile."); | 
|---|
| 209 | 
-               } | 
|---|
| 210 | 
-       }else{ | 
|---|
| 211 | 
-       &writelog("digitaltvrecording ERROR $toolpath/perl/tool/TsSplitter.exe not found."); | 
|---|
| 212 | 
-       } | 
|---|
| 213 | 
-}elsif($bssplitflag == 102){ | 
|---|
| 214 | 
-       if (-e "$toolpath/perl/tool/TsSplitter.exe"){ | 
|---|
| 215 | 
-       # BS2            | 
|---|
| 216 | 
-       system("wine $toolpath/perl/tool/TsSplitter.exe  -EIT -ECM  -EMM  -OUT \"$outputpath\" -HD  -SD1 -SD3 -1SEG  -LOGFILE -WAIT2 $outputfile"); | 
|---|
| 217 | 
-       $splitfile = $outputfile; | 
|---|
| 218 | 
-       $splitfile =~ s/\.m2t$/_SD2.m2t/; | 
|---|
| 219 | 
-               if (-e "$splitfile"){ | 
|---|
| 220 | 
-               system("rm -rf $outputfile ; mv $splitfile $outputfile"); | 
|---|
| 221 | 
-               &writelog("digitaltvrecording DEBUG rm -rf $outputfile ; mv $splitfile $outputfile: $?."); | 
|---|
| 222 | 
-               }else{ | 
|---|
| 223 | 
-               &writelog("digitaltvrecording ERROR File not found:$splitfile."); | 
|---|
| 224 | 
-               } | 
|---|
| 225 | 
-       }else{ | 
|---|
| 226 | 
-       &writelog("digitaltvrecording ERROR $toolpath/perl/tool/TsSplitter.exe not found."); | 
|---|
| 227 | 
-       } | 
|---|
| 228 | 
-}else{ | 
|---|
| 229 | 
-       &writelog("digitaltvrecording DEBUG not split TS.$bssplitflag"); | 
|---|
| 230 | 
-}# endif #BS1/BS2などのスプリットを | 
|---|
| 231 | 
  | 
|---|
| 232 | 
 }#end calldigitalrecorder | 
|---|
| 233 | 
  | 
|---|
| 234 | 
 | 
|---|