mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
Small cleanups
Original commit message from CVS: Small cleanups
This commit is contained in:
parent
14186b75ea
commit
9cfd185748
3 changed files with 19 additions and 12 deletions
24
gst/gst.c
24
gst/gst.c
|
@ -41,7 +41,7 @@ gboolean _gst_registry_auto_load = TRUE;
|
||||||
static GstRegistry *_global_registry;
|
static GstRegistry *_global_registry;
|
||||||
static GstRegistry *_user_registry;
|
static GstRegistry *_user_registry;
|
||||||
static gboolean _gst_registry_fixed = FALSE;
|
static gboolean _gst_registry_fixed = FALSE;
|
||||||
static gboolean _nothreads = FALSE;
|
static gboolean _gst_use_threads = TRUE;
|
||||||
|
|
||||||
extern gint _gst_trace_on;
|
extern gint _gst_trace_on;
|
||||||
|
|
||||||
|
@ -339,17 +339,17 @@ init_post (void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!g_thread_supported ()) {
|
if (!g_thread_supported ()) {
|
||||||
if (_nothreads)
|
if (_gst_use_threads)
|
||||||
g_thread_init (&gst_thread_dummy_functions);
|
|
||||||
else
|
|
||||||
g_thread_init (NULL);
|
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;
|
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);
|
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_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_object_get_type ();
|
||||||
gst_pad_get_type ();
|
gst_pad_get_type ();
|
||||||
|
@ -493,7 +493,7 @@ init_popt_callback (poptContext context, enum poptCallbackReason reason,
|
||||||
gst_scheduler_factory_set_default_name (arg);
|
gst_scheduler_factory_set_default_name (arg);
|
||||||
break;
|
break;
|
||||||
case ARG_NOTHREADS:
|
case ARG_NOTHREADS:
|
||||||
_nothreads = TRUE;
|
gst_use_threads (FALSE);
|
||||||
break;
|
break;
|
||||||
case ARG_REGISTRY:
|
case ARG_REGISTRY:
|
||||||
g_object_set (G_OBJECT (_user_registry), "location", arg, NULL);
|
g_object_set (G_OBJECT (_user_registry), "location", arg, NULL);
|
||||||
|
@ -510,10 +510,16 @@ init_popt_callback (poptContext context, enum poptCallbackReason reason,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
void
|
||||||
gst_with_threads (void)
|
gst_use_threads (gboolean use_threads)
|
||||||
{
|
{
|
||||||
return !_nothreads;
|
_gst_use_threads = use_threads;
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
gst_has_threads (void)
|
||||||
|
{
|
||||||
|
return _gst_use_threads;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,8 @@ void gst_init_with_popt_table (int *argc, char **argv[],
|
||||||
const struct poptOption *popt_options);
|
const struct poptOption *popt_options);
|
||||||
const struct poptOption* gst_init_get_popt_table (void);
|
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 (void);
|
||||||
void gst_main_quit (void);
|
void gst_main_quit (void);
|
||||||
|
|
|
@ -57,8 +57,8 @@ typedef enum {
|
||||||
GST_PROPS_LAST_TYPE = GST_PROPS_END_TYPE + 16,
|
GST_PROPS_LAST_TYPE = GST_PROPS_END_TYPE + 16,
|
||||||
} GstPropsType;
|
} GstPropsType;
|
||||||
|
|
||||||
#define GST_MAKE_FOURCC(a,b,c,d) ((a)|(b)<<8|(c)<<16|(d)<<24)
|
#define GST_MAKE_FOURCC(a,b,c,d) (guint32)((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_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_LIST(a...) GST_PROPS_LIST_TYPE,##a,NULL
|
||||||
#define GST_PROPS_INT(a) GST_PROPS_INT_TYPE,(a)
|
#define GST_PROPS_INT(a) GST_PROPS_INT_TYPE,(a)
|
||||||
|
|
Loading…
Reference in a new issue