チェンジセット 131: trunk/install/perl/recwrap.pl

差分発生行の前後
無視リスト:
コミット日時:
2010/10/25 18:15:50 (14 年前)
コミッタ:
sorshi
ログメッセージ:

デジタル録画時に重複録画数がエンコーダ数を超えたときの対策を強化

ファイル:

凡例:

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

    r115 r131  
    117117        exit; 
    118118}elsif ($oserr == 2){ 
    119         &writelog("recwrap ERR 2:friio busy;retry."); 
     119        &writelog("recwrap ERR 2:Device busy;retry."); 
    120120        &continuousrecordingcheck;#もうすぐ終わる番組をkill 
    121121        sleep(2); 
     
    123123        $oserr = $oserr / 256; 
    124124        if ($oserr == 2){ 
    125         &writelog("recwrap ERR 2:friio busy;Giving up digital recording."); 
     125        &writelog("recwrap ERR 2:Device busy;Giving up digital recording."); 
     126                if ($recunits > 0 ){ 
     127                }else{ 
     128                        exit; 
     129                } 
    126130        } 
    127131}elsif ($oserr == 3){ 
     
    130134} 
    131135}else{ # NOT $usedigital == 1 
    132 #リモコン操作 
    133 # $haveirdaunit = 1;リモコンつないでるかどうか確認 
    134 if ($haveirdaunit == 1){ 
    135 # 録画チャンネルが0なら 
    136         if ($recch == 0){ 
    137 # &つけて非同期でchangestbch.pl呼び出し 
    138         &writelog("recwrap Call Change STB CH :$pid"); 
    139         system ("$toolpath/perl/changestbch.pl $pid &"); 
     136        if ($recunits > 0 ){ 
     137        #リモコン操作 
     138        # $haveirdaunit = 1;リモコンつないでるかどうか確認 
     139        if ($haveirdaunit == 1){ 
     140        # 録画チャンネルが0なら 
     141                if ($recch == 0){ 
     142        # &つけて非同期でchangestbch.pl呼び出し 
     143                &writelog("recwrap Call Change STB CH :$pid"); 
     144                system ("$toolpath/perl/changestbch.pl $pid &"); 
     145                }#end if 
    140146        }#end if 
    141 }#end if 
    142  
    143 if($recch == -10){ 
    144 #非受信局なら 
    145         &writelog("recwrap Not recordable channel;exit:PID $pid"); 
    146         exit; 
    147         }#end if 
    148 # アナログ録画 
    149 &writelog("recwrap RECSTART $recch $reclength 0 $outputfilename $bitrate $tid $countno $pid $usedigital $digitalstationband $digitalch"); 
    150  
    151 #録画 
    152 #system("$toolpath/perl/tvrecording.pl $recch $reclength 0 $outputfile $bitrate $tid $countno"); 
    153     $starttime = time(); 
    154  
    155 $oserr = system("$toolpath/perl/tvrecording.pl $recch $reclength 0 $outputfilename $bitrate $tid $countno"); 
    156 $oserr = $oserr / 256; 
    157 if ($oserr == 1){ 
    158         &writelog("recwrap ABORT recfile exist. [$outputfilename] $recch $reclength 0 0 $bitrate $tid $countno $pid"); 
    159         exit; 
    160 
    161  
    162 }#endif #デジタル優先フラグ 
    163  
     147         
     148        if($recch == -10){ 
     149        #非受信局なら 
     150                &writelog("recwrap Not recordable channel;exit:PID $pid"); 
     151                exit; 
     152                }#end if 
     153        # アナログ録画 
     154        &writelog("recwrap RECSTART $recch $reclength 0 $outputfilename $bitrate $tid $countno $pid $usedigital $digitalstationband $digitalch"); 
     155         
     156        #録画 
     157        #system("$toolpath/perl/tvrecording.pl $recch $reclength 0 $outputfile $bitrate $tid $countno"); 
     158                $starttime = time(); 
     159         
     160        $oserr = system("$toolpath/perl/tvrecording.pl $recch $reclength 0 $outputfilename $bitrate $tid $countno"); 
     161        $oserr = $oserr / 256; 
     162        if ($oserr == 1){ 
     163                &writelog("recwrap ABORT recfile exist. [$outputfilename] $recch $reclength 0 0 $bitrate $tid $countno $pid"); 
     164                exit; 
     165        } 
    164166#デバイスビジーで即死してないか検出 
    165167$now = time(); 
     
    189191 
    190192        &writelog("recwrap RECEND [$outputfilename] $recch $reclength 0 0 $bitrate $tid $countno $pid"); 
     193 
     194        }#end if $recunits > 0 
     195}#endif #デジタル優先フラグ 
    191196 
    192197 
     
    285290                system("kill $pid"); 
    286291                &writelog("recwrap recording process killed $pid/$endtimeepoch/$now"); 
     292        }else{ 
     293                &writelog("recwrap No processes killed: $endtimeepoch/$now"); 
    287294        } 
    288295                }#endif m2t 
track feed