debian/0002755000000000000000000000000011771203370007171 5ustar debian/control0000644000000000000000000000144311771203114010570 0ustar Source: dvbtune Section: utils Priority: optional Build-Depends: debhelper (>= 8), libxml2-dev, docbook-to-man, linux-kernel-headers Maintainer: Debian VDR Team Uploaders: Mark Purcell DM-Upload-Allowed: yes Standards-Version: 3.9.3 Vcs-Svn: svn://svn.debian.org/pkg-vdr-dvb/dvb/dvbtune/trunk/ Vcs-Browser: http://anonscm.debian.org/viewvc/pkg-vdr-dvb/dvb/dvbtune/ Homepage: http://sourceforge.net/projects/dvbtools/ Package: dvbtune Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, udev | makedev (>= 2.3.1) Description: Simple tuning application for DVB cards DVBtune is a simple application to allow the tuning of DVB cards supported by the Linux DVB driver. . It is still very experimental, especially the XML output. debian/patches/0002755000000000000000000000000011771203370010620 5ustar debian/patches/020_inversion.patch0000644000000000000000000000262211771201313014231 0ustar diff -ruN dvbtune-0.5-old/tune.c dvbtune-0.5/tune.c --- dvbtune-0.5-old/tune.c 2004-02-06 14:00:36.000000000 +0000 +++ dvbtune-0.5/tune.c 2006-09-11 13:48:13.000000000 +0100 @@ -442,7 +442,7 @@ #ifdef NEWSTRUCT if (freq < 1000000) freq*=1000UL; feparams.frequency=freq; - feparams.inversion=INVERSION_OFF; + feparams.inversion=specInv; feparams.u.ofdm.bandwidth=bandwidth; feparams.u.ofdm.code_rate_HP=HP_CodeRate; feparams.u.ofdm.code_rate_LP=LP_CODERATE_DEFAULT; @@ -453,7 +453,7 @@ #else if (freq < 1000000) freq*=1000UL; feparams.Frequency=freq; - feparams.Inversion=INVERSION_OFF; + feparams.Inversion=specInv; feparams.u.ofdm.bandWidth=bandwidth; feparams.u.ofdm.HP_CodeRate=HP_CodeRate; feparams.u.ofdm.LP_CodeRate=LP_CODERATE_DEFAULT; @@ -571,13 +571,13 @@ fprintf(stderr,"tuning DVB-C to %d, srate=%d\n",freq,srate); #ifdef NEWSTRUCT feparams.frequency=freq; - feparams.inversion=INVERSION_OFF; + feparams.inversion=specInv; feparams.u.qam.symbol_rate = srate; feparams.u.qam.fec_inner = FEC_AUTO; feparams.u.qam.modulation = modulation; #else feparams.Frequency=freq; - feparams.Inversion=INVERSION_OFF; + feparams.Inversion=specInv; feparams.u.qam.SymbolRate = srate; feparams.u.qam.FEC_inner = FEC_AUTO; feparams.u.qam.QAM = modulation; debian/patches/series0000644000000000000000000000004511771201313012025 0ustar 020_inversion.patch 10_options.patch debian/patches/10_options.patch0000644000000000000000000005701611771201313013636 0ustar diff -ruN dvbtune-0.5-old/dvbtune.c dvbtune-0.5/dvbtune.c --- dvbtune-0.5-old/dvbtune.c 2004-02-11 15:59:19.000000000 +0000 +++ dvbtune-0.5/dvbtune.c 2004-02-15 08:42:10.000000000 +0000 @@ -45,6 +45,19 @@ #include #include #include +#include + +#ifdef I18N +#include +#include +#define _(X) gettext(X) +#else /* Null Ops */ +#define LC_ALL 1 +#define textdomain(X) do {} while (0) +#define _(X) (X) +#define setlocale(X,Y) do {} while (0) +#endif + // DVB includes: #ifdef NEWSTRUCT @@ -64,6 +77,7 @@ #include #endif + #include "tune.h" #define SECA_CA_SYSTEM 0x0100 @@ -283,7 +297,7 @@ pesFilterParamsREC.flags = DMX_IMMEDIATE_START; if (ioctl(fd, DMX_SET_PES_FILTER, &pesFilterParamsREC) < 0) - perror("set_recpid"); + perror(_("set_recpid")); } void set_sipid(ushort ttpid) @@ -306,7 +320,7 @@ pesFilterParamsSI.flags = DMX_IMMEDIATE_START; if (ioctl(fd_demuxsi, DMX_SET_PES_FILTER, &pesFilterParamsSI) < 0) - perror("set_sipid"); + perror(_("set_sipid")); } void set_ttpid(ushort ttpid) @@ -329,7 +343,7 @@ pesFilterParamsTT.flags = DMX_IMMEDIATE_START; if (ioctl(fd_demuxtt, DMX_SET_PES_FILTER, &pesFilterParamsTT) < 0) - perror("set_ttpid"); + perror(_("set_ttpid")); } void set_vpid(ushort vpid) @@ -351,7 +365,7 @@ pesFilterParamsV.flags = DMX_IMMEDIATE_START; if (ioctl(fd_demuxv, DMX_SET_PES_FILTER, &pesFilterParamsV) < 0) - perror("set_vpid"); + perror(_("set_vpid")); } void set_apid(ushort apid) @@ -372,7 +386,7 @@ pesFilterParamsA.flags = DMX_IMMEDIATE_START; if (ioctl(fd_demuxa, DMX_SET_PES_FILTER, &pesFilterParamsA) < 0) - perror("set_apid"); + perror(_("set_apid")); } void set_dpid(ushort dpid) @@ -390,7 +404,7 @@ sctFilterParams.timeout = 0; sctFilterParams.flags = DMX_IMMEDIATE_START; if (ioctl(fd_demuxd, DMX_SET_FILTER, &sctFilterParams) < 0) - perror("set_dpid"); + perror(_("set_dpid")); } @@ -412,8 +426,8 @@ pesFilterParams.flags = DMX_IMMEDIATE_START; if (ioctl(fd, DMX_SET_PES_FILTER, &pesFilterParams) < 0) { - fprintf(stderr,"FILTER %i: ",pid); - perror("DMX SET PES FILTER"); + fprintf(stderr,_("FILTER %i: "),pid); + perror(_("DMX SET PES FILTER")); } } @@ -702,7 +716,7 @@ int info_len,network_id; if((fd_nit = open(demuxdev[card],O_RDWR|O_NONBLOCK)) < 0){ - perror("fd_nit DEVICE: "); + perror(_("fd_nit DEVICE: ")); return -1; } @@ -714,7 +728,7 @@ sctFilterParams.filter.mask[0]=0xff; if (ioctl(fd_nit,DMX_SET_FILTER,&sctFilterParams) < 0) { - perror("NIT - DMX_SET_FILTER:"); + perror(_("NIT - DMX_SET_FILTER:")); close(fd_nit); return -1; } @@ -722,7 +736,7 @@ ufd.fd=fd_nit; ufd.events=POLLPRI; if (poll(&ufd,1,10000) < 0 ) { - fprintf(stderr,"TIMEOUT on read from fd_nit\n"); + fprintf(stderr,_("TIMEOUT on read from fd_nit\n")); close(fd_nit); return -1; } @@ -756,10 +770,10 @@ // printf("\n"); // printf("\n"); } else { - fprintf(stderr,"Under-read bytes for NIT - wanted %d, got %d\n",seclen,n); + fprintf(stderr,_("Under-read bytes for NIT - wanted %d, got %d\n"),seclen,n); } } else { - fprintf(stderr,"Nothing to read from fd_nit\n"); + fprintf(stderr,_("Nothing to read from fd_nit\n")); } close(fd_nit); return(0); @@ -780,7 +794,7 @@ if (pid==0) { return; } if((fd_pmt = open(demuxdev[card],O_RDWR|O_NONBLOCK)) < 0){ - perror("fd_pmt DEVICE: "); + perror(_("fd_pmt DEVICE: ")); return; } @@ -792,7 +806,7 @@ sctFilterParams.filter.mask[0]=0xff; if (ioctl(fd_pmt,DMX_SET_FILTER,&sctFilterParams) < 0) { - perror("PMT - DMX_SET_FILTER:"); + perror(_("PMT - DMX_SET_FILTER:")); close(fd_pmt); return; } @@ -800,7 +814,7 @@ ufd.fd=fd_pmt; ufd.events=POLLPRI; if (poll(&ufd,1,10000) < 0) { - fprintf(stderr,"TIMEOUT reading from fd_pmt\n"); + fprintf(stderr,_("TIMEOUT reading from fd_pmt\n")); close(fd_pmt); return; } @@ -847,10 +861,10 @@ // printf("\n"); // printf("\n"); } else { - printf("Under-read bytes for PMT - wanted %d, got %d\n",seclen,n); + printf(_("Under-read bytes for PMT - wanted %d, got %d\n"),seclen,n); } } else { - fprintf(stderr,"Nothing to read from fd_pmt\n"); + fprintf(stderr,_("Nothing to read from fd_pmt\n")); } close(fd_pmt); @@ -867,7 +881,7 @@ pat_t pat; if((fd_pat = open(demuxdev[card],O_RDWR|O_NONBLOCK)) < 0){ - perror("fd_pat DEVICE: "); + perror(_("fd_pat DEVICE: ")); return; } @@ -879,7 +893,7 @@ sctFilterParams.filter.mask[0]=0xff; if (ioctl(fd_pat,DMX_SET_FILTER,&sctFilterParams) < 0) { - perror("PAT - DMX_SET_FILTER:"); + perror(_("PAT - DMX_SET_FILTER:")); close(fd_pat); return; } @@ -887,7 +901,7 @@ ufd.fd=fd_pat; ufd.events=POLLPRI; if (poll(&ufd,1,10000) < 0) { - fprintf(stderr,"TIMEOUT reading from fd_pat\n"); + fprintf(stderr,_("TIMEOUT reading from fd_pat\n")); close(fd_pat); return; } @@ -916,7 +930,7 @@ printf("Under-read bytes for PAT - wanted %d, got %d\n",seclen,n); } } else { - fprintf(stderr,"Nothing to read from fd_pat\n"); + fprintf(stderr,_("Nothing to read from fd_pat\n")); } close(fd_pat); } @@ -932,7 +946,7 @@ struct pollfd ufd; if((fd_sdt = open(demuxdev[card],O_RDWR|O_NONBLOCK)) < 0){ - perror("fd_sdt DEVICE: "); + perror(_("fd_sdt DEVICE: ")); return; } @@ -944,7 +958,7 @@ sctFilterParams.filter.mask[0]=0xff; if (ioctl(fd_sdt,DMX_SET_FILTER,&sctFilterParams) < 0) { - perror("SDT - DMX_SET_FILTER:"); + perror(_("SDT - DMX_SET_FILTER:")); close(fd_sdt); return; } @@ -956,7 +970,7 @@ ufd.fd=fd_sdt; ufd.events=POLLPRI; if (poll(&ufd,1,2000) < 0 ) { - fprintf(stderr,"TIMEOUT on read from fd_sdt\n"); + fprintf(stderr,_("TIMEOUT on read from fd_sdt\n")); close(fd_sdt); return; } @@ -999,7 +1013,7 @@ printf("Under-read bytes for SDT - wanted %d, got %d\n",seclen,n); } } else { - fprintf(stderr,"Nothing to read from fd_sdt\n"); + fprintf(stderr,_("Nothing to read from fd_sdt\n")); } } // printf("\n"); @@ -1012,7 +1026,7 @@ int ans; if ( (ans = ioctl(fd,FE_READ_BER, ber) < 0)){ - perror("FE READ_BER: "); + perror(_("FE READ_BER: ")); return -1; } return 0; @@ -1024,7 +1038,7 @@ int ans; if ( (ans = ioctl(fd,FE_READ_SIGNAL_STRENGTH, strength) < 0)){ - perror("FE READ SIGNAL STRENGTH: "); + perror(_("FE READ SIGNAL STRENGTH: ")); return -1; } return 0; @@ -1035,7 +1049,7 @@ int ans; if ( (ans = ioctl(fd,FE_READ_SNR, snr) < 0)){ - perror("FE READ_SNR: "); + perror(_("FE READ_SNR: ")); return -1; } return 0; @@ -1047,7 +1061,7 @@ int ans; if ( (ans = ioctl(fd,FE_READ_AFC, snr) < 0)){ - perror("FE READ_AFC: "); + perror(_("FE READ_AFC: ")); return -1; } return 0; @@ -1060,12 +1074,72 @@ int ans; if ( (ans = ioctl(fd,FE_READ_UNCORRECTED_BLOCKS, ucb) < 0)){ - perror("FE READ UNCORRECTED BLOCKS: "); + perror(_("FE READ UNCORRECTED BLOCKS: ")); return -1; } return 0; } +void usage (int was_error) +{ + FILE *fp = was_error ? stderr : stdout ; + fprintf(fp,_("Usage: dvbtune [OPTIONS]\n\n")); + fprintf(fp,_("Standard options:\n\n")); + fprintf(fp,_("-f freq absolute Frequency (DVB-S in Hz or DVB-T in Hz)\n")); + fprintf(fp,_(" or L-band Frequency (DVB-S in Hz or DVB-T in Hz)\n")); + fprintf(fp,_("-p [H,V] Polarity (DVB-S only)\n")); + fprintf(fp,_("-s N Symbol rate (DVB-S or DVB-C)\n")); + fprintf(fp,_("-v vpid Decode video PID (full cards only)\n")); + fprintf(fp,_("-a apid Decode audio PID (full cards only)\n")); + fprintf(fp,_("-t ttpid Decode teletext PID (full cards only)\n")); + fprintf(fp,_("-pnr N Tune to Program Number (aka service) N\n\n")); + fprintf(fp,_("-i Dump SI information as XML\n")); + + fprintf(fp,_("\nAdvanced tuning options:\n\n")); + fprintf(fp,_("-c [0-3] Use DVB card #[0-3]\n")); + fprintf(fp,_("-tone [0|1] 0=22kHz off, 1=22kHz on\n")); + fprintf(fp,_("-I [0|1|2] 0=Spectrum Inversion off, 1=Spectrum Inversion on, 2=auto\n")); + fprintf(fp,_("-D [0-4] DiSEqC command (0=none)\n\n")); + fprintf(fp,_("-qam X DVB-T modulation - 16%s, 32%s, 64%s, 128%s or 256%s\n"), + (CONSTELLATION_DEFAULT==QAM_16 ? _(" (default)") : ""), + (CONSTELLATION_DEFAULT==QAM_32 ? _(" (default)") : ""), + (CONSTELLATION_DEFAULT==QAM_64 ? _(" (default)") : ""), + (CONSTELLATION_DEFAULT==QAM_128 ? _(" (default)") : ""), + (CONSTELLATION_DEFAULT==QAM_256 ? _(" (default)") : "")); + fprintf(fp,_("-gi N DVB-T guard interval 1_N (N=32%s, 16%s, 8%s or 4%s)\n"), + (GUARD_INTERVAL_DEFAULT==GUARD_INTERVAL_1_32 ? _(" (default)") : ""), + (GUARD_INTERVAL_DEFAULT==GUARD_INTERVAL_1_16 ? _(" (default)") : ""), + (GUARD_INTERVAL_DEFAULT==GUARD_INTERVAL_1_8 ? _(" (default)") : ""), + (GUARD_INTERVAL_DEFAULT==GUARD_INTERVAL_1_4 ? _(" (default)") : "")); + fprintf(fp,_("-cr N DVB-T code rate. N=AUTO%s, 1_2%s, 2_3%s, 3_4%s, 5_6%s, 7_8%s\n"), + (HP_CODERATE_DEFAULT==FEC_AUTO ? _(" (default)") : ""), + (HP_CODERATE_DEFAULT==FEC_1_2 ? _(" (default)") : ""), + (HP_CODERATE_DEFAULT==FEC_2_3 ? _(" (default)") : ""), + (HP_CODERATE_DEFAULT==FEC_3_4 ? _(" (default)") : ""), + (HP_CODERATE_DEFAULT==FEC_5_6 ? _(" (default)") : ""), + (HP_CODERATE_DEFAULT==FEC_7_8 ? _(" (default)") : "")); + fprintf(fp,_("-bw N DVB-T bandwidth (Mhz) - N=6%s, 7%s or 8%s\n"), + (BANDWIDTH_DEFAULT==BANDWIDTH_6_MHZ ? _(" (default)") : ""), + (BANDWIDTH_DEFAULT==BANDWIDTH_7_MHZ ? _(" (default)") : ""), + (BANDWIDTH_DEFAULT==BANDWIDTH_8_MHZ ? _(" (default)") : "")); + fprintf(fp,_("-tm N DVB-T transmission mode - N=2%s or 8%s\n"), + (TRANSMISSION_MODE_DEFAULT==TRANSMISSION_MODE_2K ? _(" (default)") : ""), + (TRANSMISSION_MODE_DEFAULT==TRANSMISSION_MODE_8K ? _(" (default)") : "")); + + fprintf(fp,_("-x Attempt to auto-find other transponders (experimental - DVB-S only)\n")); + fprintf(fp,_("-m Monitor the reception quality\n")); + fprintf(fp,_("-n dpid Add network interface and receive MPE on PID dpid\n")); + fprintf(fp,"\n"); + + exit (was_error); +} + +void version (void) +{ + printf (_("dvbtune %s\n"), VERSION); + exit (0); +} + int main(int argc, char **argv) { int fd_frontend=0; @@ -1093,34 +1167,7 @@ int i; if (argc==1) { - fprintf(stderr,"Usage: dvbtune [OPTIONS]\n\n"); - fprintf(stderr,"Standard options:\n\n"); - fprintf(stderr,"-f freq absolute Frequency (DVB-S in Hz or DVB-T in Hz)\n"); - fprintf(stderr," or L-band Frequency (DVB-S in Hz or DVB-T in Hz)\n"); - fprintf(stderr,"-p [H,V] Polarity (DVB-S only)\n"); - fprintf(stderr,"-s N Symbol rate (DVB-S or DVB-C)\n"); - fprintf(stderr,"-v vpid Decode video PID (full cards only)\n"); - fprintf(stderr,"-a apid Decode audio PID (full cards only)\n"); - fprintf(stderr,"-t ttpid Decode teletext PID (full cards only)\n"); - fprintf(stderr,"-pnr N Tune to Program Number (aka service) N\n\n"); - fprintf(stderr,"-i Dump SI information as XML\n"); - - fprintf(stderr,"\nAdvanced tuning options:\n\n"); - fprintf(stderr,"-c [0-3] Use DVB card #[0-3]\n"); - fprintf(stderr,"-tone [0|1] 0=22kHz off, 1=22kHz on\n"); - fprintf(stderr,"-I [0|1|2] 0=Spectrum Inversion off, 1=Spectrum Inversion on, 2=auto\n"); - fprintf(stderr,"-D [0-4] DiSEqC command (0=none)\n\n"); - fprintf(stderr,"-qam X DVB-T modulation - 16%s, 32%s, 64%s, 128%s or 256%s\n",(CONSTELLATION_DEFAULT==QAM_16 ? " (default)" : ""),(CONSTELLATION_DEFAULT==QAM_32 ? " (default)" : ""),(CONSTELLATION_DEFAULT==QAM_64 ? " (default)" : ""),(CONSTELLATION_DEFAULT==QAM_128 ? " (default)" : ""),(CONSTELLATION_DEFAULT==QAM_256 ? " (default)" : "")); - fprintf(stderr,"-gi N DVB-T guard interval 1_N (N=32%s, 16%s, 8%s or 4%s)\n",(GUARD_INTERVAL_DEFAULT==GUARD_INTERVAL_1_32 ? " (default)" : ""),(GUARD_INTERVAL_DEFAULT==GUARD_INTERVAL_1_16 ? " (default)" : ""),(GUARD_INTERVAL_DEFAULT==GUARD_INTERVAL_1_8 ? " (default)" : ""),(GUARD_INTERVAL_DEFAULT==GUARD_INTERVAL_1_4 ? " (default)" : "")); - fprintf(stderr,"-cr N DVB-T code rate. N=AUTO%s, 1_2%s, 2_3%s, 3_4%s, 5_6%s, 7_8%s\n",(HP_CODERATE_DEFAULT==FEC_AUTO ? " (default)" : ""),(HP_CODERATE_DEFAULT==FEC_1_2 ? " (default)" : ""),(HP_CODERATE_DEFAULT==FEC_2_3 ? " (default)" : ""),(HP_CODERATE_DEFAULT==FEC_3_4 ? " (default)" : ""),(HP_CODERATE_DEFAULT==FEC_5_6 ? " (default)" : ""),(HP_CODERATE_DEFAULT==FEC_7_8 ? " (default)" : "")); - fprintf(stderr,"-bw N DVB-T bandwidth (Mhz) - N=6%s, 7%s or 8%s\n",(BANDWIDTH_DEFAULT==BANDWIDTH_6_MHZ ? " (default)" : ""),(BANDWIDTH_DEFAULT==BANDWIDTH_7_MHZ ? " (default)" : ""),(BANDWIDTH_DEFAULT==BANDWIDTH_8_MHZ ? " (default)" : "")); - fprintf(stderr,"-tm N DVB-T transmission mode - N=2%s or 8%s\n",(TRANSMISSION_MODE_DEFAULT==TRANSMISSION_MODE_2K ? " (default)" : ""),(TRANSMISSION_MODE_DEFAULT==TRANSMISSION_MODE_8K ? " (default)" : "")); - - fprintf(stderr,"-x Attempt to auto-find other transponders (experimental - DVB-S only)\n"); - fprintf(stderr,"-m Monitor the reception quality\n"); - fprintf(stderr,"-n dpid Add network interface and receive MPE on PID dpid\n"); - fprintf(stderr,"\n"); - return(-1); + usage(1); /* and exit */ } else { count=0; for (i=1;i 3)) { - fprintf(stderr,"card must be between 0 and 3\n"); + fprintf(stderr,_("card must be between 0 and 3\n")); exit(-1); } } else if (strcmp(argv[i],"-x")==0) { // @@ -1181,7 +1228,7 @@ case 128: modulation=QAM_128; break; case 256: modulation=QAM_256; break; default: - fprintf(stderr,"Invalid QAM rate: %s\n",argv[i]); + fprintf(stderr,_("Invalid QAM rate: %s\n"),argv[i]); exit(0); } } else if (strcmp(argv[i],"-gi")==0) { @@ -1192,8 +1239,8 @@ case 8: guardInterval=GUARD_INTERVAL_1_8; break; case 4: guardInterval=GUARD_INTERVAL_1_4; break; default: - fprintf(stderr,"Invalid Guard Interval: %s\n",argv[i]); - exit(0); + fprintf(stderr,_("Invalid Guard Interval: %s\n"),argv[i]); + exit(1); } } else if (strcmp(argv[i],"-tm")==0) { i++; @@ -1201,8 +1248,8 @@ case 8: TransmissionMode=TRANSMISSION_MODE_8K; break; case 2: TransmissionMode=TRANSMISSION_MODE_2K; break; default: - fprintf(stderr,"Invalid Transmission Mode: %s\n",argv[i]); - exit(0); + fprintf(stderr,_("Invalid Transmission Mode: %s\n"),argv[i]); + exit(1); } } else if (strcmp(argv[i],"-bw")==0) { i++; @@ -1211,8 +1258,8 @@ case 7: bandWidth=BANDWIDTH_7_MHZ; break; case 6: bandWidth=BANDWIDTH_6_MHZ; break; default: - fprintf(stderr,"Invalid DVB-T bandwidth: %s\n",argv[i]); - exit(0); + fprintf(stderr,_("Invalid DVB-T bandwidth: %s\n"),argv[i]); + exit(1); } } else if (strcmp(argv[i],"-cr")==0) { i++; @@ -1229,14 +1276,14 @@ } else if (!strcmp(argv[i],"7_8")) { HP_CodeRate=FEC_7_8; } else { - fprintf(stderr,"Invalid Code Rate: %s\n",argv[i]); - exit(0); + fprintf(stderr,_("Invalid Code Rate: %s\n"),argv[i]); + exit(1); } } else if (strcmp(argv[i],"-D")==0) { i++; diseqc=atoi(argv[i]); if (diseqc > 4) { - fprintf(stderr,"DiSEqC must be between 0 and 4\n"); + fprintf(stderr,_("DiSEqC must be between 0 and 4\n")); exit(-1); } } else if (strcmp(argv[i],"-tone")==0) { @@ -1253,6 +1300,11 @@ specInv = INVERSION_ON; else specInv = INVERSION_AUTO; + } else if ((strcmp(argv[i],"--help") == 0) || + (strcmp(argv[i],"-h") == 0)) { + usage (0); + } else if (strcmp(argv[i],"--version") == 0) { + version (); } } } @@ -1265,14 +1317,14 @@ #endif if((fd_dvr = open(dvrdev[card],O_RDONLY|O_NONBLOCK)) < 0){ - fprintf(stderr,"FD %d: ",i); - perror("fd_dvr DEMUX DEVICE: "); + fprintf(stderr,_("FD %d: "),i); + perror(_("fd_dvr DEMUX DEVICE: ")); return -1; } if((fd_frontend = open(frontenddev[card],O_RDWR)) < 0){ - fprintf(stderr,"frontend: %d",i); - perror("FRONTEND DEVICE: "); + fprintf(stderr,_("frontend: %d"),i); + perror(_("FRONTEND DEVICE: ")); return -1; } @@ -1280,45 +1332,45 @@ /* Only open sec for DVB-S tuning */ if (freq<100000000) { if((fd_sec = open(secdev[card],O_RDWR)) < 0) { - fprintf(stderr,"FD %i: ",i); - perror("SEC DEVICE (warning) "); + fprintf(stderr,_("FD %i: "),i); + perror(_("SEC DEVICE (warning) ")); } } #endif if((fd_demuxrec = open(demuxdev[card],O_RDWR|O_NONBLOCK)) < 0){ - fprintf(stderr,"FD %i: ",i); - perror("DEMUX DEVICE: "); + fprintf(stderr,_("FD %i: "),i); + perror(_("DEMUX DEVICE: ")); return -1; } if((fd_demuxv = open(demuxdev[card],O_RDWR)) < 0){ - fprintf(stderr,"FD %i: ",i); - perror("DEMUX DEVICE: "); + fprintf(stderr,_("FD %i: "),i); + perror(_("DEMUX DEVICE: ")); return -1; } if((fd_demuxa = open(demuxdev[card],O_RDWR)) < 0){ - fprintf(stderr,"FD %i: ",i); - perror("DEMUX DEVICE: "); + fprintf(stderr,_("FD %i: "),i); + perror(_("DEMUX DEVICE: ")); return -1; } if((fd_demuxtt = open(demuxdev[card],O_RDWR)) < 0){ - fprintf(stderr,"FD %i: ",i); - perror("DEMUX DEVICE: "); + fprintf(stderr,_("FD %i: "),i); + perror(_("DEMUX DEVICE: ")); return -1; } if((fd_demuxd = open(demuxdev[card],O_RDWR)) < 0){ - fprintf(stderr,"FD %i: ",i); - perror("DEMUX DEVICE: "); + fprintf(stderr,_("FD %i: "),i); + perror(_("DEMUX DEVICE: ")); return -1; } if((fd_demuxsi = open(demuxdev[card],O_RDWR|O_NONBLOCK)) < 0){ - fprintf(stderr,"FD %i: ",i); - perror("DEMUX DEVICE: "); + fprintf(stderr,_("FD %i: "),i); + perror(_("DEMUX DEVICE: ")); return -1; } @@ -1339,7 +1391,7 @@ scan_nit(0x41); /* Get initial list of transponders */ while ((t=get_unscanned(transponders))!=NULL) { free_pat_list(); - fprintf(stderr,"Scanning %d%c %d\n",t->freq,t->pol,t->srate); + fprintf(stderr,_("Scanning %d%c %d\n"),t->freq,t->pol,t->srate); tune_it(fd_frontend,fd_sec,t->freq,t->srate,t->pol,tone,specInv,0,modulation,HP_CodeRate,TransmissionMode,guardInterval,bandWidth); printf("\n",t->id,t->onid,t->freq,t->srate,t->pos,t->we_flag,t->pol,t->mod); t->scanned=1; @@ -1373,7 +1425,7 @@ set_vpid(vpid); set_apid(apid); set_ttpid(ttpid); - fprintf(stderr,"A/V/TT Filters set\n"); + fprintf(stderr,_("A/V/TT Filters set\n")); } if (dpid > 0) { @@ -1392,7 +1444,7 @@ #endif //printf("Trying to open %s\n",devnamen); if((fdn = open(devnamen,O_RDWR|O_NONBLOCK)) < 0) { - fprintf(stderr, "Failed to open DVB NET DEVICE"); + fprintf(stderr, _("Failed to open DVB NET DEVICE")); close(fd_frontend); if (fd_sec) close(fd_sec); } else { @@ -1400,7 +1452,7 @@ ioctl( fdn,NET_ADD_IF,&netif); close (fdn); - printf("Successfully opened network device, please configure the dvb interface\n"); + printf(_("Successfully opened network device, please configure the dvb interface\n")); } } @@ -1409,8 +1461,8 @@ fe_status_t festatus; if((fd_frontend = open(frontenddev[card],O_RDONLY)) < 0){ - fprintf(stderr,"frontend: %d",i); - perror("FRONTEND DEVICE: "); + fprintf(stderr,_("frontend: %d"),i); + perror(_("FRONTEND DEVICE: ")); return -1; } @@ -1422,7 +1474,7 @@ FEReadSNR(fd_frontend, &snr); FEReadUncorrectedBlocks(fd_frontend, &uncorr); ioctl(fd_frontend,FE_READ_STATUS,&festatus); - fprintf(stderr,"Signal=%d, Verror=%d, SNR=%ddB, BlockErrors=%d, (", strength, ber, snr, uncorr); + fprintf(stderr,_("Signal=%d, Verror=%d, SNR=%ddB, BlockErrors=%d, ("), strength, ber, snr, uncorr); #ifndef NEWSTRUCT if (festatus & FE_HAS_POWER) fprintf(stderr,"P|"); if (festatus & FE_SPECTRUM_INV) fprintf(stderr,"I|"); diff -ruN dvbtune-0.5-old/Makefile dvbtune-0.5/Makefile --- dvbtune-0.5-old/Makefile 2002-10-12 12:59:31.000000000 +0100 +++ dvbtune-0.5/Makefile 2004-02-15 08:37:04.000000000 +0000 @@ -1,5 +1,5 @@ INCS=-I /usr/include/libxml2 -CFLAGS= -Wall $(INCS) +CFLAGS= -Wall $(INCS) -DVERSION=\"$(VERSION)\" CC=gcc all: dvbtune @@ -37,3 +37,8 @@ clean: rm -f *.o *~ dvbtune xml2vdr + +install: xml2vdr dvbtune + mkdir -p $(DESTDIR)/usr/bin + cp dvbtune $(DESTDIR)/usr/bin/dvbtune + cp xml2vdr $(DESTDIR)/usr/bin/xml2vdr diff -ruN dvbtune-0.5-old/xml2vdr.c dvbtune-0.5/xml2vdr.c --- dvbtune-0.5-old/xml2vdr.c 2003-10-09 19:09:08.000000000 +0100 +++ dvbtune-0.5/xml2vdr.c 2004-02-15 08:37:04.000000000 +0000 @@ -27,6 +27,18 @@ #include #include +#ifdef I18N +#include +#include +#define _(X) gettext(X) +#else /* Null Ops */ +#define LC_ALL 1 +#define textdomain(X) do {} while (0) +#define _(X) (X) +#define setlocale(X,Y) do {} while (0) +#endif + + /* This structure isn't used - it could be used to check the validity of the file. */ typedef enum { @@ -326,23 +338,49 @@ 0 /* fatalError */ }; +void usage (int was_error) +{ + FILE *f = was_error ? stderr : stdout; + + fprintf (f, _("Usage: xml2vdr [-fta] filename.xmlsat \n")); + exit (was_error); +} + +void version (void) +{ + printf (_("xml2vdr (dvbstream) %s\n"), VERSION); + exit (0); +} + int main(int argc, char **argv) { xmlParserCtxtPtr ctxt; xmlsatParseState state; - if (argc<2) { - printf("Usage: %s [-fta] filename.xmlsat\n",argv[0]); + setlocale (LC_ALL, NULL); + textdomain ("dvbstream"); + + if ((argc<2) || (argc>3)) { + usage(1); /* and exit */ + printf(_("Usage: %s [-fta] filename.xmlsat\n"),argv[0]); } else { if (argc==2) { + if (strcmp(argv[1],"--version")==0) { + version(); /* and exit */ + } + if (strcmp(argv[1],"--help")==0) { + usage(0); /* and exit */ + } ctxt = (xmlParserCtxtPtr)xmlCreateFileParserCtxt(argv[1]); } else if (argc==3) { if (strcmp(argv[1],"-fta")==0) { fta=1; - } + } else + usage(1); ctxt = (xmlParserCtxtPtr)xmlCreateFileParserCtxt(argv[2]); } if (ctxt == NULL) { - fprintf(stderr,"ERROR: can not open file\n"); + fprintf(stderr,_("ERROR: can not open file %s\n"), argv[2]); + exit(2); } ctxt->sax = &xmlsatSAXParser; debian/source/0002755000000000000000000000000011771203370010471 5ustar debian/source/format0000644000000000000000000000001411771203022011667 0ustar 3.0 (quilt) debian/copyright0000644000000000000000000000217311771201313011120 0ustar This package was debianized by Alastair McKinstry on Thu, 9 May 2002 10:50:42 +0100. It was downloaded from http://www.linuxstb.org Upstream Author: Dave Chapman Copyright: Copyright (C) Dave Chapman 2001-2004 Copyright (C) Hilmar Linder 2002 License: 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 package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL'. debian/ChangeLog.upstream0000644000000000000000000000123711771201313012576 0ustar 2002-03-17 Dave Chapman * Release 0.3 This version of dvbtune fixes the DVB-T support which was broken in version 0.2, plus also includes other fixes and Diseqc support. 2002-01-25 Dave Chapman * Release 0.2 This version of dvbtune was contributed by Hilmar Linder and includes support for setting up IP over dvb. 2001-11-24 Dave Chapman * Release 0.1 dvbtune supports dvb-S and dvb-T cards and allows command-line tuning. A major feature is the ability to dump the DVB Service Information to an XML file. A utility is included to convert these XML files into VDR's channels.conf format. debian/rules0000755000000000000000000000105611771202260010246 0ustar #!/usr/bin/make -f VERSION=0.5 %: dh $@ override_dh_auto_build: dh_testdir $(MAKE) VERSION=$(VERSION) $(MAKE) VERSION=$(VERSION) xml2vdr #rm -rf $(BUILD_DIR)/scripts/CVS docbook-to-man debian/dvbtune.sgml > dvbtune.1 docbook-to-man debian/xml2vdr.sgml > xml2vdr.1 override_dh_installexamples: dh_installexamples scripts/* override_dh_installman: dh_installman dvbtune.1 xml2vdr.1 override_dh_installchangelogs: cp debian/ChangeLog.upstream ChangeLog dh_installchangelogs ChangeLog override_dh_clean: dh_clean ChangeLog dvbtune.1 xml2vdr.1 debian/TODO0000644000000000000000000000012611771201313007651 0ustar - Ensure it works with devfs-only systems - Add the usual --help, --version options debian/compat0000644000000000000000000000000211771201313010360 0ustar 8 debian/watch0000644000000000000000000000013711771201313010214 0ustar version=3 opts=dversionmangle=s/\+cvs.*|\.ds//g \ http://sf.net/dvbtools/dvbtune-(.*)\.tar\.gz debian/xml2vdr.sgml0000644000000000000000000000760211771201313011451 0ustar manpage.1'. You may view the manual page with: `docbook-to-man manpage.sgml | nroff -man | less'. A typical entry in a Makefile or Makefile.am is: manpage.1: manpage.sgml docbook-to-man $< > $@ The docbook-to-man binary is found in the docbook-to-man package. Please remember that if you create the nroff version in one of the debian/rules file targets (such as build), you will need to include docbook-to-man in your Build-Depends control field. --> Alastair"> McKinstry"> July 17, 2002"> 1"> mckinstry@computer.org"> XML2VDR"> Debian"> GNU"> ]>
&dhemail;
&dhfirstname; &dhsurname; 2002 &dhusername; &dhdate;
&dhucpackage; &dhsection; &dhpackage; Convert XML DVB-SI files to a VDR channel list &dhpackage; filename.xmlstat DESCRIPTION &dhpackage; is a simple utility to convert XML DVB-SI files into a channel list for VDR. You can get DVB-SI output for a satellite by using dvbtune: dvbtune -i will generate the appropriate XML output to standard output. OPTIONS The following options are understood by xml2vdr: --help Print help message --version Print version string SEE ALSO dvbtune(1), vdr(1), szap(1). AUTHOR &dhpackage; was written by Dave Chapman dave@dchapman.org. This manual page was written by &dhusername; &dhemail; for the &debian; system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts.
debian/changelog0000644000000000000000000001207011771203240011035 0ustar dvbtune (0.5.ds-1) unstable; urgency=low [ Cyril Brulebois ] * Switch to upstream tarball, using “ds” for “debian source” as a suffix since dak wouldn't appreciate different tarballs having the same name. * debian/watch: mangle “\.ds” accordingly, kill the uupdate call. * Switch to dh (bump debhelper build-dep/compat to 8), with quilt. * Rewrite debian/rules accordingly. * Add ${misc:Depends} to Depends, thanks to lintian. * Reverse makedev|udev order in Depends (Closes: #546864). * Finally drop the dbs build-dep, since debhelper and quilt just do the job (Closes: #576040). [ Mark Purcell ] * Thanks KiBi * Update Maintainer: Vcs-Svn: pkg-vdr-dvb team' * '3.0 (quilt)' >> debian/source/format - drop quilt Build-Depends * drop /sbin/ command-with-path-in-maintainer-script (/sbin/MAKEDEV) * Update to Standards 3.9.3 - no further changes -- Mark Purcell Sat, 23 Jun 2012 09:57:29 +1000 dvbtune (0.5-12) unstable; urgency=low * Update debian/watch - fixes debian-watch-file-missing-version - debian/watch fails to report upstream's version (Closes: #449791) * Add debin/compat - fixes debian-rules-sets-DH_COMPAT * Update debian/copyright - fixes copyright-without-copyright-notice * Update -tone in dvbtune.sgml - (Closes: #403679: dvbtune: Error in manpage (incorrect option)!! * Add Homepage: to debian/control -- Mark Purcell Sun, 28 Sep 2008 12:28:11 +1000 dvbtune (0.5-11) unstable; urgency=low * New maintainer. (Closes: #412476: ITA: dvbtune -- Simple tuning application for DVB cards - Debian Bug report logs) * Thanks to Alastair McKinstry for maintenance todate -- Mark Purcell Tue, 13 Mar 2007 22:16:56 +0000 dvbtune (0.5-10) unstable; urgency=low * New maintainer. (Closes: #412476: ITA: dvbtune -- Simple tuning application for DVB cards - Debian Bug report logs) * Thanks to Alastair McKinstry for maintenance todate -- Mark Purcell Tue, 13 Mar 2007 21:02:29 +0000 dvbtune (0.5-9) unstable; urgency=medium * Try harder to delete erroneous /dvb; don't fail if we can't. Closes: #392968. -- Alastair McKinstry Tue, 17 Oct 2006 22:07:16 +0100 dvbtune (0.5-8) unstable; urgency=low * Remove obsolete Depends: on devfsd. -- Alastair McKinstry Tue, 12 Sep 2006 16:59:46 +0100 dvbtune (0.5-7) unstable; urgency=low * postinst: delete erroneous /dvb directory that may be created during sarge installs. Closes: #339373. * Inversion should be set to INVERSION_AUTO in tune.c. Closes: #351918. * Move to DH_COMPAT=5, Standards-Version: 3.7.2. No changes required. -- Alastair McKinstry Mon, 11 Sep 2006 16:04:57 +0100 dvbtune (0.5-6) unstable; urgency=low * Change dvb-dev Build-Depends to linux-kernel-headers to fic FTBFS. Closes: #359694. * Move to DH_COMPAT=4, No changes required. -- Alastair McKinstry Tue, 28 Mar 2006 20:29:47 +0100 dvbtune (0.5-5) unstable; urgency=low * Ensure /sbin/MAKEDEV is run in /dev. Closes: #330373 * Move to Standards-Version: 3.6.2. No changes required. -- Alastair McKinstry Tue, 27 Sep 2005 21:12:33 +0100 dvbtune (0.5-4) unstable; urgency=low * Fix makedev version to >= 2.3.1. Closes: #247794. -- Alastair McKinstry Sat, 15 May 2004 22:13:57 +0100 dvbtune (0.5-3) unstable; urgency=low * Requires makedev >s=> 2.3.1-69. Closes: #246636. -- Alastair McKinstry Sun, 2 May 2004 20:00:08 +0100 dvbtune (0.5-2) unstable; urgency=low * postinst: Create dvb device nodes on install if necessary. Recommend makedev | udev | devfsd to ensure presence. Closes: #242567. -- Alastair McKinstry Tue, 13 Apr 2004 22:03:02 +0100 dvbtune (0.5-1) unstable; urgency=low * New upstream release. -- Alastair McKinstry Sun, 15 Feb 2004 08:44:08 +0000 dvbtune (0.3+cvs20030922-2) unstable; urgency=low * Added Build-Depends: dbs. Closes: #213114. -- Alastair McKinstry Sun, 28 Sep 2003 19:07:52 +0100 dvbtune (0.3+cvs20030922-1) unstable; urgency=low * New upstream version; build using dbs. CVS snapshot used to move to dvb-dev >= 1.0. * Move to Standards-Version: 3.6.1. No changes required. -- Alastair McKinstry Thu, 25 Sep 2003 20:38:40 +0000 dvbtune (0.3-3) unstable; urgency=low * Change maintainer email to mckinstry@debian.org. * Move to Standards-Version: 3.6.0. No changes required. -- Alastair McKinstry Wed, 30 Jul 2003 13:03:58 +0100 dvbtune (0.3-2) unstable; urgency=low * Add Build-depends on docbook-to-man, included header file string.h. Closes: #155470. * Programs now implement --version, --help. -- Alastair McKinstry Wed, 7 Aug 2002 12:32:42 +0200 dvbtune (0.3-1) unstable; urgency=low * Initial Release. Closes: #152083. -- Alastair McKinstry Thu, 4 July 2002 11:07:32 +0100 debian/postinst0000644000000000000000000000120311771202472010773 0ustar #!/bin/sh set -e # # Rely on makedev to Do The Right Thing and not stomp on devfsd, udeb # if [ -e /sbin/MAKEDEV ] then ( cd /dev && MAKEDEV dvb ) fi # Delete erroneous /dvb that may have been created due to #330373 if [ -e /dvb ] ; then set +e echo -n "Incorrect directory /dvb found; attempting to delete it ..." # Try Hard. find /dvb -type c -exec rm {} 2> /dev/null \; find /dvb -type d -exec rmdir {} 2> /dev/null \; rm -rf /dvb 2> /dev/null set -e if [ -e /dvb ]; then echo "" echo "/dvb could not be deleted. User files may be present." echo "Please delete /dvb by hand." else echo " done." fi fi #DEBHELPER# debian/dvbtune.sgml0000644000000000000000000002023711771201313011521 0ustar manpage.1'. You may view the manual page with: `docbook-to-man manpage.sgml | nroff -man | less'. A typical entry in a Makefile or Makefile.am is: manpage.1: manpage.sgml docbook-to-man $< > $@ The docbook-to-man binary is found in the docbook-to-man package. Please remember that if you create the nroff version in one of the debian/rules file targets (such as build), you will need to include docbook-to-man in your Build-Depends control field. --> Alastair"> McKinstry"> May 9, 2002"> 1"> mckinstry@computer.org"> DVBTUNE"> Debian"> GNU"> ]>
&dhemail;
&dhfirstname; &dhsurname; 2002 &dhusername; &dhdate;
&dhucpackage; &dhsection; &dhpackage; command-line tuning application for DVB cards &dhpackage; -f frequency -p h|v -s symbol_rate -v vpid -a apid -t tpid DESCRIPTION &dhpackage; is a simple tuning application for DVB cards supported by the Linux DVB driver (www.linuxtv.org). This is still very experimental - especially the XML output. The latest version can be found at www.linuxstb.org. You can contact the author at dave@dchapman.com. OPTIONS The following options are understood by dvbtune: -c [0-3] Use DVB device [0-3] -f freq Absolute Frequency (DVB-S in Hz or DVB-T in Hz), or L-band Frequency (DVB-S in Hz or DVB-T in Hz). -p [H|V] Polarity (DVB-S only) -tone [0|1] 0 = 22 kHz off, 1 = 22 kHz on -I [0|1|2] 0 = Spectrum Inversion off 1 = Spectrum Inversion on, 2 = auto (Default) -S N Symbol rate (DVB-S only),e.g. 27500 -D [0-4] DiSEqc ("Digital Satellite Equipment Control") command (0=none) -V vpid Set video PID (Full cards only) -A apid Set audio PID (full cards only) -T ttpid Set teletext PID (full cards only) -pnr N Tune to Program Number (aka service) N -i Dump SI information as XML -x Attempt to auto-find other transponders (experimental) -m Monitor the reception quality -n dpid Add network interface and receive MPE on PID dpid --help Print help message --version Print version string EXAMPLES For simple tuning, you can just use dvbtune -f 12188000 -p h -s 27500 -v 163 -a 104 -t 32 to tune to a satellite transponder and set the video, audio and teletext PIDs. dvbtune can also support DVB-T reception (currently for the UK only). In this case, you just need to specify the frequency: dvbtune -f 48183300 To get the DVB SI information for a multiplex, you can use the option. The output of dvbtune needs some addition lines before it is a valid XML file. To get the DVB SI information for a multiplex, you can use the "-i" option. The output of dvbtune needs some addition lines before it is a valid XML file. e.g. use a script containing echo '<?xml version="1.0"?>' > test.xml ; echo '<satellite>' >> test.xml ; dvbtune -f freq -s srate -p pol -i >> test.xml ; echo '</satellite>' >> test.xml to dump the SI for a satellite transponder. This was done to allow you to write scripts to scan multiple transponders and write the output to the same XML file. See the "scripts" subdirectory for examples. NOTES dvbtune depends on the appropriate device nodes in /dev being present. These are either provided automatically by devfsd or udev, or must be made using /sbin/MAKEDEV dvb. The Debian package automatically runs MAKEDEV if necessary on install. SEE ALSO xml2vdr (1), szap (1). AUTHOR &dhpackage; was written by Dave Chapman dave@dchapman.org. Hilmar Linder added the Switch -n that adds a network interface and switch -m that monitors the reception quality. Changed the tuning code. Added command line parameters for spectral inversion. Changed code to allow L-Band frequencies with -f switch. John Williams Added -D diseqc support, and made the 22kHz tone automatic again. This manual page was written by &dhusername; &dhemail; for the &debian; system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts.