static GstRegistry *_global_registry;
static GstRegistry *_user_registry;
static gboolean _gst_registry_fixed = FALSE;
-static gboolean _nothreads = FALSE;
+static gboolean _gst_use_threads = TRUE;
extern gint _gst_trace_on;
#endif
if (!g_thread_supported ()) {
- if (_nothreads)
- g_thread_init (&gst_thread_dummy_functions);
- else
+ if (_gst_use_threads)
g_thread_init (NULL);
+ else
+ g_thread_init (&gst_thread_dummy_functions);
}
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);
GST_INFO (GST_CAT_GST_INIT, "Initializing GStreamer Core Library version %s %s",
- GST_VERSION, _nothreads?"(no threads)":"");
+ GST_VERSION, _gst_use_threads?"":"(no threads)");
gst_object_get_type ();
gst_pad_get_type ();
gst_scheduler_factory_set_default_name (arg);
break;
case ARG_NOTHREADS:
- _nothreads = TRUE;
+ gst_use_threads (FALSE);
break;
case ARG_REGISTRY:
g_object_set (G_OBJECT (_user_registry), "location", arg, NULL);
}
}
+void
+gst_use_threads (gboolean use_threads)
+{
+ _gst_use_threads = use_threads;
+}
+
gboolean
-gst_with_threads (void)
+gst_has_threads (void)
{
- return !_nothreads;
+ return _gst_use_threads;
}
const struct poptOption *popt_options);
const struct poptOption* gst_init_get_popt_table (void);
-gboolean gst_with_threads (void);
+void gst_use_threads (gboolean use_threads);
+gboolean gst_has_threads (void);
void gst_main (void);
void gst_main_quit (void);
GST_PROPS_LAST_TYPE = GST_PROPS_END_TYPE + 16,
} GstPropsType;
-#define GST_MAKE_FOURCC(a,b,c,d) ((a)|(b)<<8|(c)<<16|(d)<<24)
-#define GST_STR_FOURCC(f) (((f)[0])|((f)[1]<<8)|((f)[2]<<16)|((f)[3]<<24))
+#define GST_MAKE_FOURCC(a,b,c,d) (guint32)((a)|(b)<<8|(c)<<16|(d)<<24)
+#define GST_STR_FOURCC(f) (guint32)(((f)[0])|((f)[1]<<8)|((f)[2]<<16)|((f)[3]<<24))
#define GST_PROPS_LIST(a...) GST_PROPS_LIST_TYPE,##a,NULL
#define GST_PROPS_INT(a) GST_PROPS_INT_TYPE,(a)