summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2017-09-22 15:12:05 +0200
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2017-09-22 20:06:42 +0200
commit9116ffb7b759669271595ee298666c1e34b10ad7 (patch)
treeea1803fe0c987c50b69cc16e17e31897bdc60f00 /gst-libs
parent684babb0d0f76f1eadeaf7fea4c8ee028a3594c5 (diff)
libs: display: remove libgstvaapi_init_once()
It is not required since it can be unrolled in gst_vaapi_display_class_init() https://bugzilla.gnome.org/show_bug.cgi?id=788058
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/vaapi/gstvaapidisplay.c29
1 files changed, 8 insertions, 21 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidisplay.c b/gst-libs/gst/vaapi/gstvaapidisplay.c
index 6575e4e7..2881cd93 100644
--- a/gst-libs/gst/vaapi/gstvaapidisplay.c
+++ b/gst-libs/gst/vaapi/gstvaapidisplay.c
@@ -43,10 +43,11 @@ GST_DEBUG_CATEGORY (gst_debug_vaapi);
GST_DEBUG_CATEGORY (gst_debug_vaapi_display);
#define GST_CAT_DEFAULT gst_debug_vaapi_display
-#define _do_init \
- G_ADD_PRIVATE (GstVaapiDisplay); \
- GST_DEBUG_CATEGORY_INIT (gst_debug_vaapi_display, \
- "vaapidisplay", 0, "VA-API Display");
+#define _do_init \
+ G_ADD_PRIVATE (GstVaapiDisplay); \
+ GST_DEBUG_CATEGORY_INIT (gst_debug_vaapi_display, \
+ "vaapidisplay", 0, "VA-API Display"); \
+ GST_DEBUG_CATEGORY_INIT (gst_debug_vaapi, "vaapi", 0, "VA-API helper");
G_DEFINE_TYPE_WITH_CODE (GstVaapiDisplay, gst_vaapi_display, GST_TYPE_OBJECT,
_do_init);
@@ -112,21 +113,6 @@ get_color_balance (GstVaapiDisplay * display, guint prop_id, gfloat * v);
static gboolean
set_color_balance (GstVaapiDisplay * display, guint prop_id, gfloat v);
-static void
-libgstvaapi_init_once (void)
-{
- static gsize g_once = FALSE;
-
- if (!g_once_init_enter (&g_once))
- return;
-
- GST_DEBUG_CATEGORY_INIT (gst_debug_vaapi, "vaapi", 0, "VA-API helper");
-
- gst_vaapi_display_properties_init ();
-
- g_once_init_leave (&g_once, TRUE);
-}
-
/* GstVaapiDisplayType enumerations */
GType
gst_vaapi_display_type_get_type (void)
@@ -972,11 +958,12 @@ gst_vaapi_display_class_init (GstVaapiDisplayClass * klass)
{
GObjectClass *const object_class = G_OBJECT_CLASS (klass);
- libgstvaapi_init_once ();
-
object_class->finalize = gst_vaapi_display_finalize;
+
klass->lock = gst_vaapi_display_lock_default;
klass->unlock = gst_vaapi_display_unlock_default;
+
+ gst_vaapi_display_properties_init ();
}
static void