summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorSebastian Pölsterl <marduk@k-d-w.org>2008-09-05 11:07:32 +0000
committerZaheer Abbas Merali <zaheerabbas@merali.org>2008-09-05 11:07:32 +0000
commit64cd01e7e8a143e523466c911f7bb2e148508c3b (patch)
tree7c848be298b312a845fcf5bcf9749c39324994f7 /sys
parentd2a27c613140682670a6362f214fb8f61000ff94 (diff)
downloadgst-plugins-bad-64cd01e7e8a143e523466c911f7bb2e148508c3b.tar.gz
gst-plugins-bad-64cd01e7e8a143e523466c911f7bb2e148508c3b.tar.bz2
gst-plugins-bad-64cd01e7e8a143e523466c911f7bb2e148508c3b.zip
sys/dvb/gstdvbsrc.c: Add DVB Adapter name to structure sent over bus.
Original commit message from CVS: patch by: Sebastian Pölsterl * sys/dvb/gstdvbsrc.c: Add DVB Adapter name to structure sent over bus.
Diffstat (limited to 'sys')
-rw-r--r--sys/dvb/gstdvbsrc.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/dvb/gstdvbsrc.c b/sys/dvb/gstdvbsrc.c
index ce562ea4..5b8f61a0 100644
--- a/sys/dvb/gstdvbsrc.c
+++ b/sys/dvb/gstdvbsrc.c
@@ -683,6 +683,7 @@ gst_dvbsrc_open_frontend (GstDvbSrc * object)
char *adapter_desc = NULL;
gchar *frontend_dev;
GstStructure *adapter_structure;
+ char *adapter_name = NULL;
frontend_dev = g_strdup_printf ("/dev/dvb/adapter%d/frontend%d",
object->adapter_number, object->frontend_number);
@@ -717,18 +718,22 @@ gst_dvbsrc_open_frontend (GstDvbSrc * object)
return FALSE;
}
+ adapter_name = g_strdup (fe_info.name);
+
object->adapter_type = fe_info.type;
switch (object->adapter_type) {
case FE_QPSK:
adapter_desc = "DVB-S";
adapter_structure = gst_structure_new ("dvb-adapter",
"type", G_TYPE_STRING, adapter_desc,
+ "name", G_TYPE_STRING, adapter_name,
"auto-fec", G_TYPE_BOOLEAN, fe_info.caps & FE_CAN_FEC_AUTO, NULL);
break;
case FE_QAM:
adapter_desc = "DVB-C";
adapter_structure = gst_structure_new ("dvb-adapter",
"type", G_TYPE_STRING, adapter_desc,
+ "name", G_TYPE_STRING, adapter_name,
"auto-inversion", G_TYPE_BOOLEAN,
fe_info.caps & FE_CAN_INVERSION_AUTO, "auto-qam", G_TYPE_BOOLEAN,
fe_info.caps & FE_CAN_QAM_AUTO, "auto-fec", G_TYPE_BOOLEAN,
@@ -738,6 +743,7 @@ gst_dvbsrc_open_frontend (GstDvbSrc * object)
adapter_desc = "DVB-T";
adapter_structure = gst_structure_new ("dvb-adapter",
"type", G_TYPE_STRING, adapter_desc,
+ "name", G_TYPE_STRING, adapter_name,
"auto-inversion", G_TYPE_BOOLEAN,
fe_info.caps & FE_CAN_INVERSION_AUTO, "auto-qam", G_TYPE_BOOLEAN,
fe_info.caps & FE_CAN_QAM_AUTO, "auto-transmission-mode",
@@ -758,10 +764,11 @@ gst_dvbsrc_open_frontend (GstDvbSrc * object)
"type", G_TYPE_STRING, "unknown", NULL);
}
- GST_INFO_OBJECT (object, "DVB card: %s ", fe_info.name);
+ GST_INFO_OBJECT (object, "DVB card: %s ", adapter_name);
gst_element_post_message (GST_ELEMENT_CAST (object), gst_message_new_element
(GST_OBJECT (object), adapter_structure));
g_free (frontend_dev);
+ g_free (adapter_name);
return TRUE;
}