diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2008-08-18 11:13:07 +0000 |
---|---|---|
committer | Zaheer Abbas Merali <zaheerabbas@merali.org> | 2008-08-18 11:13:07 +0000 |
commit | e2c08fe7360b03477ccbeef57dab648cfe2874aa (patch) | |
tree | 5523cccb325a30d9a75e0bb000f4787f5758bb8e | |
parent | cbc51271903c1e88b142b7d8de4e3fb558009fcc (diff) | |
download | gstreamer-plugins-bad-e2c08fe7360b03477ccbeef57dab648cfe2874aa.tar.gz |
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
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | sys/dvb/gstdvbsrc.c | 12 | ||||
-rw-r--r-- | sys/dvb/parsechannels.c | 25 |
3 files changed, 46 insertions, 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: diff --git a/sys/dvb/gstdvbsrc.c b/sys/dvb/gstdvbsrc.c index 1e0369ba4..ce562ea47 100644 --- a/sys/dvb/gstdvbsrc.c +++ b/sys/dvb/gstdvbsrc.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); diff --git a/sys/dvb/parsechannels.c b/sys/dvb/parsechannels.c index 0bb7d8983..ed07e5374 100644 --- a/sys/dvb/parsechannels.c +++ b/sys/dvb/parsechannels.c @@ -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); |