From 64cd01e7e8a143e523466c911f7bb2e148508c3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20P=C3=B6lsterl?= Date: Fri, 5 Sep 2008 11:07:32 +0000 Subject: sys/dvb/gstdvbsrc.c: Add DVB Adapter name to structure sent over bus. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original commit message from CVS: patch by: Sebastian Pölsterl * sys/dvb/gstdvbsrc.c: Add DVB Adapter name to structure sent over bus. --- sys/dvb/gstdvbsrc.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'sys') 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; } -- cgit v1.2.1