diff options
author | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2010-08-20 03:07:58 +0530 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2010-08-20 19:35:01 +0200 |
commit | 904c1a7a1d13c0ad92d2d76e0c948b50acf1a358 (patch) | |
tree | 045b0ce87f91d9b1dea7409d988dc85a6a8f353f | |
parent | 57cc780c45a4c14decda0ac5fde58db3d13c7980 (diff) |
gst: Add a gst_is_initialized() API
For one, this will allow libraries that expect applications to
initialize GStreamer before using their API to have a check for this
condition.
https://bugzilla.gnome.org/show_bug.cgi?id=627438
-rw-r--r-- | docs/gst/gstreamer-sections.txt | 1 | ||||
-rw-r--r-- | gst/gst.c | 16 | ||||
-rw-r--r-- | gst/gst.h | 1 | ||||
-rw-r--r-- | win32/common/libgstreamer.def | 1 |
4 files changed, 19 insertions, 0 deletions
diff --git a/docs/gst/gstreamer-sections.txt b/docs/gst/gstreamer-sections.txt index 00d90fbb53..1c0f1fb4b5 100644 --- a/docs/gst/gstreamer-sections.txt +++ b/docs/gst/gstreamer-sections.txt @@ -22,6 +22,7 @@ gst_init gst_init_check gst_init_get_option_group +gst_is_initialized gst_deinit gst_version gst_version_string @@ -500,6 +500,22 @@ gst_init (int *argc, char **argv[]) } } +/** + * gst_is_initialized: + * + * Use this function to check if GStreamer has been initialized with gst_init() + * or gst_init_check(). + * + * Returns: TRUE if initialization has been done, FALSE otherwise. + * + * Since: 0.10.31 + */ +gboolean +gst_is_initialized (void) +{ + return gst_initialized; +} + #ifndef GST_DISABLE_REGISTRY static void add_path_func (gpointer data, gpointer user_data) @@ -85,6 +85,7 @@ G_BEGIN_DECLS void gst_init (int *argc, char **argv[]); gboolean gst_init_check (int *argc, char **argv[], GError ** err); +gboolean gst_is_initialized (void); GOptionGroup * gst_init_get_option_group (void); void gst_deinit (void); diff --git a/win32/common/libgstreamer.def b/win32/common/libgstreamer.def index 2a013eaf27..0c5f667b92 100644 --- a/win32/common/libgstreamer.def +++ b/win32/common/libgstreamer.def @@ -465,6 +465,7 @@ EXPORTS gst_init_check gst_init_get_option_group gst_int_range_get_type + gst_is_initialized gst_is_tag_list gst_iterator_filter gst_iterator_find_custom |