G_DEFINE_TYPE_WITH_CODE (GstGtkGLSink, gst_gtk_gl_sink,
GST_TYPE_GTK_BASE_SINK, GST_DEBUG_CATEGORY_INIT (gst_debug_gtk_gl_sink,
"gtkglsink", 0, "Gtk GL Video Sink"));
+GST_ELEMENT_REGISTER_DEFINE (gtkglsink, "gtkglsink", GST_RANK_NONE,
+ GST_TYPE_GTK_GL_SINK);
+
static void
gst_gtk_gl_sink_class_init (GstGtkGLSinkClass * klass)
gulong widget_destroy_sig_handler;
};
+GST_ELEMENT_REGISTER_DECLARE (gtkglsink);
+
G_END_DECLS
#endif /* __GST_GTK_GL_SINK_H__ */
G_DEFINE_TYPE_WITH_CODE (GstGtkSink, gst_gtk_sink, GST_TYPE_GTK_BASE_SINK,
GST_DEBUG_CATEGORY_INIT (gst_debug_gtk_sink, "gtksink", 0,
"Gtk Video Sink"));
+GST_ELEMENT_REGISTER_DEFINE (gtksink, "gtksink", GST_RANK_NONE,
+ GST_TYPE_GTK_SINK);
static void
gst_gtk_sink_class_init (GstGtkSinkClass * klass)
GstGtkBaseSink parent;
};
+GST_ELEMENT_REGISTER_DECLARE (gtksink);
+
G_END_DECLS
#endif /* __GST_GTK_SINK_H__ */
static gboolean
plugin_init (GstPlugin * plugin)
{
- if (!gst_element_register (plugin, "gtksink",
- GST_RANK_NONE, GST_TYPE_GTK_SINK)) {
- return FALSE;
- }
+ gboolean ret = FALSE;
+
+ ret |= GST_ELEMENT_REGISTER (gtksink, plugin);
+
#if defined(HAVE_GTK3_GL)
- if (!gst_element_register (plugin, "gtkglsink",
- GST_RANK_NONE, GST_TYPE_GTK_GL_SINK)) {
- return FALSE;
- }
+ ret |= GST_ELEMENT_REGISTER (gtkglsink, plugin);
#endif
- return TRUE;
+ return ret;
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,