@@ -35,7 +35,7 @@ struct dvb_entry {
char *location;
-// enum dvbsat_polarization pol;
+ enum dvb_sat_polarization pol;
int sat_number;
unsigned freq_bpf;
unsigned diseqc_wait;
@@ -428,16 +428,15 @@ static int fill_entry(struct dvb_entry *entry, char *key, char *value)
is_video = 1;
else if (!strcasecmp(key, "AUDIO_PID"))
is_audio = 1;
- /*else if (!strcasecmp(key, "POLARIZATION")) {
- entry->service_id = atol(value);
- for (j = 0; ARRAY_SIZE(pol_name); j++)
- if (!strcasecmp(value, pol_name[j]))
+ else if (!strcasecmp(key, "POLARIZATION")) {
+ for (j = 0; ARRAY_SIZE(dvb_sat_pol_name); j++)
+ if (!strcasecmp(value, dvb_sat_pol_name[j]))
break;
- if (j == ARRAY_SIZE(pol_name))
+ if (j == ARRAY_SIZE(dvb_sat_pol_name))
return -2;
entry->pol = j;
return 0;
- }*/ else if (!strncasecmp(key,"PID_", 4)){
+ } else if (!strncasecmp(key,"PID_", 4)){
type = strtol(&key[4], NULL, 16);
if (!type)
return 0;
@@ -647,10 +646,10 @@ int write_dvb_file(const char *fname, struct dvb_file *dvb_file)
fprintf(fp, "\n");
}
- /*if (entry->pol != POLARIZATION_OFF) {*/
- /*fprintf(fp, "\tPOLARIZATION = %s\n",*/
- /*pol_name[entry->pol]);*/
- /*}*/
+ if (entry->pol != POLARIZATION_OFF) {
+ fprintf(fp, "\tPOLARIZATION = %s\n",
+ dvb_sat_pol_name[entry->pol]);
+ }
if (entry->sat_number >= 0) {
fprintf(fp, "\tSAT_NUMBER = %d\n",
This patch add parsing support for the POLARIZATION parameter for the DVBv5 file format. Signed-off-by: Guy Martin <gmsoft@tuxicoman.be>