チェンジセット 97: trunk/install/perl
- コミット日時:
- 2010/04/02 22:58:58 (15 年前)
- ファイル:
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
trunk/install/perl/db/Pg.pl
r94 r97 54 54 'recwrap.6' => "INSERT into foltia_mp4files VALUES (?, ?)", 55 55 'recwrap.7' => "SELECT foltia_subtitle.tid,foltia_subtitle.countno,foltia_subtitle.subtitle,foltia_subtitle.startdatetime ,foltia_subtitle.enddatetime ,foltia_subtitle.lengthmin ,foltia_tvrecord.bitrate , foltia_subtitle.startoffset , foltia_subtitle.pid ,foltia_tvrecord.digital FROM foltia_subtitle ,foltia_tvrecord WHERE foltia_tvrecord.tid = foltia_subtitle.tid AND foltia_tvrecord.tid = ? AND foltia_subtitle.startdatetime = ? AND foltia_tvrecord.digital = 1", 56 'recwrap.8' => "SELECT stationid,stationname,stationrecch,tunertype FROM foltia_station WHERE stationid = ? ", 56 57 57 58 'schedulecheck.1' => "SELECT count(*) FROM foltia_tvrecord", trunk/install/perl/deletemovie.pl
r94 r97 32 32 33 33 #ファイル名正当性チェック 34 if ($fname =~ /.m2p$|.m2t$ /){34 if ($fname =~ /.m2p$|.m2t$|.aac$/){ 35 35 36 36 }else{ trunk/install/perl/ipodtranscode.pl
r94 r97 134 134 } 135 135 136 137 136 $filenamebody = $inputmpeg2 ; 138 $filenamebody =~ s/.m2t$|.ts$|.m2p$|.mpg$ //gi;137 $filenamebody =~ s/.m2t$|.ts$|.m2p$|.mpg$|.aac$//gi; 139 138 140 139 #デジタルかアナログか 141 if ($inputmpeg2 =~ /m2t$|ts$/i){ 142 #print "MPEG2-TS\n"; 143 140 if ($inputmpeg2 =~ /m2t$|ts$|aac$/i){ 144 141 145 142 if ($filestatus <= $FILESTATUSTRANSCODETSSPLITTING){ … … 237 234 } 238 235 if ($filestatus <= $FILESTATUSTRANSCODEMP4BOX){ 236 237 unlink("${filenamebody}.base.mp4"); 238 239 #デジタルラジオなら 240 if ($inputmpeg2 =~ /aac$/i){ 241 if (-e "$toolpath/perl/tool/MP4Box"){ 242 &writelog("ipodtranscode MP4Box $filenamebody"); 243 system ("cd $recfolderpath ;$toolpath/perl/tool/MP4Box -add $filenamebody.aac -new $filenamebody.base.mp4"); 244 $exit_value = $? >> 8; 245 $signal_num = $? & 127; 246 $dumped_core = $? & 128; 247 &writelog("ipodtranscode DEBUG MP4Box -add $filenamebody.aac -new $filenamebody.base.mp4:$exit_value:$signal_num:$dumped_core"); 248 }else{ 249 &writelog("ipodtranscode WARN; Pls. install $toolpath/perl/tool/MP4Box"); 250 } 251 }else{ 239 252 # MP4ビルド 240 unlink("${filenamebody}.base.mp4");241 253 if (-e "$toolpath/perl/tool/MP4Box"){ 242 254 &changefilestatus($pid,$FILESTATUSTRANSCODEMP4BOX); 243 255 &writelog("ipodtranscode MP4Box $filenamebody"); 244 # system ("cd $recfolderpath ; MP4Box -fps 29.97 -add $filenamebody.264 -new $filenamebody.base.mp4"); 245 system ("cd $recfolderpath ;$toolpath/perl/tool/MP4Box -fps 29.97 -add $filenamebody.264 -new $filenamebody.base.mp4"); 256 system ("cd $recfolderpath ;$toolpath/perl/tool/MP4Box -fps 29.97 -add $filenamebody.264 -new $filenamebody.base.mp4"); 246 257 $exit_value = $? >> 8; 247 258 $signal_num = $? & 127; 248 259 $dumped_core = $? & 128; 249 260 &writelog("ipodtranscode DEBUG MP4Box -fps 29.97 -add $filenamebody.264 -new $filenamebody.base.mp4:$exit_value:$signal_num:$dumped_core"); 250 251 252 261 if (-e "$filenamebody.base.mp4"){ 253 # system ("cd $recfolderpath ; MP4Box -add $filenamebody.aac $filenamebody.base.mp4");254 262 system ("cd $recfolderpath ;$toolpath/perl/tool/MP4Box -add $filenamebody.aac $filenamebody.base.mp4"); 255 263 $exit_value = $? >> 8; … … 265 273 &writelog("ipodtranscode WARN; Pls. install $toolpath/perl/tool/MP4Box"); 266 274 } 275 unlink("$filenamebody.aac"); 276 }#endif #デジタルラジオなら 277 267 278 #} 268 279 … … 299 310 unlink("$filenamebody.264"); 300 311 unlink("$filenamebody.wav"); 301 unlink("$filenamebody.aac");302 312 unlink("$filenamebody.base.mp4"); 303 313 trunk/install/perl/recwrap.pl
r94 r97 54 54 }else{ 55 55 $extension = ".m2p";#MPEG2の拡張子 56 } 57 if ($recch == -2 ){ #ラジオ局 58 $extension = ".aac";#MPEG2の拡張子 56 59 } 57 60 … … 71 74 } 72 75 } 76 77 if ($recch == -2 ){ #ラジオ局 78 # stationIDからradiko識別子を取得 79 $sth = $dbh->prepare($stmt{'recwrap.8'}); 80 $sth->execute($stationid); 81 @stationline= $sth->fetchrow_array; 82 $radikostationname = $stationline[3]; 83 84 $oserr = system("$toolpath/perl/digitalradiorecording.pl $radikostationname $reclength $outputfilename"); 85 $oserr = $oserr / 256; 86 &writelog("recwrap DEBUG radiko rec finished. $oserr"); 87 88 # aacファイル名をfoltia_subtitlePIDレコードに書き込み 89 $sth = $dbh->prepare($stmt{'recwrap.1'}); 90 $sth->execute($outputfilename, $pid); 91 &writelog("recwrap DEBUG UPDATEDB $stmt{'recwrap.1'}"); 92 &changefilestatus($pid,$FILESTATUSTRANSCODEMP4BOX); 93 94 # aacファイル名をfoltia_m2pfilesPIDレコードに書き込み 95 $sth = $dbh->prepare($stmt{'recwrap.2'}); 96 $sth->execute($outputfilename); 97 &writelog("recwrap DEBUG UPDATEDB $stmt{'recwrap.2'}"); 98 99 100 }else{#非ラジオ局なら 73 101 74 102 if ($usedigital == 1){ … … 96 124 exit ; 97 125 } 98 }else{ 126 }else{ # NOT $usedigital == 1 99 127 #リモコン操作 100 128 # $haveirdaunit = 1;リモコンつないでるかどうか確認 … … 176 204 &changefilestatus($pid,$FILESTATUSCAPEND); 177 205 } 178 206 }#非ラジオ局 179 207 180 208 # MPEG4 ------------------------------------------------------ … … 184 212 @psptrcn= $sth->fetchrow_array; 185 213 if ($psptrcn[0] == 1 ){#トラコン番組 186 &writelog("recwrap Launch ipodtranscode.pl");187 exec ("$toolpath/perl/ipodtranscode.pl");188 exit;214 &writelog("recwrap Launch ipodtranscode.pl"); 215 exec ("$toolpath/perl/ipodtranscode.pl"); 216 exit; 189 217 }#PSPトラコンあり 190 218 trunk/install/perl/updatem2pfiletable.pl
r94 r97 31 31 $sth = $dbh->prepare($stmt{'updatem2pfiletable.1'}); 32 32 $sth->execute(); 33 34 33 while ($file = glob("$recfolderpath/*.m2?")) { 35 34 $file =~ s/$recfolderpath\///; … … 38 37 # print "$file\n"; 39 38 }#while 39 while ($file = glob("$recfolderpath/*.aac")) { 40 $file =~ s/$recfolderpath\///; 41 $sth = $dbh->prepare($stmt{'updatem2pfiletable.2'}); 42 $sth->execute($file); 43 # print "$file\n"; 44 }#while 45 40 46 $oserr = $dbh->commit; 41 47