diff options
author | Felipe Contreras <felipe.contreras@gmail.com> | 2009-04-26 20:58:07 +0300 |
---|---|---|
committer | Felipe Contreras <felipe.contreras@gmail.com> | 2009-04-26 22:12:06 +0300 |
commit | b427d37e639560e65b656a22965dc44bcd840128 (patch) | |
tree | d02c11a831f91168a27d6d8567e08c926f130786 | |
parent | c8a68576bfac7cf77e5a3884790f15210ba3d36f (diff) |
util: trivial rearrange
In preparation for following patches.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
-rw-r--r-- | omx/gstomx_util.c | 42 |
1 files changed, 23 insertions, 19 deletions
diff --git a/omx/gstomx_util.c b/omx/gstomx_util.c index 6a72b71..a52a94f 100644 --- a/omx/gstomx_util.c +++ b/omx/gstomx_util.c @@ -93,6 +93,10 @@ static GMutex *imp_mutex; static GHashTable *implementations; static gboolean initialized; +/* + * Util + */ + static void g_ptr_array_clear (GPtrArray *array) { @@ -114,6 +118,25 @@ g_ptr_array_insert (GPtrArray *array, array->pdata[index] = data; } +typedef void (*GOmxPortFunc) (GOmxPort *port); + +static void inline +core_for_each_port (GOmxCore *core, + GOmxPortFunc func) +{ + guint index; + + for (index = 0; index < core->ports->len; index++) + { + GOmxPort *port; + + port = g_omx_core_get_port (core, index); + + if (port) + func (port); + } +} + /* * Main */ @@ -309,25 +332,6 @@ g_omx_core_deinit (GOmxCore *core) core->imp = NULL; } -typedef void (*GOmxPortFunc) (GOmxPort *port); - -static void inline -core_for_each_port (GOmxCore *core, - GOmxPortFunc func) -{ - guint index; - - for (index = 0; index < core->ports->len; index++) - { - GOmxPort *port; - - port = g_omx_core_get_port (core, index); - - if (port) - func (port); - } -} - void g_omx_core_prepare (GOmxCore *core) { |