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:
Klaus Schmidinger
2001-08-06 18:00:00 +02:00
parent 8f9cc68f76
commit f1d1c9849c
70 changed files with 8234 additions and 433 deletions

106
Tools/master-timer/LIESMICH Normal file
View File

@@ -0,0 +1,106 @@
Master-Timer
============
1. Einleitung
-------------
Master-Timer ist ein System zum automatischen Aufnehmen von Serien und Filmen.
2. Voraussetzungen
------------------
VDR liefert die "epg.data".
3. Konfigurationsdateien
------------------------
Alle Konfigurationsdateien liegen unter "<HOME>.master-timer"
config: Eine Ansammlung von Key-Value Paaren. Alle sind "optional" und
erhalten dann die angegebenen Default-Werte
(# = Kommentarzeilen)
marginstart (Default 600)
Anzahl der "Sicherheits" Sekunden die ein Timer frueher beginnen soll
marginstop (Default 600)
Anzahl der "Sicherheits" Sekunden die ein Timer laenger dauern soll
defaultprio (Default 50)
Die Prioritaet die fuer Timer verwendet wird wo keine Prioritaet
angegeben ist
DVBCards (Default 1)
Anzahl der vorhandenen DVB-Karten (Derzeit nicht verwendet)
Dest-Host (Default "localhost")
Host-name oder IP des Rechners auf dem VDR laeuft
Dest-Port (Default "2001")
Port der VDR verwendet
jointimers (Default 0)
Sollen aufeinanderfolgende Timer auf den gleichen Kanal zusammengefasst
werden (0 = "Nein", alles andere "Ja")
debug (Default 0)
Debug-Level, die einzelnen Debug-Werte muessen aus folgenden Werten
zusammengezaehlt werden
1 : Dump "torecord"
2 : Dump all timers
4 : Show when a timer will be deleted
8 : Dump the "Done" REs
16 : Verbose Config-Reading
deepblack: Eine Liste von Titeln die man NIEMALS NIMMER sehen will
Jede Zeile = 1 Titel
subtitle-movies: Eine Liste der "Subtitel" die ein Zeichen fuer einen Film sind
(Soweit die von den Sendern richtig ausgefuellt sind.)
Jede Zeile = 1 Subtitel
torecord: Die Sachen die man Aufnehmen will
Jede Zeile = 1 Timer
# Format: (Every field is "optional".
# [Title RE|Subtitle RE|Description RE|Channel-Name|Timeframe|Prio|Timer-Title]
#
# To record something at least one of the "Title", "Subtitle" or "Description"
# Fields has to be provided. This 3 fields are "include" and the rest are
# "exclude" fields!
#
# More than one channel definition can be provided. The delimiter is ";"
# Additionaly you can make a "blacklist" of Channels when you prepent a "!" to the first Channel Definition
# The "!" is only tested for the FIRST Channel definition.
# You can only have a white or a blacklist (Mixing doesn't make sense!)
#
# ex. Record the series "Deep Space Nine" on Sci-Fantasy in the timeframe 09:00 - 14:00
# Deep Space Nine|||Sci-Fantasy|0900-1400|99|DS9
#
# Record all "Actionfilm"s with "Schwarzenegger"
# |Actionfilm|Schwarzenegger
#
done: The titles/subtitles which are already recorded/should not be recorded
(Programmed Timers which got inserted into "done" will be deleted
automaticaly)
4. Notices
----------
- Recordings "overlapping" on the same channel, will be joined into one Timer
- Title/Subtitle/Descriptions are "fixed" for Channel that don't fill them
out "correctly" (Currently the "Bugs" from Pro-7/VOX/VIVA)
Pro7: Remove the Title from the Subtitle '<Title> / <Subtitle>'
VOX/VIVA: Subtitle is enclosed into "" and after ". " is the description
VIVA: When the Subtitle beginns with space the subtitle is moved to
description
All (except the second VIVA one) fixes are tried onto ALL Subtitles.
5. Known-Bugs
-------------
- It isn't checked if there are enough DVB-Cards
- Overlapping Timers, on the same channel, are always joined
- JOINed timers which are "done" don't get deleted automaticaly

52
Tools/master-timer/README Normal file
View File

@@ -0,0 +1,52 @@
Master-Timer (w) by Matthias Schniedermeyer (ms@citd.de)
============
1. Introduction
---------------
Master-Timer ist a system for recording Films/Series automaticaly
2. Requierements
----------------
epg.data
3. Config-Files
---------------
For all files: One Entry per Line. Each line is a "Regular Expresion"
So you can use all Perl-Style REs you want.
The RE are matched with "i" so they are case insensitive!
(Except for the "done"-list, these must match excatly!)
deepblack: Blacklist of "Titles" you NEVER EVER want to get to you eyes
subtitle-movies: A list of "Subtitles" which indicate a movie.
(For Channels that correctly fill out the Subtitle.
e.g. it won't work for *eRTL*)
torecord: The titles/subtitles/Description you want to record
done: The titles/subtitles which are already recorded/should not be recorded
(Programmed Timers which got inserted into "done" will be deleted
automaticaly)
4. Notices
----------
- Recordings "overlapping" on the same channel, will be joined into one Timer
- Title/Subtitle/Descriptions are "fixed" for Channel that don't fill them
out "correctly" (Currently the "Bugs" from Pro-7/VOX/VIVA)
Pro7: Remove the Title from the Subtitle '<Title> / <Subtitle>'
VOX/VIVA: Subtitle is enclosed into "" and after ". " is the description
VIVA: When the Subtitle beginns with space the subtitle is moved to
description
All (except the second VIVA one) fixes are tried onto ALL Subtitles.
5. Known-Bugs
-------------
- It isn't checked if there are enough DVB-Cards
- Overlapping Timers, on the same channel, are always joined
- JOINed timers which are "done" don't get deleted automaticaly

10
Tools/master-timer/Todo Normal file
View File

@@ -0,0 +1,10 @@
- "Intelligenter" Kanal-Scanner (z.B. nur 1 Kanal fuer ein
Sender-"Gruppe")
- Filtern nach Serie/Film
- "Komfortable" Anzeige, mit Black & Whitelisten, fuer Genres/Titeln usw.
- Unterstueztung von 1xVDR pro Karte
- Abspielen (mit automatischen "killen" des "Frontend"-VDRs) von
Aufzeichnungen
- "View"-Timer d.h. Timer der nicht Aufnimmt sondern nur den Kanal aendert
- "unwichtige" Timer "verdraengen" wenn andere Aufnahmen anstehen.

1169
Tools/master-timer/master-timer.pl Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,79 @@
#!/usr/bin/perl -w
$dir = "/home/ms/.master-timer";
open (FI,"$dir/done") or die "Can't open \"done\"\n";
while (<FI>)
{
chomp;
if ($_)
{
($title,$subtitle) = split (/\|/,$_,2);
$Done{$title}{$subtitle}=1;
}
}
close (FI);
&traverse('/video');
if ($hit)
{
rename ("$dir/done","$dir/done.bak");
open (FO,">$dir/done");
foreach $title (sort keys %Done)
{
foreach $subtitle (sort keys %{%Done->{$title}})
{
print FO "$title\|$subtitle\n";
}
}
}
sub traverse
{
local($dir) = shift;
local($path);
unless (opendir(DIR, $dir))
{
warn "Can't open $dir\n";
closedir(DIR);
return;
}
foreach (readdir(DIR))
{
next if $_ eq '.' || $_ eq '..';
$path = "$dir/$_";
if (-d $path) # a directory
{
&traverse($path);
}
if ($_ eq "summary.vdr")
{
open (FI,"$path") or die "Can't open \"$path\"\n";
@lines = <FI>;
close (FI);
if ($lines[0] =~ /^Title\:\s\"(.*)\"/)
{
@titles = split (/\~/,$1);
if ($lines[2] && $lines[2] =~ /^Subtitle\:\s\"(.*)\"/)
{
@subtitles = split (/\~/,$1);
foreach $num (0 .. $#titles)
{
if ($titles[$num] && $subtitles[$num])
{
if (!$Done{$titles[$num]}{$subtitles[$num]})
{
$Done{$titles[$num]}{$subtitles[$num]}=1;
$hit = 1;
}
}
}
}
}
}
}
closedir(DIR);
}

View File

@@ -0,0 +1,8 @@
1
2
3
4
5
13
18
21

View File

@@ -0,0 +1,14 @@
# How Many Seconds "too early" should the timer begin
marginstart = 600
# How Many Seocnds "too long" should the timer end
marginstop = 600
# When the Prio isn't provied in the config-File use this value
defaultprio = 50
# How many DVB-Cards are installed in the Computer (Not used yet)
DVBCards = 3
# IP/Hostname:Port of the Destinations (Space is used for delimiter)
Dest-Host = localhost:2001
# Should Timers on the same channels be joined when they overlapp (0 = off)
jointimers = 1
# Debug-Level
debug = 0

View File

@@ -0,0 +1,79 @@
F<EFBFBD>r alle F<>lle Stefanie
'MAX' - Das ganze Leben!
10 vor 11
17:30 live
18:30
24 Stunden
Andreas T<>rck
Arabella
^BIZZ$
Big Brother
Britt - Der Talk um Eins
B<EFBFBD>rbel Sch<63>fer
Call TV
Chicago Hope - Endstation Hoffnung
Chicago Hope
DIE REDAKTION
Dauerwerbesendungen
Die Harald Schmidt Show
Die Oliver Geissen Show
Die Quiz Show
Doppelter Einsatz
Dr. Stefan Frank - Der Arzt, dem die Frauen vertrauen
EXCLUSIV
EXTRA
Ehekriege
Ein Bayer auf R<>gen
Emergency Room
Explosiv - Das Magazin
GIRLSCAMP
Gl<EFBFBD>cksrad
Gute Zeiten, schlechte Zeiten
Hallo, Onkel Doc!
Hans Meiser
Hercules
Hinter Gittern - Der Frauenknast
Infomercials
Jeder gegen Jeden
K1 DIE REPORTAGE
K1 Das Magazin
K1 Nachrichten
Kickers
Kochduell
Nachrichten
Nicole - Entscheidung am Nachmittag
OP ruft Dr. Bruckner
PREMIERE WORLD - Das Programm
PROSIEBEN REPORTAGE
Peter Imhof
Programm ab
Programm von
Punkt 12
Punkt 6
Punkt 9
RTL II News
RTL SHOP
RTL aktuell
RTL-Nachtjournal
SAT.1-FR<46>HST<53>CKSFERNSEHEN
Spiegel TV-Reportage
UEFA Champions
fussball
f<EFBFBD>ball
Vera am Mittag
Wolffs Revier
Zapping
alphateam
peep!
s.a.m.
taff.
^blitz$
SK K<>lsch
^Becker$
Kommissar Rex
Fit For Fun TV
Nur die Liebe z<>hlt
Unsere kleine Farm
Die Waltons
^Die Zwei$
^Sieben$

View File

@@ -0,0 +1 @@
Alles Routine|Kom<6F>die

View File

@@ -0,0 +1,41 @@
^Abenteuerfilm$
^Actionfilm$
^Actionkom<6F>die$
^Actionthriller$
^Agentenfilm$
^Biografie$
^Biographie$
^Computeranimation$
^Drama$
^Episodenfilm$
^Erotikfilm$
^Familiendrama$
^Fantasy$
^Fantasykom<6F>die$
^Gangsterfilm$
^Gerichtsfilm$
^Gesellschaftsdrama$
^Horrorfilm$
^Horrorkom<6F>die$
^Kinderfilm$
^Kom<6F>die$
^Kriegsfilm$
^Krimikom<6F>die$
^Kriminalfilm$
^Liebesfilm$
^Melodram$
^Melodrama$
^Musical$
^Politthriller$
^Psychothriller$
^Road Movie$
^Romanze$
^Satire$
^Science-Fiction$
^Spielfilm$
^TV Movie$
^TV-Drama$
^Thriller$
^Western$
^Zeichentrick$
^Zeichentrickkom<6F>die$

View File

@@ -0,0 +1,32 @@
# Format: (Every field is "optional".
# [Title RE|Subtitle RE|Description RE|Channel-Name|Timeframe|Prio|Timer-Title|Marginstart;Marginstop|VDR-Instance]
#
# To record something at least one of the "Title", "Subtitle" or "Description"
# Fields has to be provided. This 3 fields are "include" and the rest are
# "exclude" fields!
#
# More than one channel definition can be provided. The delimiter is ";"
# Additionaly you can make a "blacklist" of Channels when you prepent a "!" to the first Channel Definition
# The "!" is only tested for the FIRST Channel definition.
# You can only have a white or a blacklist (Mixing doesn't make sense!)
#
# ex. Record the series "Deep Space Nine" on Sci-Fantasy in the timeframe 09:00 - 14:00 with 60 Seconds Marginstart and -60 Seconds Marginstop
# Deep Space Nine|||Sci-Fantasy|0900-1400|99|DS9|60;-60
#
# Record all "Actionfilm"s with "Schwarzenegger"
# |Actionfilm|Schwarzenegger
#
Babylon 5|||!Pro-7||99|60;-60|1
Deep Space Nine|||||99|DS9|60;-60|2
Seven Days|||||99|
Stargate|||||99|
Futurama||||2100-2300|50|
Ally McBeal|||||99|
Snoops|||||50|
^Friends$|||||99|Friends|
Pensacola|||||50|
seaQuest|||||50|
||Paltrow|Sci Fantasy;13th Street;Star Kino;Cine Action;Cine Comedy;Romantic Movies;Studio Universal;Premiere||99|
||Aniston|||99|
Matrix

View File

@@ -0,0 +1,8 @@
#!/bin/sh
old=`svdrpsend.pl chan | grep 250 | cut -d " " -f2`
for dat in `cat $HOME/.master-timer/channels-to-scan`
do
svdrpsend.pl "chan $dat"
sleep 30s
done
svdrpsend.pl "chan $old"

39
Tools/schnitt/cut2.pl Executable file
View 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
View 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
View 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
View 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
View 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/*