dvbsrc: move ISDB-T bandwidth check to _is_valid_bandwidth()

Allows test to be used for delivery system auto-detection.

Additionally, add 0 (auto) as valid value.
This commit is contained in:
Reynaldo H. Verdejo Pinochet 2016-05-17 14:33:04 -07:00
parent ae060943a8
commit 1d9adb14dc

View file

@ -2137,6 +2137,10 @@ gst_dvbsrc_is_valid_bandwidth (guint delsys, guint bw)
return TRUE;
}
break;
case SYS_ISDBT:
if (bw == 6000000 || bw == 0)
return TRUE;
break;
default:
GST_FIXME ("No bandwidth sanity checks implemented for this "
"delivery system");
@ -2610,11 +2614,6 @@ gst_dvbsrc_set_fe_params (GstDvbSrc * object, struct dtv_properties *props)
"layer C modulation is DQPSK but layer B modulation is different");
}
if (object->bandwidth != 6000000) {
GST_WARNING_OBJECT (object, "Wrong ISDB-T parameter value: bandwidth "
"is %d but only 6 MHz is allowed", object->bandwidth);
}
GST_INFO_OBJECT (object, "Tuning ISDB-T to %d", freq);
set_prop (props->props, &n, DTV_BANDWIDTH_HZ, object->bandwidth);
set_prop (props->props, &n, DTV_GUARD_INTERVAL, object->guard_interval);