From cafb2cfc4d318da51ab66555dbbb45a954443388 Mon Sep 17 00:00:00 2001 From: Niels De Graef Date: Tue, 17 Mar 2020 18:40:26 +0100 Subject: [PATCH] navigation: Use G_DEFINE_INTERFACE --- gst-libs/gst/video/navigation.c | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/gst-libs/gst/video/navigation.c b/gst-libs/gst/video/navigation.c index 4fcffc0..9548168 100644 --- a/gst-libs/gst/video/navigation.c +++ b/gst-libs/gst/video/navigation.c @@ -56,41 +56,16 @@ #include #include -static void gst_navigation_class_init (GstNavigationInterface * iface); - #define GST_NAVIGATION_MESSAGE_NAME "GstNavigationMessage" #define GST_NAVIGATION_QUERY_NAME "GstNavigationQuery" #define GST_NAVIGATION_EVENT_NAME "application/x-gst-navigation" #define WARN_IF_FAIL(exp,msg) if(G_UNLIKELY(!(exp))){g_warning("%s",(msg));} -GType -gst_navigation_get_type (void) -{ - static GType gst_navigation_type = 0; - - if (!gst_navigation_type) { - static const GTypeInfo gst_navigation_info = { - sizeof (GstNavigationInterface), - (GBaseInitFunc) gst_navigation_class_init, - NULL, - NULL, - NULL, - NULL, - 0, - 0, - NULL, - }; - - gst_navigation_type = g_type_register_static (G_TYPE_INTERFACE, - "GstNavigation", &gst_navigation_info, 0); - } - - return gst_navigation_type; -} +G_DEFINE_INTERFACE (GstNavigation, gst_navigation, 0); static void -gst_navigation_class_init (GstNavigationInterface * iface) +gst_navigation_default_init (GstNavigationInterface * iface) { /* default virtual functions */ iface->send_event = NULL; -- 2.7.4