}
static gboolean
-parse_debug_level (gchar * str, gint * level)
+parse_debug_level (gchar * str, GstDebugLevel * level)
{
if (!str)
return FALSE;
if (str[0] != NUL && str[1] == NUL
&& str[0] >= '0' && str[0] < '0' + GST_LEVEL_COUNT) {
- *level = str[0] - '0';
+ *level = (GstDebugLevel) (str[0] - '0');
return TRUE;
}
gchar **values = g_strsplit (*walk, ":", 2);
if (values[0] && values[1]) {
- gint level;
+ GstDebugLevel level;
const gchar *category;
if (parse_debug_category (values[0], &category)
g_strfreev (values);
} else {
- gint level;
+ GstDebugLevel level;
if (parse_debug_level (*walk, &level))
gst_debug_set_default_threshold (level);
{NULL}
};
+/* Since GLib 2.31.0 threading is always enabled and g_thread_init()
+ * is not needed any longer and deprecated */
+#if !GLIB_CHECK_VERSION (2, 31, 0)
/* Since GLib 2.23.2 calling g_thread_init() 'late' is allowed and is
* automatically done as part of g_type_init() */
if (glib_check_version (2, 23, 3)) {
} else {
/* GLib >= 2.23.2 */
}
+#endif
group = g_option_group_new ("gst", _("GStreamer Options"),
_("Show GStreamer Options"), NULL, NULL);
#endif
gboolean res;
+#if !GLIB_CHECK_VERSION (2, 31, 0)
if (!g_thread_get_initialized ())
g_thread_init (NULL);
+#endif
if (gst_initialized) {
GST_DEBUG ("already initialized gst");
g_type_init ();
+#if !GLIB_CHECK_VERSION (2, 31, 0)
/* we need threading to be enabled right here */
g_assert (g_thread_get_initialized ());
+#endif
_gst_debug_init ();
g_type_class_ref (gst_parse_flags_get_type ());
g_type_class_ref (gst_search_mode_get_type ());
g_type_class_ref (gst_progress_type_get_type ());
+ g_type_class_ref (gst_caps_intersect_mode_get_type ());
gst_structure_get_type ();
_gst_value_initialize ();
_gst_event_initialize ();
_gst_buffer_initialize ();
_gst_buffer_list_initialize ();
+ gst_buffer_list_iterator_get_type ();
_gst_message_initialize ();
_gst_tag_initialize ();
+ gst_parse_context_get_type ();
_gst_plugin_initialize ();
}
#ifndef GST_DISABLE_GST_DEBUG
case ARG_DEBUG_LEVEL:{
- gint tmp = 0;
+ GstDebugLevel tmp = GST_LEVEL_NONE;
- tmp = strtol (arg, NULL, 0);
+ tmp = (GstDebugLevel) strtol (arg, NULL, 0);
if (tmp >= 0 && tmp < GST_LEVEL_COUNT) {
gst_debug_set_default_threshold (tmp);
}
g_type_class_unref (g_type_class_peek (gst_uri_type_get_type ()));
g_type_class_unref (g_type_class_peek (gst_parse_error_get_type ()));
g_type_class_unref (g_type_class_peek (gst_param_spec_fraction_get_type ()));
+ g_type_class_unref (g_type_class_peek (gst_progress_type_get_type ()));
+ g_type_class_unref (g_type_class_peek (gst_caps_intersect_mode_get_type ()));
gst_deinitialized = TRUE;
GST_INFO ("deinitialized GStreamer");