mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
videofilter: 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-good/-/merge_requests/876>
This commit is contained in:
parent
8f1384c977
commit
7cd54ccfc1
9 changed files with 23 additions and 7 deletions
|
@ -102,6 +102,7 @@ static void gst_gamma_before_transform (GstBaseTransform * transform,
|
|||
static void gst_gamma_calculate_tables (GstGamma * gamma);
|
||||
|
||||
G_DEFINE_TYPE (GstGamma, gst_gamma, GST_TYPE_VIDEO_FILTER);
|
||||
GST_ELEMENT_REGISTER_DEFINE (gamma, "gamma", GST_RANK_NONE, GST_TYPE_GAMMA);
|
||||
|
||||
static void
|
||||
gst_gamma_class_init (GstGammaClass * g_class)
|
||||
|
|
|
@ -70,6 +70,8 @@ struct _GstGammaClass
|
|||
|
||||
GType gst_gamma_get_type(void);
|
||||
|
||||
GST_ELEMENT_REGISTER_DECLARE (gamma);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_VIDEO_GAMMA_H__ */
|
||||
|
|
|
@ -101,6 +101,8 @@ G_DEFINE_TYPE_WITH_CODE (GstVideoBalance, gst_video_balance,
|
|||
GST_TYPE_VIDEO_FILTER,
|
||||
G_IMPLEMENT_INTERFACE (GST_TYPE_COLOR_BALANCE,
|
||||
gst_video_balance_colorbalance_init));
|
||||
GST_ELEMENT_REGISTER_DEFINE (videobalance, "videobalance",
|
||||
GST_RANK_NONE, GST_TYPE_VIDEO_BALANCE);
|
||||
|
||||
/*
|
||||
* look-up tables (LUT).
|
||||
|
|
|
@ -74,6 +74,8 @@ struct _GstVideoBalanceClass {
|
|||
|
||||
GType gst_video_balance_get_type(void);
|
||||
|
||||
GST_ELEMENT_REGISTER_DECLARE (videobalance);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_VIDEO_BALANCE_H__ */
|
||||
|
|
|
@ -124,6 +124,8 @@ gst_video_flip_video_direction_interface_init (GstVideoDirectionInterface *
|
|||
G_DEFINE_TYPE_WITH_CODE (GstVideoFlip, gst_video_flip, GST_TYPE_VIDEO_FILTER,
|
||||
G_IMPLEMENT_INTERFACE (GST_TYPE_VIDEO_DIRECTION,
|
||||
gst_video_flip_video_direction_interface_init));
|
||||
GST_ELEMENT_REGISTER_DEFINE (videoflip, "videoflip", GST_RANK_NONE,
|
||||
GST_TYPE_VIDEO_FLIP);
|
||||
|
||||
static GstCaps *
|
||||
gst_video_flip_transform_caps (GstBaseTransform * trans,
|
||||
|
|
|
@ -92,6 +92,8 @@ struct _GstVideoFlipClass {
|
|||
|
||||
GType gst_video_flip_get_type (void);
|
||||
|
||||
GST_ELEMENT_REGISTER_DECLARE (videoflip);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_VIDEO_FLIP_H__ */
|
||||
|
|
|
@ -76,6 +76,8 @@ gst_video_median_size_get_type (void)
|
|||
|
||||
#define gst_video_median_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstVideoMedian, gst_video_median, GST_TYPE_VIDEO_FILTER);
|
||||
GST_ELEMENT_REGISTER_DEFINE (videomedian, "videomedian",
|
||||
GST_RANK_NONE, GST_TYPE_VIDEO_MEDIAN);
|
||||
|
||||
static GstFlowReturn gst_video_median_transform_frame (GstVideoFilter * filter,
|
||||
GstVideoFrame * in_frame, GstVideoFrame * out_frame);
|
||||
|
|
|
@ -61,6 +61,8 @@ struct _GstVideoMedianClass {
|
|||
|
||||
GType gst_video_median_get_type (void);
|
||||
|
||||
GST_ELEMENT_REGISTER_DECLARE (videomedian);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_VIDEO_MEDIAN_H__ */
|
||||
|
|
|
@ -31,13 +31,14 @@
|
|||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
return (gst_element_register (plugin, "gamma", GST_RANK_NONE, GST_TYPE_GAMMA)
|
||||
&& gst_element_register (plugin, "videobalance", GST_RANK_NONE,
|
||||
GST_TYPE_VIDEO_BALANCE)
|
||||
&& gst_element_register (plugin, "videoflip", GST_RANK_NONE,
|
||||
GST_TYPE_VIDEO_FLIP)
|
||||
&& gst_element_register (plugin, "videomedian", GST_RANK_NONE,
|
||||
GST_TYPE_VIDEO_MEDIAN));
|
||||
gboolean ret = FALSE;
|
||||
|
||||
ret |= GST_ELEMENT_REGISTER (gamma, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (videobalance, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (videoflip, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (videomedian, plugin);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||
|
|
Loading…
Reference in a new issue