mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 19:55:32 +00:00
navigation: Use G_DEFINE_INTERFACE
This commit is contained in:
parent
21a107294d
commit
cafb2cfc4d
1 changed files with 2 additions and 27 deletions
|
@ -56,41 +56,16 @@
|
||||||
#include <gst/video/navigation.h>
|
#include <gst/video/navigation.h>
|
||||||
#include <gst/video/video-enumtypes.h>
|
#include <gst/video/video-enumtypes.h>
|
||||||
|
|
||||||
static void gst_navigation_class_init (GstNavigationInterface * iface);
|
|
||||||
|
|
||||||
#define GST_NAVIGATION_MESSAGE_NAME "GstNavigationMessage"
|
#define GST_NAVIGATION_MESSAGE_NAME "GstNavigationMessage"
|
||||||
#define GST_NAVIGATION_QUERY_NAME "GstNavigationQuery"
|
#define GST_NAVIGATION_QUERY_NAME "GstNavigationQuery"
|
||||||
#define GST_NAVIGATION_EVENT_NAME "application/x-gst-navigation"
|
#define GST_NAVIGATION_EVENT_NAME "application/x-gst-navigation"
|
||||||
|
|
||||||
#define WARN_IF_FAIL(exp,msg) if(G_UNLIKELY(!(exp))){g_warning("%s",(msg));}
|
#define WARN_IF_FAIL(exp,msg) if(G_UNLIKELY(!(exp))){g_warning("%s",(msg));}
|
||||||
|
|
||||||
GType
|
G_DEFINE_INTERFACE (GstNavigation, gst_navigation, 0);
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_navigation_class_init (GstNavigationInterface * iface)
|
gst_navigation_default_init (GstNavigationInterface * iface)
|
||||||
{
|
{
|
||||||
/* default virtual functions */
|
/* default virtual functions */
|
||||||
iface->send_event = NULL;
|
iface->send_event = NULL;
|
||||||
|
|
Loading…
Reference in a new issue