mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-30 02:58:24 +00:00
dvbsrc: special case detection when DVB-T and T2 seem valid
There is no way to tell one over the other when parameters seem valid for DVB-T and DVB-T2 and the adapter supports both. Reason to go with the former here is that, from experience, most DVB-T2 channels out there seem to use parameters that are not valid for DVB-T, like QAM_256 https://bugzilla.gnome.org/show_bug.cgi?id=765731
This commit is contained in:
parent
378fdad176
commit
10b020095b
1 changed files with 26 additions and 10 deletions
|
@ -2404,16 +2404,32 @@ gst_dvbsrc_guess_delsys (GstDvbSrc * object)
|
||||||
|
|
||||||
alternatives = g_list_length (valid);
|
alternatives = g_list_length (valid);
|
||||||
|
|
||||||
if (!alternatives) {
|
switch (alternatives) {
|
||||||
GST_WARNING_OBJECT (object, "Delivery system autodetection provided no "
|
case 0:
|
||||||
"valid alternative");
|
GST_WARNING_OBJECT (object, "Delivery system autodetection provided no "
|
||||||
candidate = g_list_last (object->supported_delsys);
|
"valid alternative");
|
||||||
} else {
|
candidate = g_list_last (object->supported_delsys);
|
||||||
if (alternatives > 1) {
|
break;
|
||||||
GST_WARNING_OBJECT (object, "Delivery system autodetection provided more "
|
case 1:
|
||||||
"than one valid alternative");
|
candidate = g_list_last (valid);
|
||||||
}
|
GST_DEBUG_OBJECT (object, "Delivery system autodetection provided only "
|
||||||
candidate = g_list_last (valid);
|
"one valid alternative: '%d'", GPOINTER_TO_INT (candidate->data));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
/* More than one alternative. Selection based on best guess */
|
||||||
|
if (g_list_find (valid, GINT_TO_POINTER (SYS_DVBT)) &&
|
||||||
|
g_list_find (valid, GINT_TO_POINTER (SYS_DVBT2))) {
|
||||||
|
/* There is no way to tell one over the other when parameters seem valid
|
||||||
|
* for DVB-T and DVB-T2 and the adapter supports both. Reason to go with
|
||||||
|
* the former here is that, from experience, most DVB-T2 channels out
|
||||||
|
* there seem to use parameters that are not valid for DVB-T, like
|
||||||
|
* QAM_256 */
|
||||||
|
GST_WARNING_OBJECT (object, "Channel parameters valid for DVB-T and "
|
||||||
|
"DVB-T2. Choosing DVB-T");
|
||||||
|
candidate = g_list_find (valid, GINT_TO_POINTER (SYS_DVBT));
|
||||||
|
} else {
|
||||||
|
candidate = g_list_last (valid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
object->delsys = GPOINTER_TO_INT (candidate->data);
|
object->delsys = GPOINTER_TO_INT (candidate->data);
|
||||||
|
|
Loading…
Reference in a new issue