diff options
author | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2002-01-27 18:00:00 +0100 |
---|---|---|
committer | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2002-01-27 18:00:00 +0100 |
commit | 27919ee969866b68fc95b327a047a9989e4b4153 (patch) | |
tree | 1857862abf169ff6e9287152cd6fec6a1d9dbc41 /Tools/xtvrc2vdr/xtvrc2vdr.c | |
parent | b420457467ad0c8ae71f8b985914e85b7a0ff5aa (diff) | |
download | vdr-patch-lnbsharing-27919ee969866b68fc95b327a047a9989e4b4153.tar.gz vdr-patch-lnbsharing-27919ee969866b68fc95b327a047a9989e4b4153.tar.bz2 |
Version 0.99pre2vdr-0.99pre2
- Fixed setting the OSD size in the 'Confirm' interface call (thanks to
Deti Fliegl).
- Removed the 'read incomplete section...' error message in the EIT processor.
- Fixed channel data for "DW TV" (thanks to Axel Gruber).
- Added DPID to "PREMIERE MOVIE 1" in channels.conf.cable (thanks to Stephan
Schreiber).
- Prepared the OSD functions for multiple overlapping windows.
- Removed the check to see whether the system time is running linearly.
- Improved performance of SVDRP command entry.
- Removed EPGBugfixLevel '3' - after more than a year Pro-7 finally managed to
broadcast the correct timestamps for EPG events between 0:00 and 6:00!
- Fixed failing watchdog timer if program hangs in OSD activities (thanks to
Carsten Koch).
- No longer requiring 'libncurses' if compiling without DEBUG_OSD=1 and
REMOTE=KBD (thanks to Lauri Pesonen).
- The "Recordings" menu now displays a hierarchical structure if there are
subdirectories for the recordings. This can be controlled through the
"RecordingDirs" parameter in the "Setup" menu.
See "MANUAL/Replaying a Recording" for details.
- Improved speed of setting the Help button texts.
- Fixed handling file names that contain single quotes (') or dollar signs ($)
in the call to the shutdown command (option '-s') and the recording command
(option '-r').
- Improved error handling in the editing process; the resulting file will be
deleted if an error occured.
- A message is now prompted at the end of the editing process, indicating
whether the process succeeded or failed.
- Fixed setting the LastActivity timestamp after a shutdown prompt (thanks to
Sergei Haller).
- A message is now prompted if free disk space becomes low during recording.
- The editing process now calls AssertFreeDiskSpace() to remove deleted
recordings if the disk becomes full.
- The "Main" menu now displays in its title the used disk space (in percent)
and the estimated free disk space (in hh:mm), assuming a data rate of 30 MB
per minute.
- Activating the "Recordings" menu now displays "scanning recordings..." to
give the user some feedback in case this takes longer.
- Status messages are now displayed centered.
- Removed the 'Tools' subdirectory from the VDR archive. All contributed tools
can now be found at ftp://ftp.cadsoft.de/pub/people/kls/vdr/Tools.
Diffstat (limited to 'Tools/xtvrc2vdr/xtvrc2vdr.c')
-rw-r--r-- | Tools/xtvrc2vdr/xtvrc2vdr.c | 146 |
1 files changed, 0 insertions, 146 deletions
diff --git a/Tools/xtvrc2vdr/xtvrc2vdr.c b/Tools/xtvrc2vdr/xtvrc2vdr.c deleted file mode 100644 index 772db66..0000000 --- a/Tools/xtvrc2vdr/xtvrc2vdr.c +++ /dev/null @@ -1,146 +0,0 @@ -/* - * * xtvrc2vdr.c: Converts 'xtvrc' files to 'vdr' channel format - * * - * * Copyright (C) 2000 Plamen Ganev - * * - * * This program is free software; you can redistribute it and/or - * * modify it under the terms of the GNU General Public License - * * as published by the Free Software Foundation; either version 2 - * * of the License, or (at your option) any later version. - * * - * * This program is distributed in the hope that it will be useful, - * * but WITHOUT ANY WARRANTY; without even the implied warranty of - * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * * GNU General Public License for more details. - * * - * * You should have received a copy of the GNU General Public License - * * along with this program; if not, write to the Free Software - * * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * * Or, point your browser to http://www.gnu.org/copyleft/gpl.html - * * - * * The author can be reached at pganev@comm.it - * * - * */ - - -#include <stdio.h> -#include <ctype.h> -#include <string.h> -#include <stdlib.h> - -#define MAX_LINE_LEN 1024 -#define MAX_NAME 100 -#define TOKS ": \n\r" -#define NAMETOKS ":\n\r" - -typedef struct { - char Name[MAX_NAME+1]; - int freq; - int color, hue, bright, saturation ; - int nitv, input ; - int pol, srate, fec, vpid, apid, lnbnum, type; -} CHANNEL_DATA ; - -void strlwr( char *s ){ - while ( s && *s ){ - *s = tolower(*s); - s++; - } -} - -int ReadChannel( FILE *f, CHANNEL_DATA *channel ) { - static char s[MAX_LINE_LEN+1]; - char *p; - - memset( channel, sizeof( CHANNEL_DATA ), 0 ) ; - - while ((p=fgets( s, MAX_LINE_LEN, f ))!=NULL){ -// printf("%s", s ) ; - if (s[0] == '*') - break ; - } - - if ( !p ) { /* EOF? */ -// printf("EOF\n"); - return 0 ; - } - - while (fgets( s, MAX_LINE_LEN, f )){ - if ( s[0] == '\n' ) - return channel->freq ? 1 : 0; - p = strtok( s, TOKS ) ; - if ( !p ) { - return 0; - } - strlwr( p ) ; - if ( !strcmp( p, "channel" )){ - p=strtok( NULL, NAMETOKS ); - while ( p && *p==' ') - p++; - strcpy( channel->Name, p ); -// printf("%d ", channel->freq ) ; - } else if ( !strcmp( p, "frequency")) { - channel->freq = atoi( p=strtok( NULL, TOKS )); -// printf("%d ", channel->freq ) ; - } else if ( !strcmp( p, "cbhc")) { - channel->color = atoi(p=strtok(NULL,TOKS)); - channel->hue = atoi(p=strtok(NULL,TOKS)); - channel->bright = atoi(p=strtok(NULL,TOKS)); - channel->saturation = atoi(p=strtok(NULL,TOKS)); - } else if ( !strcmp( p, "ni")) { - channel->nitv = atoi(p=strtok(NULL,TOKS)); - channel->input = atoi(p=strtok(NULL,TOKS)); - } else if ( !strcmp( p, "sat")) { - channel->pol = atoi(p=strtok(NULL,TOKS)); - channel->srate = atoi(p=strtok(NULL,TOKS)); - channel->fec = atoi(p=strtok(NULL,TOKS)); - channel->vpid = atoi(p=strtok(NULL,TOKS)); - channel->apid = atoi(p=strtok(NULL,TOKS)); - channel->lnbnum = atoi(p=strtok(NULL,TOKS)); - channel->type = atoi(p=strtok(NULL,TOKS)); - } else - printf("Unknown token %s\n", p ) ; - } - return 1 ; -} - -int main ( int argc, char *argv[] ){ - FILE *f, *fo ; - int cnt = 0; - CHANNEL_DATA channel ; - - if ( argc != 3 ){ - printf("USAGE: %s <xtvrc file> <vdr file>\n\n", argv[0] ) ; - return 0; - } - - if ( !(f=fopen(argv[1], "rt"))){ - printf("Can't open %s for reading\n\n", argv[1]); - return 0; - } - - if ( !(fo=fopen(argv[2], "wt"))){ - printf("Can't open %s for writing\n\n", argv[2]); - return 0; - } - - while ( ReadChannel( f, &channel ) ) { - cnt++; - fprintf(fo, "%s:%d:%c:%d:%d:%d:%d:%d:%d\n", - channel.Name , - channel.freq , - channel.pol ? 'v' : 'h' , - 1, //channel.lnbnum , - channel.srate , - channel.vpid , - channel.apid , - 0, //channel.type , - 0 ); //channel.fec ) ; - } - - printf( "%d channels read.\n\n", cnt ) ; - - fclose(f); - fclose(fo); - return 1; -} |