mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-04 07:09:56 +00:00
sys/dvb/: Add ATSC tunning and channels.conf parsing support.
Original commit message from CVS: patch by: Michael Krufky * sys/dvb/gstdvbsrc.c: * sys/dvb/parsechannels.c: Add ATSC tunning and channels.conf parsing support. Fixes #537455
This commit is contained in:
parent
cbc5127190
commit
e2c08fe736
3 changed files with 46 additions and 0 deletions
|
@ -1,3 +1,12 @@
|
|||
2008-08-18 Zaheer Abbas Merali <zaheerabbas at merali dot org>
|
||||
|
||||
patch by: Michael Krufky
|
||||
|
||||
* sys/dvb/gstdvbsrc.c:
|
||||
* sys/dvb/parsechannels.c:
|
||||
Add ATSC tunning and channels.conf parsing support.
|
||||
Fixes #537455
|
||||
|
||||
2008-08-13 Michael Smith <msmith@songbirdnest.com>
|
||||
|
||||
* sys/dshowdecwrapper/gstdshowaudiodec.c:
|
||||
|
|
|
@ -141,6 +141,8 @@ gst_dvbsrc_modulation_get_type (void)
|
|||
{QAM_128, "QAM 128", "QAM 128"},
|
||||
{QAM_256, "QAM 256", "QAM 256"},
|
||||
{QAM_AUTO, "AUTO", "AUTO"},
|
||||
{VSB_8, "8VSB", "8VSB"},
|
||||
{VSB_16, "16VSB", "16VSB"},
|
||||
{0, NULL, NULL},
|
||||
};
|
||||
|
||||
|
@ -745,6 +747,11 @@ gst_dvbsrc_open_frontend (GstDvbSrc * object)
|
|||
G_TYPE_BOOLEAN, fe_info.caps % FE_CAN_HIERARCHY_AUTO, "auto-fec",
|
||||
G_TYPE_BOOLEAN, fe_info.caps & FE_CAN_FEC_AUTO, NULL);
|
||||
break;
|
||||
case FE_ATSC:
|
||||
adapter_desc = "ATSC";
|
||||
adapter_structure = gst_structure_new ("dvb-adapter",
|
||||
"type", G_TYPE_STRING, adapter_desc, NULL);
|
||||
break;
|
||||
default:
|
||||
g_error ("Unknown frontend type: %d", object->adapter_type);
|
||||
adapter_structure = gst_structure_new ("dvb-adapter",
|
||||
|
@ -1276,6 +1283,11 @@ gst_dvbsrc_tune (GstDvbSrc * object)
|
|||
feparams.u.qam.modulation = object->modulation;
|
||||
feparams.u.qam.symbol_rate = sym_rate;
|
||||
break;
|
||||
case FE_ATSC:
|
||||
GST_INFO_OBJECT (object, "Tuning ATSC to %d", freq);
|
||||
feparams.frequency = freq;
|
||||
feparams.u.vsb.modulation = object->modulation;
|
||||
break;
|
||||
default:
|
||||
g_error ("Unknown frontend type: %d", object->adapter_type);
|
||||
|
||||
|
|
|
@ -101,6 +101,15 @@ parse_channels_conf_from_file (const gchar * filename)
|
|||
g_hash_table_insert (params, g_strdup ("frequency"),
|
||||
g_strdup (fields[1]));
|
||||
parsed = TRUE;
|
||||
} else if (numfields == 6) {
|
||||
/* atsc (vsb/qam) */
|
||||
g_hash_table_insert (params, g_strdup ("type"), g_strdup ("atsc"));
|
||||
g_hash_table_insert (params, g_strdup ("modulation"),
|
||||
g_strdup (fields[2]));
|
||||
|
||||
g_hash_table_insert (params, g_strdup ("frequency"),
|
||||
g_strdup (fields[1]));
|
||||
parsed = TRUE;
|
||||
}
|
||||
if (parsed) {
|
||||
g_hash_table_insert (params, g_strdup ("sid"),
|
||||
|
@ -352,6 +361,22 @@ set_properties_for_channel (GObject * dvbbasebin, const gchar * channel_name)
|
|||
g_object_set (dvbbasebin, "inversion", 1, NULL);
|
||||
else
|
||||
g_object_set (dvbbasebin, "inversion", 2, NULL);
|
||||
} else if (strcmp (type, "atsc") == 0) {
|
||||
gchar *val;
|
||||
|
||||
ret = TRUE;
|
||||
|
||||
val = g_hash_table_lookup (params, "modulation");
|
||||
if (strcmp (val, "QAM_64") == 0)
|
||||
g_object_set (dvbbasebin, "modulation", 3, NULL);
|
||||
else if (strcmp (val, "QAM_256") == 0)
|
||||
g_object_set (dvbbasebin, "modulation", 5, NULL);
|
||||
else if (strcmp (val, "8VSB") == 0)
|
||||
g_object_set (dvbbasebin, "modulation", 7, NULL);
|
||||
else if (strcmp (val, "16VSB") == 0)
|
||||
g_object_set (dvbbasebin, "modulation", 8, NULL);
|
||||
else
|
||||
ret = FALSE;
|
||||
}
|
||||
}
|
||||
destroy_channels_hash (channels);
|
||||
|
|
Loading…
Reference in a new issue