/**
* SECTION:gst
+ * @title: GStreamer
* @short_description: Media library supporting arbitrary formats and filter
* graphs.
*
* and argv variables so that GStreamer can process its own command line
* options, as shown in the following example.
*
- * <example>
- * <title>Initializing the gstreamer library</title>
- * <programlisting language="c">
+ * ## Initializing the gstreamer library
+ *
+ * |[ <!-- language="C" -->
* int
* main (int argc, char *argv[])
* {
* gst_init (&argc, &argv);
* ...
* }
- * </programlisting>
- * </example>
+ * ]|
*
* It's allowed to pass two %NULL pointers to gst_init() in case you don't want
* to pass the command line args to GStreamer.
*
* You can also use GOption to initialize your own parameters as shown in
* the next code fragment:
- * <example>
- * <title>Initializing own parameters when initializing gstreamer</title>
- * <programlisting>
+ *
+ * ## Initializing own parameters when initializing gstreamer
+ * |[ <!-- language="C" -->
* static gboolean stats = FALSE;
* ...
* int
* g_option_context_free (ctx);
* ...
* }
- * </programlisting>
- * </example>
+ * ]|
*
* Use gst_version() to query the library version at runtime or use the
* GST_VERSION_* macros to find the version at compile time. Optionally
* gst_version_string() returns a printable string.
*
* The gst_deinit() call is used to clean up all internal resources used
- * by <application>GStreamer</application>. It is mostly used in unit tests
- * to check for leaks.
+ * by GStreamer. It is mostly used in unit tests to check for leaks.
*/
#include "gst_private.h"
#include <locale.h> /* for LC_ALL */
#include "gst.h"
-#include "gsttrace.h"
#define GST_CAT_DEFAULT GST_CAT_GST_INIT
#ifndef GST_DISABLE_REGISTRY
GList *_priv_gst_plugin_paths = NULL; /* for delayed processing in init_post */
+extern gboolean _priv_gst_disable_registry;
extern gboolean _priv_gst_disable_registry_update;
#endif
* <link linkend="gst-running">Running GStreamer Applications</link>
* for how to disable automatic registry updates.
*
- * <note><para>
- * This function will terminate your program if it was unable to initialize
- * GStreamer for some reason. If you want your program to fall back,
- * use gst_init_check() instead.
- * </para></note>
+ * > This function will terminate your program if it was unable to initialize
+ * > GStreamer for some reason. If you want your program to fall back,
+ * > use gst_init_check() instead.
*
* WARNING: This function does not work in the same way as corresponding
* functions in other glib-style libraries, such as gtk_init\(\). In
GST_INFO ("Using library installed in %s", libdir);
g_free (libdir);
+#ifndef GST_DISABLE_REGISTRY
+ {
+ const gchar *disable_registry;
+ if ((disable_registry = g_getenv ("GST_REGISTRY_DISABLE"))) {
+ _priv_gst_disable_registry = (strcmp (disable_registry, "yes") == 0);
+ }
+ }
+#endif
+
/* Print some basic system details if possible (OS/architecture) */
#ifdef HAVE_SYS_UTSNAME_H
{
llf = G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_ERROR | G_LOG_FLAG_FATAL;
g_log_set_handler (g_log_domain_gstreamer, llf, debug_log_handler, NULL);
-#ifndef GST_DISABLE_TRACE
- _priv_gst_alloc_trace_initialize ();
-#endif
-
_priv_gst_mini_object_initialize ();
_priv_gst_quarks_initialize ();
_priv_gst_allocator_initialize ();
g_type_class_ref (gst_lock_flags_get_type ());
g_type_class_ref (gst_allocator_flags_get_type ());
g_type_class_ref (gst_stream_flags_get_type ());
+ g_type_class_ref (gst_stream_type_get_type ());
+ g_type_class_ref (gst_stack_trace_flags_get_type ());
_priv_gst_event_initialize ();
_priv_gst_buffer_initialize ();
_priv_gst_sample_initialize ();
_priv_gst_context_initialize ();
_priv_gst_date_time_initialize ();
+ _priv_gst_value_initialize ();
_priv_gst_tag_initialize ();
_priv_gst_toc_initialize ();
- _priv_gst_value_initialize ();
g_type_class_ref (gst_param_spec_fraction_get_type ());
gst_parse_context_get_type ();
break;
case ARG_PLUGIN_PATH:
#ifndef GST_DISABLE_REGISTRY
- split_and_iterate (arg, G_SEARCHPATH_SEPARATOR_S, add_path_func, NULL);
+ if (!_priv_gst_disable_registry)
+ split_and_iterate (arg, G_SEARCHPATH_SEPARATOR_S, add_path_func, NULL);
#endif /* GST_DISABLE_REGISTRY */
break;
case ARG_PLUGIN_LOAD:
break;
case ARG_REGISTRY_UPDATE_DISABLE:
#ifndef GST_DISABLE_REGISTRY
- _priv_gst_disable_registry_update = TRUE;
+ if (!_priv_gst_disable_registry)
+ _priv_gst_disable_registry_update = TRUE;
#endif
break;
case ARG_REGISTRY_FORK_DISABLE:
* 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.
+ * After this call GStreamer (including this method) should not be used anymore.
*/
void
gst_deinit (void)
_priv_gst_caps_features_cleanup ();
_priv_gst_caps_cleanup ();
-#ifndef GST_DISABLE_TRACE
- _priv_gst_alloc_trace_deinit ();
-#endif
-
g_type_class_unref (g_type_class_peek (gst_object_get_type ()));
g_type_class_unref (g_type_class_peek (gst_pad_get_type ()));
g_type_class_unref (g_type_class_peek (gst_element_factory_get_type ()));
g_type_class_unref (g_type_class_peek (gst_pad_probe_return_get_type ()));
g_type_class_unref (g_type_class_peek (gst_segment_flags_get_type ()));
g_type_class_unref (g_type_class_peek (gst_scheduling_flags_get_type ()));
+ g_type_class_unref (g_type_class_peek (gst_stream_type_get_type ()));
g_type_class_unref (g_type_class_peek (gst_control_binding_get_type ()));
g_type_class_unref (g_type_class_peek (gst_control_source_get_type ()));
g_type_class_unref (g_type_class_peek (gst_allocator_flags_get_type ()));
g_type_class_unref (g_type_class_peek (gst_stream_flags_get_type ()));
g_type_class_unref (g_type_class_peek (gst_debug_color_mode_get_type ()));
+ g_type_class_unref (g_type_class_peek (gst_stack_trace_flags_get_type ()));
gst_deinitialized = TRUE;
GST_INFO ("deinitialized GStreamer");