return TRUE;
}
-/* TODO handle errors when getting keyfile data on all these functions */
static gboolean
gst_dvb_base_bin_conf_set_string (GstElement * dvbbasebin,
const gchar * property, GKeyFile * kf, const gchar * channel_name,
gchar *str;
str = g_key_file_get_string (kf, channel_name, key, NULL);
+ if (!str) {
+ GST_WARNING_OBJECT (dvbbasebin,
+ "Could not get value for '%s' on channel '%s'", key, channel_name);
+ return FALSE;
+ }
+
g_object_set (dvbbasebin, property, str, NULL);
g_free (str);
return TRUE;
guint64 v;
v = g_key_file_get_uint64 (kf, channel_name, key, NULL);
+ if (!v) {
+ GST_WARNING_OBJECT (dvbbasebin,
+ "Could not get value for '%s' on channel '%s'", key, channel_name);
+ return FALSE;
+ }
+
g_object_set (dvbbasebin, property, (guint) v, NULL);
return TRUE;
}
gint v;
v = g_key_file_get_integer (kf, channel_name, key, NULL);
+ if (!v) {
+ GST_WARNING_OBJECT (dvbbasebin,
+ "Could not get value for '%s' on channel '%s'", key, channel_name);
+ return FALSE;
+ }
+
g_object_set (dvbbasebin, property, v, NULL);
return TRUE;
}
gint v;
str = g_key_file_get_string (kf, channel_name, key, NULL);
+ if (!str) {
+ GST_WARNING_OBJECT (dvbbasebin,
+ "Could not get value for '%s' on channel '%s'", key, channel_name);
+ return FALSE;
+ }
+
if (strcmp (str, "AUTO") == 0)
v = 2;
else if (strcmp (str, "ON") == 0)