[PATCH 0/4] Add grl_init() function



As promised, these are the set of patches to implement grl_init(), inspired by
gst_init().

Two important tasks are done in this function:

  - Initializations (registering default metadata keys, registering media types
    in glib type-system, checking for GModule support, etc). Most of them were
    moved from grl_plugin_registry_init().

  - Checking for command-line options related with Grilo.

Regarding the first task, I added a new function to GrlRegistry,
grl_plugin_registry_add_directory(), which adds a new directory to the list of
default plugins paths. Now, this default set is initialized in grl_init(), and
developer can add more directories invoking former function.

Regarding the second task, right now there is only one option,
--grl-plugin-path, which receives a colon-separated list of directories to be
used.

How is this set set now?

1) If --grl-plugin-path is used, default paths are taken from this parameter;
   else
2) If GRL_PLUGIN_PATH envvar is set, default paths are taken from this envvar;
   else
3) use the default system-wide location (usually, /usr/lib/grilo-0.1, set in
   compile-time).


Any comment/suggestion is welcome. As usual, I'll wait about 2 or 3 days for
comments before pushing them.


	J.A.


*** BLURB HERE ***

Juan A. Suarez Romero (4):
  Add grl_init() function
  Set default plugin directories in grl_init()
  Add Grilo command-line options
  Move g_module_supported() to grl_init()

 src/Makefile.am            |    2 +-
 src/grilo.c                |   97 ++++++++++++++++++++++++++++++++++++++++++++
 src/grilo.h                |    6 +++
 src/grl-plugin-registry.c  |   51 ++++++++++++-----------
 src/grl-plugin-registry.h  |    3 +
 tools/grilo-test-ui/main.c |    1 +
 6 files changed, 135 insertions(+), 25 deletions(-)
 create mode 100644 src/grilo.c



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]