Update of /cvsroot/dvbtools/dvbtune
In directory usw-pr-cvs1:/tmp/cvs-serv28079
Modified Files:
dvbtune.c xml2vdr.c
Log Message:
fixed xml bugs
Index: dvbtune.c
===================================================================
RCS file: /cvsroot/dvbtools/dvbtune/dvbtune.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** dvbtune.c 15 May 2002 16:43:30 -0000 1.1.1.1
--- dvbtune.c 12 Jun 2002 21:48:39 -0000 1.2
***************
*** 3,7 ****
dvbtune - a program for tuning DVB TV and Radio channels.
! Initial transponders:
Astra 28E:
--- 3,7 ----
dvbtune - a program for tuning DVB TV and Radio channels.
! Initial transponders for "-x" option:
Astra 28E:
***************
*** 439,442 ****
--- 439,445 ----
printf("ecm_pid=\"0x%04x\" ecm_id=\"0x%04x\"/>\n",pid,id);
}
+ break;
+ default:
+ printf(" />\n");
break;
}
Index: xml2vdr.c
===================================================================
RCS file: /cvsroot/dvbtools/dvbtune/xml2vdr.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** xml2vdr.c 15 May 2002 16:43:34 -0000 1.1.1.1
--- xml2vdr.c 12 Jun 2002 21:48:39 -0000 1.2
***************
*** 60,63 ****
--- 60,64 ----
int canal_radio_id;
int in_audio_stream=0;
+ int fta=0;
/* A hack to clean text strings - it breaks on non-UK character sets */
***************
*** 158,162 ****
in_audio_stream=1;
}
! } else if (strcmp(name,"ca_descriptor")==0) {
ca=1;
for (i=0;attrs[i]!=NULL;i+=2) {
--- 159,163 ----
in_audio_stream=1;
}
! } else if (strcmp(name,"ca_system_descriptor")==0) {
ca=1;
for (i=0;attrs[i]!=NULL;i+=2) {
***************
*** 218,222 ****
} else if (strcmp(name,"canal_radio")==0) {
// if (ca==0) printf("%s:RADIO:%s:%d:%c:%d:%d:%d:%d:%d:%d:%d\n",provider_name,service_name,freq,pol,diseqc,srate,vpid,apid[0],tpid,ca,pnr);
! if (ca==0) printf("%s (RADIO):%d:%c:%d:%d:%d:%d:%d:%d:%d\n",service_name,freq,pol,diseqc,srate,vpid,apid[0],tpid,ca,pnr);
n_apids=0;
n_ca=0;
--- 219,223 ----
} else if (strcmp(name,"canal_radio")==0) {
// if (ca==0) printf("%s:RADIO:%s:%d:%c:%d:%d:%d:%d:%d:%d:%d\n",provider_name,service_name,freq,pol,diseqc,srate,vpid,apid[0],tpid,ca,pnr);
! if ((ca==0) || (fta==0)) printf("%s (RADIO):%d:%c:%d:%d:%d:%d:%d:%d:%d\n",service_name,freq,pol,diseqc,srate,vpid,apid[0],tpid,ca,pnr);
n_apids=0;
n_ca=0;
***************
*** 226,230 ****
if ((ignore_service==0) && ((type==1) || (type==2))) { // TV or Radio
/* Only print service if at least 1 PID is non-zero */
! if ((vpid!=0) || (n_apids>0) || (tpid!=0)) {
// printf("%s:%s:%s:%d:%c:%d:%d:%d:",provider_name,((vpid==0) ? "RADIO" : "TV"),service_name,freq,pol,diseqc,srate,vpid);
printf("%s (%s):%d:%c:%d:%d:%d:",service_name,((vpid==0) ? "RADIO" : "TV"),freq,pol,diseqc,srate,vpid);
--- 227,231 ----
if ((ignore_service==0) && ((type==1) || (type==2))) { // TV or Radio
/* Only print service if at least 1 PID is non-zero */
! if (((ca==0) || (fta==0)) && (((vpid!=0) || (n_apids>0) || (tpid!=0)))) {
// printf("%s:%s:%s:%d:%c:%d:%d:%d:",provider_name,((vpid==0) ? "RADIO" : "TV"),service_name,freq,pol,diseqc,srate,vpid);
printf("%s (%s):%d:%c:%d:%d:%d:",service_name,((vpid==0) ? "RADIO" : "TV"),freq,pol,diseqc,srate,vpid);
***************
*** 250,258 ****
}
}
! if (n_ca==0) {
printf(":0");
} else {
printf(":1");
- // printf(":%d:",tpid);
// for (i=0;i<n_ca;i++) {
// if (i>0) printf(",");
--- 251,259 ----
}
}
! printf(":%d",tpid);
! if (ca==0) {
printf(":0");
} else {
printf(":1");
// for (i=0;i<n_ca;i++) {
// if (i>0) printf(",");
***************
*** 331,338 ****
xmlsatParseState state;
! if (argc!=2) {
! printf("Usage: %s filename.xmlsat\n",argv[0]);
} else {
! ctxt = (xmlParserCtxtPtr)xmlCreateFileParserCtxt(argv[1]);
if (ctxt == NULL) {
fprintf(stderr,"ERROR: can not open file\n");
--- 332,346 ----
xmlsatParseState state;
! if (argc<2) {
! printf("Usage: %s [-fta] filename.xmlsat\n",argv[0]);
} else {
! if (argc==2) {
! ctxt = (xmlParserCtxtPtr)xmlCreateFileParserCtxt(argv[1]);
! } else if (argc==3) {
! if (strcmp(argv[1],"-fta")==0) {
! fta=1;
! }
! ctxt = (xmlParserCtxtPtr)xmlCreateFileParserCtxt(argv[2]);
! }
if (ctxt == NULL) {
fprintf(stderr,"ERROR: can not open file\n");
|