[Gstreamer-openmax] [PATCH 3/4] plugin: add support dependencies

Felipe Contreras felipe.contreras at nokia.com
Mon Mar 8 15:26:26 PST 2010


So that the cache is reloaded when needed.

Signed-off-by: Felipe Contreras <felipe.contreras at nokia.com>
---
 omx/gstomx.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/omx/gstomx.c b/omx/gstomx.c
index 3fbb240..cc15ecf 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 ();
 
-- 
1.7.0.2





More information about the Gstreamer-openmax mailing list