mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 12:10:37 +00:00
ximage: allow per feature registration
Split plugin into features including dynamic types which can be indiviually registered during a static build. More details here: https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199 https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1089>
This commit is contained in:
parent
a176f1a70f
commit
fa416b08b7
4 changed files with 14 additions and 18 deletions
|
@ -23,25 +23,11 @@
|
||||||
|
|
||||||
#include "ximagesink.h"
|
#include "ximagesink.h"
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY (gst_debug_x_image_pool);
|
|
||||||
GST_DEBUG_CATEGORY (gst_debug_x_image_sink);
|
|
||||||
GST_DEBUG_CATEGORY (CAT_PERFORMANCE);
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
plugin_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
if (!gst_element_register (plugin, "ximagesink",
|
return GST_ELEMENT_REGISTER (ximagesink, plugin);
|
||||||
GST_RANK_SECONDARY, GST_TYPE_X_IMAGE_SINK))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_INIT (gst_debug_x_image_sink, "ximagesink", 0,
|
|
||||||
"ximagesink element");
|
|
||||||
GST_DEBUG_CATEGORY_INIT (gst_debug_x_image_pool, "ximagepool", 0,
|
|
||||||
"ximagepool object");
|
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_GET (CAT_PERFORMANCE, "GST_PERFORMANCE");
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#include <gst/video/gstvideometa.h>
|
#include <gst/video/gstvideometa.h>
|
||||||
#include <gst/video/gstvideopool.h>
|
#include <gst/video/gstvideopool.h>
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_EXTERN (gst_debug_x_image_pool);
|
GST_DEBUG_CATEGORY (gst_debug_x_image_pool);
|
||||||
#define GST_CAT_DEFAULT gst_debug_x_image_pool
|
#define GST_CAT_DEFAULT gst_debug_x_image_pool
|
||||||
|
|
||||||
/* X11 stuff */
|
/* X11 stuff */
|
||||||
|
|
|
@ -115,8 +115,10 @@
|
||||||
/* for XkbKeycodeToKeysym */
|
/* for XkbKeycodeToKeysym */
|
||||||
#include <X11/XKBlib.h>
|
#include <X11/XKBlib.h>
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_EXTERN (gst_debug_x_image_sink);
|
GST_DEBUG_CATEGORY_EXTERN (gst_debug_x_image_pool);
|
||||||
GST_DEBUG_CATEGORY_EXTERN (CAT_PERFORMANCE);
|
GST_DEBUG_CATEGORY (gst_debug_x_image_sink);
|
||||||
|
GST_DEBUG_CATEGORY_STATIC (CAT_PERFORMANCE);
|
||||||
|
|
||||||
#define GST_CAT_DEFAULT gst_debug_x_image_sink
|
#define GST_CAT_DEFAULT gst_debug_x_image_sink
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
@ -179,6 +181,13 @@ G_DEFINE_TYPE_WITH_CODE (GstXImageSink, gst_x_image_sink, GST_TYPE_VIDEO_SINK,
|
||||||
G_IMPLEMENT_INTERFACE (GST_TYPE_VIDEO_OVERLAY,
|
G_IMPLEMENT_INTERFACE (GST_TYPE_VIDEO_OVERLAY,
|
||||||
gst_x_image_sink_video_overlay_init));
|
gst_x_image_sink_video_overlay_init));
|
||||||
|
|
||||||
|
#define _do_init \
|
||||||
|
GST_DEBUG_CATEGORY_INIT (gst_debug_x_image_sink, "ximagesink", 0, "ximagesink element");\
|
||||||
|
GST_DEBUG_CATEGORY_INIT (gst_debug_x_image_pool, "ximagepool", 0, "ximagepool object");\
|
||||||
|
GST_DEBUG_CATEGORY_GET (CAT_PERFORMANCE, "GST_PERFORMANCE");
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (ximagesink, "ximagesink",
|
||||||
|
GST_RANK_SECONDARY, GST_TYPE_X_IMAGE_SINK, _do_init);
|
||||||
|
|
||||||
/* ============================================================= */
|
/* ============================================================= */
|
||||||
/* */
|
/* */
|
||||||
/* Private Methods */
|
/* Private Methods */
|
||||||
|
|
|
@ -208,6 +208,7 @@ struct _GstXImageSinkClass
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_x_image_sink_get_type (void);
|
GType gst_x_image_sink_get_type (void);
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (ximagesink);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
#endif /* __GST_X_IMAGE_SINK_H__ */
|
#endif /* __GST_X_IMAGE_SINK_H__ */
|
||||||
|
|
Loading…
Reference in a new issue