gchar *name;
gchar *category;
gchar *description;
+ gchar *path;
GList *profiles;
/*< private > */
g_free (target->name);
g_free (target->category);
g_free (target->description);
+ g_free (target->path);
g_list_foreach (target->profiles, (GFunc) g_object_unref, NULL);
g_list_free (target->profiles);
return target->description;
}
+/**
+ * gst_encoding_target_get_path:
+ * @target: a #GstEncodingTarget
+ *
+ * Returns: (transfer none): The path to the @target file.
+ *
+ * Since: 1.18
+ */
+const gchar *
+gst_encoding_target_get_path (GstEncodingTarget * target)
+{
+ g_return_val_if_fail (GST_IS_ENCODING_TARGET (target), NULL);
+ return target->path;
+}
+
/**
* gst_encoding_target_get_profiles:
* @target: a #GstEncodingTarget
if (!g_file_set_contents (filepath, data, data_size, error))
goto write_failed;
+ target->path = g_strdup (filepath);
+
g_key_file_free (out);
g_free (data);
fullname = g_build_filename (subdir, filename, NULL);
target = gst_encoding_target_load_from_file (fullname, NULL);
if (target) {
+ target->path = fullname;
res = g_list_append (res, target);
} else
GST_WARNING ("Failed to get a target from %s", fullname);
- g_free (fullname);
}
g_dir_close (dir);