[gstreamermm] Init: Add the is_initialized() and the deinit() functions.
- From: Josà Alburquerque <jaalburqu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gstreamermm] Init: Add the is_initialized() and the deinit() functions.
- Date: Wed, 19 Sep 2012 22:25:31 +0000 (UTC)
commit 883627a94c760ff8b82cc547d157e42de5e66419
Author: Josà Alburquerque <jaalburqu svn gnome org>
Date: Wed Sep 19 15:36:24 2012 -0400
Init: Add the is_initialized() and the deinit() functions.
* gstreamer/gstreamermm/init.{cc,h}: Wrap the GStreamer
gst_is_initialized() and gst_deinit() functions.
Bug #684148 (kangaba yandex ru).
ChangeLog | 11 ++++++++++-
gstreamer/gstreamermm/init.cc | 10 ++++++++++
gstreamer/gstreamermm/init.h | 22 ++++++++++++++++++++--
3 files changed, 40 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6fabe5f..0d65537 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2012-09-19 Josà Alburquerque <jaalburquerque gmail com>
+
+ Init: Add the is_initialized() and the deinit() functions.
+
+ * gstreamer/gstreamermm/init.{cc,h}: Wrap the GStreamer
+ gst_is_initialized() and gst_deinit() functions.
+
+ Bug #684148 (kangaba yandex ru).
+
2012-09-14 Josà Alburquerque <jaalburquerque gmail com>
Plug-ins: Speed up initialization by avoiding their loading on startup.
@@ -41,7 +50,7 @@
wrapping tests to create an Event, Message and Query to ensure that
the new create() methods work.
- Bug #683580 (kangaba yandex ru)
+ Bug #683580 (kangaba yandex ru).
2012-09-11 Josà Alburquerque <jaalburquerque gmail com>
diff --git a/gstreamer/gstreamermm/init.cc b/gstreamer/gstreamermm/init.cc
index 0205428..5db40b2 100644
--- a/gstreamer/gstreamermm/init.cc
+++ b/gstreamer/gstreamermm/init.cc
@@ -113,6 +113,16 @@ bool init_check()
return result;
}
+bool is_initialized()
+{
+ return static_cast<bool>(gst_is_initialized());
+}
+
+void deinit()
+{
+ gst_deinit();
+}
+
Glib::OptionGroup get_option_group()
{
return Glib::OptionGroup(gst_init_get_option_group());
diff --git a/gstreamer/gstreamermm/init.h b/gstreamer/gstreamermm/init.h
index 5e53c20..9cb009b 100644
--- a/gstreamer/gstreamermm/init.h
+++ b/gstreamer/gstreamermm/init.h
@@ -105,7 +105,7 @@ void init();
* @return true if GStreamer could be initialized.
* @throw Glib::Error
*/
- bool init_check(int& argc, char**& argv);
+bool init_check(int& argc, char**& argv);
/** Initializes gstreamermm gracefully without parsing command line arguments.
*
@@ -130,7 +130,25 @@ void init();
* @return true if GStreamer could be initialized.
* @throw Glib::Error
*/
- bool init_check();
+bool init_check();
+
+/** Use this function to check if GStreamer has been initialized.
+ * @return <tt>true</tt> if initialization has been done, <tt>false</tt>
+ * otherwise.
+ */
+bool is_initialized(void);
+
+/** Clean up any resources created by GStreamer upon initialization.
+ *
+ * It is normally not needed to call this function in a normal application as
+ * the resources will automatically be freed when the program terminates.
+ * This function is therefore mostly used by testsuites and other memory
+ * profiling tools.
+ *
+ * After this call GStreamer (including this method) should not be used
+ * anymore.
+ */
+void deinit();
/** Returns a Glib::OptionGroup with GStreamer's argument specifications. The
* group is set up to use standard GOption callbacks, so when using this group
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]