mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Version 0.90
- Modified the display of the channel group separators (thanks to Markus Lang for this suggestion). - Added support for replaying DVDs (thanks to Andreas Schultz). See INSTALL for instructions on how to compile VDR with DVD support. - Fixed replay progress display in case replay is paused while watching an ongoing recording. - Ringbuffer uses semaphores to signal empty/full conditions. - Fixed calculating the timeout value in cFile::FileReady() (thanks to Wolfgang Henselmann-Weiss).
This commit is contained in:
39
Tools/schnitt/cut2.pl
Executable file
39
Tools/schnitt/cut2.pl
Executable file
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
$titel = $ARGV[0];
|
||||
|
||||
chdir ("/x2/temp");
|
||||
|
||||
@files=<teil*.mpg>;
|
||||
$cd = 1;
|
||||
mkdir "/x2/temp/$cd";
|
||||
open (FF,">/x2/temp/$cd/$titel\ CD\ $cd");
|
||||
close (FF);
|
||||
|
||||
foreach $file (@files)
|
||||
{
|
||||
$size = -s $file;
|
||||
$total += $size;
|
||||
if ($total <= 660*1024*1024)
|
||||
{
|
||||
print "Moving $file\n";
|
||||
system ("mv /x2/temp/$file /x2/temp/$cd/$file");
|
||||
}
|
||||
else
|
||||
{
|
||||
print "Splitting $file\n";
|
||||
$file =~ s/\.mpg$//;
|
||||
$total -= $size;
|
||||
$size = (660*1024*1024) - $total;
|
||||
$cd = `cut3.pl /x2/temp $cd $file $size \'$titel\' < $file.mpg`;
|
||||
chomp $cd;
|
||||
$total = 0;
|
||||
@files2=</x2/temp/$cd/teil*>;
|
||||
foreach $file2 (@files2)
|
||||
{
|
||||
$total += -s $file2;
|
||||
}
|
||||
print "CD: $cd Total $total\n";
|
||||
unlink "$file.mpg";
|
||||
}
|
||||
}
|
40
Tools/schnitt/cut3.pl
Executable file
40
Tools/schnitt/cut3.pl
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
$read = $size = 1024*1024;
|
||||
|
||||
$dir = $ARGV[0];
|
||||
$subdir = $ARGV[1];
|
||||
$teil = $ARGV[2];
|
||||
$count1 = $ARGV[3];
|
||||
$title = $ARGV[4];
|
||||
|
||||
$filenum = "1";
|
||||
$count = 0;
|
||||
|
||||
open (FI,">$dir/$subdir/$teil.$filenum.mpg");
|
||||
|
||||
while ($read == $size)
|
||||
{
|
||||
if (($filenum == 1 && $count < $count1) || ($filenum > 1 && $count < 660*1024*1024))
|
||||
{
|
||||
$read = read (STDIN,$data,$size);
|
||||
print FI $data;
|
||||
$count += $size;
|
||||
$a = $count /1024/1024;
|
||||
}
|
||||
else
|
||||
{
|
||||
close (FI);
|
||||
$filenum++;
|
||||
$subdir++;
|
||||
mkdir ("$dir/$subdir");
|
||||
open (FF,">$dir/$subdir/$title\ CD\ $subdir");
|
||||
close (FF);
|
||||
open (FI,">$dir/$subdir/$teil.$filenum.mpg");
|
||||
$count = 0;
|
||||
}
|
||||
}
|
||||
|
||||
close FI;
|
||||
|
||||
print "$subdir\n";
|
31
Tools/schnitt/cutall3.pl
Executable file
31
Tools/schnitt/cutall3.pl
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
open (FI,"cut") or die "Kann Cut-Datei nicht oeffnen\n";
|
||||
|
||||
outer: while (<FI>)
|
||||
{
|
||||
chomp;
|
||||
if (! ($_ > 1 || $_ eq "0"))
|
||||
{
|
||||
open (FO,">cut2");
|
||||
print FO "$_\n";
|
||||
while (<FI>)
|
||||
{
|
||||
chomp;
|
||||
if ($_ > 1 || $_ eq "0")
|
||||
{
|
||||
print FO "$_\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
system ("cutt");
|
||||
redo outer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( -f "cut2")
|
||||
{
|
||||
system ("cutt");
|
||||
unlink "cut2";
|
||||
}
|
65
Tools/schnitt/dump.c
Normal file
65
Tools/schnitt/dump.c
Normal file
@@ -0,0 +1,65 @@
|
||||
#include "libmpeg3.h"
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
mpeg3_t *file;
|
||||
int x,y,ii,i,j,result,out;
|
||||
int howmany;
|
||||
unsigned char *output, **output_rows;
|
||||
char filename[100];
|
||||
char header[100];
|
||||
char temp;
|
||||
|
||||
howmany = atoi (argv[2]);
|
||||
|
||||
if ((file = mpeg3_open(argv[1])) == NULL)
|
||||
{
|
||||
printf ("Open failed\n");
|
||||
return 1;
|
||||
}
|
||||
mpeg3_set_cpus(file,1);
|
||||
mpeg3_set_mmx(file,0);
|
||||
if (mpeg3_has_video == 0)
|
||||
{
|
||||
printf ("Stream has no Video\n");
|
||||
return 1;
|
||||
}
|
||||
x = mpeg3_video_width(file,0);
|
||||
y = mpeg3_video_height(file, 0);
|
||||
output = malloc (x*y*3 + 4);
|
||||
output_rows = malloc (sizeof(unsigned char*) * y);
|
||||
for(i = 0; i < y; i++)
|
||||
output_rows[i] = &output[i * x * 3];
|
||||
|
||||
for (ii = 0; ii < howmany; ii++)
|
||||
{
|
||||
result = mpeg3_read_frame(file,output_rows,0,0,x,y,x,y,0,0);
|
||||
|
||||
sprintf (filename,"/x2/temp/output%03i.ppm",ii);
|
||||
sprintf (header,"P6\n%i %i\n255\n\r",x,y);
|
||||
|
||||
/* printf ("Opening %s\n",filename); */
|
||||
|
||||
if ((out = open (filename,O_CREAT|O_WRONLY|O_TRUNC,0755)) == -1)
|
||||
{
|
||||
printf ("Can't open %s\n",filename);
|
||||
return 1;
|
||||
}
|
||||
|
||||
write (out,header,strlen(header));
|
||||
|
||||
for (i = 0; i < y; i++)
|
||||
for (j = 0; j < x; j++)
|
||||
{
|
||||
temp = output [(i*x+j)*3 + 1];
|
||||
output[(i*x+j)*3 + 1] = output [(i*x+j)*3 + 0];
|
||||
output[(i*x+j)*3 + 0] = temp;
|
||||
}
|
||||
write (out, output, x*y*3);
|
||||
close (out);
|
||||
}
|
||||
}
|
10
Tools/schnitt/play
Executable file
10
Tools/schnitt/play
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
if [ "$1" != "" ]; then
|
||||
vmount "$1"
|
||||
fi
|
||||
ssh dvb2 /usr/local/bin/my/novdr
|
||||
sleep 1s
|
||||
cat /mnt/*/* | buffer -b 1000 -S 1024 | ssh dvb2 play2
|
||||
ssh dvb2 rm /tmp/novdr
|
||||
umount /mnt/*
|
||||
|
Reference in New Issue
Block a user