チェンジセット 43

差分発生行の前後
無視リスト:
コミット日時:
2007/01/28 20:26:48 (17 年前)
コミッタ:
sorshi
ログメッセージ:

デバイスビジーで録画デバイスをつかめなかった場合のリカバリ機構搭載

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • trunk/doc/CHANGES.txt

    r42 r43  
    44viewepg.php: 
    55 現在時刻の番組が正しく表示出来てない場合があるのを修正。 
     6 
     7recwrap.pl: 
     8tvrecording.pl: 
     9 デバイスビジーで録画デバイスをつかめなかった場合のリカバリ機構搭載(まだ検証が甘い) 
    610 
    71107.1.19 
  • trunk/install/perl/recwrap.pl

    r8 r43  
    7575#録画 
    7676#system("$toolpath/perl/tvrecording.pl $recch $reclength 0 $outputfile $bitrate $tid $countno"); 
     77$starttime = (`date +%s`); 
     78 
    7779$oserr = system("$toolpath/perl/tvrecording.pl $recch $reclength 0 $outputfilename $bitrate $tid $countno"); 
    7880$oserr = $oserr / 256; 
     
    8082        &writelog("recwrap ABORT recfile exist. [$outputfilename] $recch $reclength 0 0 $bitrate $tid $countno $pid"); 
    8183        exit; 
    82 }else{ 
     84
     85#デバイスビジーで即死してないか検出 
     86$now = (`date +%s`); 
     87        if ($now < $starttime + 100){ #録画プロセス起動してから100秒以内に戻ってきてたら 
     88                while($now < $starttime + 100){ 
     89                &writelog("recwrap retry recording $now $starttime"); 
     90$starttime = (`date +%s`); 
     91$oserr = system("$toolpath/perl/tvrecording.pl $recch $reclength 0 $outputfilename $bitrate $tid $countno"); 
     92$now = (`date +%s`); 
     93$oserr = $oserr / 256; 
     94                        if ($oserr == 1){ 
     95                                &writelog("recwrap ABORT recfile exist. in resume process.[$outputfilename] $recch $reclength 0 0 $bitrate $tid $countno $pid"); 
     96                                exit; 
     97                        }# if 
     98                }# while 
     99        } # if  
     100 
     101 
    83102        &writelog("recwrap RECEND [$outputfilename] $recch $reclength 0 0 $bitrate $tid $countno $pid"); 
    84 
     103 
    85104#DB初期化 
    86105        my $data_source = sprintf("dbi:%s:dbname=%s;host=%s;port=%d", 
  • trunk/install/perl/tvrecording.pl

    r29 r43  
    268268$reclengthsec = $reclengthsec + (60 - $startupsleep) + 1; # 
    269269 
    270 &writelog("tvrecording:  DEBUG SLEEP $startupsleeptime:$intval:$startupsleep:$reclengthsec"); 
    271  
    272 sleep ( $startupsleep); 
    273  
     270if ( $ARGV[2] ne "N"){ 
     271        &writelog("tvrecording: DEBUG SLEEP $startupsleeptime:$intval:$startupsleep:$reclengthsec"); 
     272        sleep ( $startupsleep); 
     273}else{ 
     274        &writelog("tvrecording: DEBUG RAPID START"); 
     275 
     276
    274277if ($recunits > 1){ 
    275278my $deviceno = $recunits - 1;#3枚差しのとき/dev/video2から使う 
     
    321324#二重録りなど既に同名ファイルがあったら中断 
    322325if ( -e "$outputfile" ){ 
    323 &writelog("tvrecording :ABORT :recfile $outputfile exist."); 
    324 exit 1; 
     326        if ( -s "$outputfile" ){ 
     327        &writelog("tvrecording :ABORT :recfile $outputfile exist."); 
     328        exit 1; 
     329        } 
    325330} 
    326331 
track feed