mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +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);
|
||||
|
||||
if (!alternatives) {
|
||||
GST_WARNING_OBJECT (object, "Delivery system autodetection provided no "
|
||||
"valid alternative");
|
||||
candidate = g_list_last (object->supported_delsys);
|
||||
} else {
|
||||
if (alternatives > 1) {
|
||||
GST_WARNING_OBJECT (object, "Delivery system autodetection provided more "
|
||||
"than one valid alternative");
|
||||
}
|
||||
candidate = g_list_last (valid);
|
||||
switch (alternatives) {
|
||||
case 0:
|
||||
GST_WARNING_OBJECT (object, "Delivery system autodetection provided no "
|
||||
"valid alternative");
|
||||
candidate = g_list_last (object->supported_delsys);
|
||||
break;
|
||||
case 1:
|
||||
candidate = g_list_last (valid);
|
||||
GST_DEBUG_OBJECT (object, "Delivery system autodetection provided only "
|
||||
"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);
|
||||
|
|
Loading…
Reference in a new issue