summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@nokia.com>2010-03-09 01:17:51 +0200
committerFelipe Contreras <felipe.contreras@nokia.com>2010-03-09 18:39:13 +0200
commit24148b76ef88b2966cb2b63baa05ac137fe472e9 (patch)
tree08fedab584eb0838b32ca25731e82e2f83cb2f69
parentf7b8a9e1e342fe96a8022ddd933993e4b9666389 (diff)
plugin: add support dependencies
So that the cache is reloaded when needed. Signed-off-by: Felipe Contreras <felipe.contreras@nokia.com>
-rw-r--r--omx/gstomx.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/omx/gstomx.c b/omx/gstomx.c
index 08ef23d..f8c3ae9 100644
--- a/omx/gstomx.c
+++ b/omx/gstomx.c
@@ -130,14 +130,10 @@ get_config_path (void)
"gst-openmax.conf", NULL);
}
-/**
- * @todo find a way to call plugin_init() when the config file changes
- */
-
/* TODO: we can cache table w/ gst_plugin_{get,set}_cache_data..
*/
static void
-fetch_element_table (void)
+fetch_element_table (GstPlugin *plugin)
{
gchar *path;
gchar *config, *s;
@@ -151,6 +147,9 @@ fetch_element_table (void)
config = (gchar *) default_config;
}
+ gst_plugin_add_dependency_simple (plugin, "ONX_CONFIG", path, NULL,
+ GST_PLUGIN_DEPENDENCY_FLAG_NONE);
+
g_free (path);
GST_DEBUG ("parsing config:\n%s", config);
@@ -233,7 +232,7 @@ plugin_init (GstPlugin *plugin)
for (i = 0; i < G_N_ELEMENTS (get_type); i++)
get_type[i] ();
- fetch_element_table ();
+ fetch_element_table (plugin);
g_omx_init ();