mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-17 12:55:53 +00:00
aggregator: Fix StartTimeSelection enum type registration
Make it thread-safe and use the actual C identifiers for the "name" field, as otherwise gobject-introspection will fall apart. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/527>
This commit is contained in:
parent
3db985548c
commit
44d73efc49
1 changed files with 7 additions and 5 deletions
|
@ -96,18 +96,20 @@ gst_aggregator_start_time_selection_get_type (void)
|
||||||
{
|
{
|
||||||
static GType gtype = 0;
|
static GType gtype = 0;
|
||||||
|
|
||||||
if (gtype == 0) {
|
if (g_once_init_enter (>ype)) {
|
||||||
static const GEnumValue values[] = {
|
static const GEnumValue values[] = {
|
||||||
{GST_AGGREGATOR_START_TIME_SELECTION_ZERO,
|
{GST_AGGREGATOR_START_TIME_SELECTION_ZERO,
|
||||||
"Start at 0 running time (default)", "zero"},
|
"GST_AGGREGATOR_START_TIME_SELECTION_ZERO", "zero"},
|
||||||
{GST_AGGREGATOR_START_TIME_SELECTION_FIRST,
|
{GST_AGGREGATOR_START_TIME_SELECTION_FIRST,
|
||||||
"Start at first observed input running time", "first"},
|
"GST_AGGREGATOR_START_TIME_SELECTION_FIRST", "first"},
|
||||||
{GST_AGGREGATOR_START_TIME_SELECTION_SET,
|
{GST_AGGREGATOR_START_TIME_SELECTION_SET,
|
||||||
"Set start time with start-time property", "set"},
|
"GST_AGGREGATOR_START_TIME_SELECTION_SET", "set"},
|
||||||
{0, NULL, NULL}
|
{0, NULL, NULL}
|
||||||
};
|
};
|
||||||
|
GType new_type =
|
||||||
|
g_enum_register_static ("GstAggregatorStartTimeSelection", values);
|
||||||
|
|
||||||
gtype = g_enum_register_static ("GstAggregatorStartTimeSelection", values);
|
g_once_init_leave (>ype, new_type);
|
||||||
}
|
}
|
||||||
return gtype;
|
return gtype;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue