diff options
Diffstat (limited to 'Tools/schnitt/schnitt3.pl.new')
-rwxr-xr-x | Tools/schnitt/schnitt3.pl.new | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/Tools/schnitt/schnitt3.pl.new b/Tools/schnitt/schnitt3.pl.new new file mode 100755 index 0000000..04a6239 --- /dev/null +++ b/Tools/schnitt/schnitt3.pl.new @@ -0,0 +1,77 @@ +#!/usr/bin/perl + +require "/usr/local/bin/my/schnittcommon.pli"; + +open (INDEX,"index.vdr"); + +$index = $ARGV[0]; +&nextI; + +$oldindex = $index; +$tempindex = $index; + +$add = -1; + +$fi = sprintf ("%03d.vdr",$file); +open (FI2,$fi); +open (FO,">test2"); +sysseek (FI2,$offset,0); +sysread (FI2,$temp,3000000); +syswrite (FO,$temp,3000000); +close (FI2); +close (FO); + +system ("pes2av_pes test2 > test 2>/dev/null"); +open (PVA,"/usr/local/bin/pvademux.old . test 2>&1 |"); + +@a=<PVA>; close PVA; +@b=split (/\s/,$a[2]); + +if (!($b[4] =~ /\-/) && $b[4] < 2000) + { + unlink <test*>; + print "$index\n"; + exit 0; + } + +while (1) + { + if ($index == 0) + { + $add = 1; + } + if ($add = -1) + { + $index--; + &prevI; + } + else + { + nextI; + } + $fi = sprintf ("%03d.vdr",$file); + open (FI2,$fi); + open (FO,">test2"); + sysseek (FI2,$offset,0); + sysread (FI2,$temp,3000000); + syswrite (FO,$temp,3000000); + close (FI2); + close (FO); + +system ("/usr/local/bin/pes2av_pes test2 > test 2>/dev/null"); +open (PVA,"/usr/local/bin/pvademux.old . test 2>&1 |"); + +@a=<PVA>; close PVA; +@b=split (/\s/,$a[2]); + +if (!($b[4] =~ /\-/) && $b[4] < 2000) + { + unlink <test*>; + if ($index < 0) + { + $index *= -1; + } + print "$index\n"; + exit 0; + } +} |