diff --git a/sys/xvimage/xvcontext.c b/sys/xvimage/xvcontext.c index b240cc839..56dee97e0 100644 --- a/sys/xvimage/xvcontext.c +++ b/sys/xvimage/xvcontext.c @@ -33,7 +33,7 @@ /* for XkbKeycodeToKeysym */ #include -GST_DEBUG_CATEGORY_EXTERN (gst_debug_xv_context); +GST_DEBUG_CATEGORY (gst_debug_xv_context); #define GST_CAT_DEFAULT gst_debug_xv_context void diff --git a/sys/xvimage/xvimage.c b/sys/xvimage/xvimage.c index e0295bc69..837306e65 100644 --- a/sys/xvimage/xvimage.c +++ b/sys/xvimage/xvimage.c @@ -23,25 +23,11 @@ #include "xvimagesink.h" -GST_DEBUG_CATEGORY (gst_debug_xv_context); -GST_DEBUG_CATEGORY (gst_debug_xv_image_pool); -GST_DEBUG_CATEGORY (gst_debug_xv_image_sink); static gboolean plugin_init (GstPlugin * plugin) { - if (!gst_element_register (plugin, "xvimagesink", - GST_RANK_PRIMARY, GST_TYPE_XV_IMAGE_SINK)) - return FALSE; - - GST_DEBUG_CATEGORY_INIT (gst_debug_xv_context, "xcontext", 0, - "xcontext miniobject"); - GST_DEBUG_CATEGORY_INIT (gst_debug_xv_image_sink, "xvimagesink", 0, - "xvimagesink element"); - GST_DEBUG_CATEGORY_INIT (gst_debug_xv_image_pool, "xvimagepool", 0, - "xvimagepool object"); - - return TRUE; + return GST_ELEMENT_REGISTER (xvimagesink, plugin);; } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, diff --git a/sys/xvimage/xvimagepool.c b/sys/xvimage/xvimagepool.c index fb87c7bfa..6e9a57d63 100644 --- a/sys/xvimage/xvimagepool.c +++ b/sys/xvimage/xvimagepool.c @@ -34,7 +34,7 @@ #include -GST_DEBUG_CATEGORY_EXTERN (gst_debug_xv_image_pool); +GST_DEBUG_CATEGORY (gst_debug_xv_image_pool); #define GST_CAT_DEFAULT gst_debug_xv_image_pool /* bufferpool */ diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c index aded234fe..352648982 100644 --- a/sys/xvimage/xvimagesink.c +++ b/sys/xvimage/xvimagesink.c @@ -132,7 +132,10 @@ /* for XkbKeycodeToKeysym */ #include -GST_DEBUG_CATEGORY_EXTERN (gst_debug_xv_image_sink); +GST_DEBUG_CATEGORY_EXTERN (gst_debug_xv_context); +GST_DEBUG_CATEGORY_EXTERN (gst_debug_xv_image_pool); +GST_DEBUG_CATEGORY (gst_debug_xv_image_sink); + #define GST_CAT_DEFAULT gst_debug_xv_image_sink GST_DEBUG_CATEGORY_STATIC (GST_CAT_PERFORMANCE); @@ -213,7 +216,13 @@ G_DEFINE_TYPE_WITH_CODE (GstXvImageSink, gst_xv_image_sink, GST_TYPE_VIDEO_SINK, gst_xv_image_sink_video_overlay_init); G_IMPLEMENT_INTERFACE (GST_TYPE_COLOR_BALANCE, gst_xv_image_sink_colorbalance_init)); +#define _do_init \ + GST_DEBUG_CATEGORY_INIT (gst_debug_xv_context, "xcontext", 0, "xcontext miniobject");\ + GST_DEBUG_CATEGORY_INIT (gst_debug_xv_image_sink, "xvimagesink", 0, "ximagesink element");\ + GST_DEBUG_CATEGORY_INIT (gst_debug_xv_image_pool, "xvimagepool", 0, "ximagepool object");\ +GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (xvimagesink, "xvimagesink", + GST_RANK_PRIMARY, GST_TYPE_XV_IMAGE_SINK, _do_init); /* ============================================================= */ /* */ diff --git a/sys/xvimage/xvimagesink.h b/sys/xvimage/xvimagesink.h index 9bf4d79c8..6f5ffa156 100644 --- a/sys/xvimage/xvimagesink.h +++ b/sys/xvimage/xvimagesink.h @@ -132,6 +132,7 @@ struct _GstXvImageSinkClass }; GType gst_xv_image_sink_get_type (void); +GST_ELEMENT_REGISTER_DECLARE (xvimagesink); G_END_DECLS #endif /* __GST_XV_IMAGE_SINK_H__ */