mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
clockselect: Don't register GstClockSelectClockId multiple times
This commit is contained in:
parent
74f2f733be
commit
a5b1e1e96d
1 changed files with 16 additions and 12 deletions
|
@ -49,19 +49,23 @@ static GType
|
|||
gst_clock_select_clock_id_get_type (void)
|
||||
{
|
||||
static GType clock_id_type = 0;
|
||||
static const GEnumValue clock_id_types[] = {
|
||||
{GST_CLOCK_SELECT_CLOCK_ID_DEFAULT,
|
||||
"Default (elected from elements) pipeline clock", "default"},
|
||||
{GST_CLOCK_SELECT_CLOCK_ID_MONOTONIC, "System monotonic clock",
|
||||
"monotonic"},
|
||||
{GST_CLOCK_SELECT_CLOCK_ID_REALTIME, "System realtime clock", "realtime"},
|
||||
{GST_CLOCK_SELECT_CLOCK_ID_PTP, "PTP clock", "ptp"},
|
||||
{GST_CLOCK_SELECT_CLOCK_ID_TAI, "System TAI clock", "tai"},
|
||||
{0, NULL, NULL},
|
||||
};
|
||||
|
||||
clock_id_type =
|
||||
g_enum_register_static ("GstClockSelectClockId", clock_id_types);
|
||||
if (g_once_init_enter (&clock_id_type)) {
|
||||
GType type;
|
||||
static const GEnumValue clock_id_types[] = {
|
||||
{GST_CLOCK_SELECT_CLOCK_ID_DEFAULT,
|
||||
"Default (elected from elements) pipeline clock", "default"},
|
||||
{GST_CLOCK_SELECT_CLOCK_ID_MONOTONIC, "System monotonic clock",
|
||||
"monotonic"},
|
||||
{GST_CLOCK_SELECT_CLOCK_ID_REALTIME, "System realtime clock", "realtime"},
|
||||
{GST_CLOCK_SELECT_CLOCK_ID_PTP, "PTP clock", "ptp"},
|
||||
{GST_CLOCK_SELECT_CLOCK_ID_TAI, "System TAI clock", "tai"},
|
||||
{0, NULL, NULL},
|
||||
};
|
||||
|
||||
type = g_enum_register_static ("GstClockSelectClockId", clock_id_types);
|
||||
g_once_init_leave (&clock_id_type, type);
|
||||
}
|
||||
|
||||
return clock_id_type;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue