チェンジセット 97: trunk/install/perl

差分発生行の前後
無視リスト:
コミット日時:
2010/04/02 22:58:58 (15 年前)
コミッタ:
sorshi
ログメッセージ:

radiko録音対応

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • trunk/install/perl/db/Pg.pl

    r94 r97  
    5454'recwrap.6' => "INSERT into foltia_mp4files VALUES (?, ?)", 
    5555'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 = ? ", 
    5657 
    5758'schedulecheck.1' => "SELECT count(*) FROM foltia_tvrecord", 
  • trunk/install/perl/deletemovie.pl

    r94 r97  
    3232 
    3333#ファイル名正当性チェック 
    34 if ($fname =~ /.m2p$|.m2t$/){ 
     34if ($fname =~ /.m2p$|.m2t$|.aac$/){ 
    3535 
    3636}else{ 
  • trunk/install/perl/ipodtranscode.pl

    r94 r97  
    134134} 
    135135 
    136  
    137136$filenamebody = $inputmpeg2 ; 
    138 $filenamebody =~ s/.m2t$|.ts$|.m2p$|.mpg$//gi; 
     137$filenamebody =~ s/.m2t$|.ts$|.m2p$|.mpg$|.aac$//gi; 
    139138 
    140139#デジタルかアナログか 
    141 if ($inputmpeg2 =~ /m2t$|ts$/i){ 
    142         #print "MPEG2-TS\n"; 
    143  
     140if ($inputmpeg2 =~ /m2t$|ts$|aac$/i){ 
    144141 
    145142if ($filestatus <= $FILESTATUSTRANSCODETSSPLITTING){ 
     
    237234} 
    238235if ($filestatus <= $FILESTATUSTRANSCODEMP4BOX){ 
     236 
     237unlink("${filenamebody}.base.mp4"); 
     238 
     239#デジタルラジオなら 
     240if ($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{ 
    239252        # MP4ビルド 
    240         unlink("${filenamebody}.base.mp4"); 
    241253        if (-e "$toolpath/perl/tool/MP4Box"){ 
    242254                &changefilestatus($pid,$FILESTATUSTRANSCODEMP4BOX); 
    243255                &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"); 
    246257        $exit_value = $? >> 8; 
    247258        $signal_num = $? & 127; 
    248259        $dumped_core = $? & 128; 
    249260        &writelog("ipodtranscode DEBUG MP4Box -fps 29.97 -add $filenamebody.264 -new $filenamebody.base.mp4:$exit_value:$signal_num:$dumped_core"); 
    250  
    251          
    252261                if (-e "$filenamebody.base.mp4"){ 
    253 #               system ("cd $recfolderpath ; MP4Box -add $filenamebody.aac $filenamebody.base.mp4"); 
    254262                system ("cd $recfolderpath ;$toolpath/perl/tool/MP4Box -add $filenamebody.aac $filenamebody.base.mp4"); 
    255263        $exit_value = $? >> 8; 
     
    265273                &writelog("ipodtranscode WARN; Pls. install $toolpath/perl/tool/MP4Box"); 
    266274        } 
     275unlink("$filenamebody.aac"); 
     276}#endif #デジタルラジオなら 
     277         
    267278#} 
    268279 
     
    299310        unlink("$filenamebody.264"); 
    300311        unlink("$filenamebody.wav"); 
    301         unlink("$filenamebody.aac"); 
    302312        unlink("$filenamebody.base.mp4"); 
    303313         
  • trunk/install/perl/recwrap.pl

    r94 r97  
    5454}else{ 
    5555        $extension = ".m2p";#MPEG2の拡張子 
     56} 
     57if ($recch == -2 ){ #ラジオ局 
     58        $extension = ".aac";#MPEG2の拡張子 
    5659} 
    5760 
     
    7174        } 
    7275} 
     76 
     77if ($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{#非ラジオ局なら 
    73101 
    74102if ($usedigital == 1){ 
     
    96124exit ; 
    97125} 
    98 }else{ 
     126}else{ # NOT $usedigital == 1 
    99127#リモコン操作 
    100128# $haveirdaunit = 1;リモコンつないでるかどうか確認 
     
    176204&changefilestatus($pid,$FILESTATUSCAPEND); 
    177205} 
    178  
     206}#非ラジオ局 
    179207 
    180208# MPEG4 ------------------------------------------------------ 
     
    184212 @psptrcn= $sth->fetchrow_array; 
    185213if ($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; 
    189217}#PSPトラコンあり 
    190218 
  • trunk/install/perl/updatem2pfiletable.pl

    r94 r97  
    3131$sth = $dbh->prepare($stmt{'updatem2pfiletable.1'}); 
    3232        $sth->execute(); 
    33  
    3433while ($file = glob("$recfolderpath/*.m2?")) { 
    3534$file =~ s/$recfolderpath\///; 
     
    3837# print "$file\n"; 
    3938}#while 
     39while ($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 
    4046$oserr = $dbh->commit; 
    4147 
track feed