mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-17 04:45:47 +00:00
effectv: 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
6c8eb5bcd6
commit
4d6a69c655
14 changed files with 51 additions and 30 deletions
|
@ -86,6 +86,8 @@ GST_STATIC_PAD_TEMPLATE ("sink",
|
|||
);
|
||||
|
||||
G_DEFINE_TYPE (GstAgingTV, gst_agingtv, GST_TYPE_VIDEO_FILTER);
|
||||
GST_ELEMENT_REGISTER_DEFINE (agingtv, "agingtv", GST_RANK_NONE,
|
||||
GST_TYPE_AGINGTV);
|
||||
|
||||
static void
|
||||
coloraging (guint32 * src, guint32 * dest, gint video_area, gint * c)
|
||||
|
|
|
@ -67,6 +67,7 @@ typedef enum _dice_dir
|
|||
|
||||
#define gst_dicetv_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstDiceTV, gst_dicetv, GST_TYPE_VIDEO_FILTER);
|
||||
GST_ELEMENT_REGISTER_DEFINE (dicetv, "dicetv", GST_RANK_NONE, GST_TYPE_DICETV);
|
||||
|
||||
static void gst_dicetv_create_map (GstDiceTV * filter, GstVideoInfo * info);
|
||||
|
||||
|
|
|
@ -45,9 +45,11 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "gstedge.h"
|
||||
#include "gsteffectv.h"
|
||||
|
||||
#define gst_edgetv_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstEdgeTV, gst_edgetv, GST_TYPE_VIDEO_FILTER);
|
||||
GST_ELEMENT_REGISTER_DEFINE (edgetv, "edgetv", GST_RANK_NONE, GST_TYPE_EDGETV);
|
||||
|
||||
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
|
||||
#define CAPS_STR GST_VIDEO_CAPS_MAKE ("{ BGRx, RGBx }")
|
||||
|
|
|
@ -39,41 +39,25 @@
|
|||
#include "gststreak.h"
|
||||
#include "gstripple.h"
|
||||
|
||||
struct _elements_entry
|
||||
{
|
||||
const gchar *name;
|
||||
GType (*type) (void);
|
||||
};
|
||||
|
||||
static const struct _elements_entry _elements[] = {
|
||||
{"edgetv", gst_edgetv_get_type},
|
||||
{"agingtv", gst_agingtv_get_type},
|
||||
{"dicetv", gst_dicetv_get_type},
|
||||
{"warptv", gst_warptv_get_type},
|
||||
{"shagadelictv", gst_shagadelictv_get_type},
|
||||
{"vertigotv", gst_vertigotv_get_type},
|
||||
{"revtv", gst_revtv_get_type},
|
||||
{"quarktv", gst_quarktv_get_type},
|
||||
{"optv", gst_optv_get_type},
|
||||
{"radioactv", gst_radioactv_get_type},
|
||||
{"streaktv", gst_streaktv_get_type},
|
||||
{"rippletv", gst_rippletv_get_type},
|
||||
{NULL, 0},
|
||||
};
|
||||
|
||||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
gint i = 0;
|
||||
gboolean ret = FALSE;
|
||||
|
||||
while (_elements[i].name) {
|
||||
if (!gst_element_register (plugin, _elements[i].name,
|
||||
GST_RANK_NONE, (_elements[i].type) ()))
|
||||
return FALSE;
|
||||
i++;
|
||||
}
|
||||
ret |= GST_ELEMENT_REGISTER (edgetv, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (agingtv, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (dicetv, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (warptv, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (shagadelictv, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (vertigotv, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (revtv, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (quarktv, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (optv, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (radioactv, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (streaktv, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (rippletv, plugin);
|
||||
|
||||
return TRUE;
|
||||
return ret;
|
||||
}
|
||||
|
||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||
|
|
|
@ -23,6 +23,19 @@
|
|||
|
||||
#include <gst/gst.h>
|
||||
|
||||
GST_ELEMENT_REGISTER_DECLARE (edgetv);
|
||||
GST_ELEMENT_REGISTER_DECLARE (agingtv);
|
||||
GST_ELEMENT_REGISTER_DECLARE (dicetv);
|
||||
GST_ELEMENT_REGISTER_DECLARE (warptv);
|
||||
GST_ELEMENT_REGISTER_DECLARE (shagadelictv);
|
||||
GST_ELEMENT_REGISTER_DECLARE (vertigotv);
|
||||
GST_ELEMENT_REGISTER_DECLARE (revtv);
|
||||
GST_ELEMENT_REGISTER_DECLARE (quarktv);
|
||||
GST_ELEMENT_REGISTER_DECLARE (optv);
|
||||
GST_ELEMENT_REGISTER_DECLARE (radioactv);
|
||||
GST_ELEMENT_REGISTER_DECLARE (streaktv);
|
||||
GST_ELEMENT_REGISTER_DECLARE (rippletv);
|
||||
|
||||
static inline guint
|
||||
fastrand (void)
|
||||
{
|
||||
|
|
|
@ -96,6 +96,7 @@ static guint32 palette[256];
|
|||
|
||||
#define gst_optv_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstOpTV, gst_optv, GST_TYPE_VIDEO_FILTER);
|
||||
GST_ELEMENT_REGISTER_DEFINE (optv, "optv", GST_RANK_NONE, gst_optv_get_type ());
|
||||
|
||||
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
|
||||
#define CAPS_STR GST_VIDEO_CAPS_MAKE ("{ BGRx, RGBx }")
|
||||
|
|
|
@ -60,6 +60,8 @@ enum
|
|||
|
||||
#define gst_quarktv_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstQuarkTV, gst_quarktv, GST_TYPE_VIDEO_FILTER);
|
||||
GST_ELEMENT_REGISTER_DEFINE (quarktv, "quarktv", GST_RANK_NONE,
|
||||
GST_TYPE_QUARKTV);
|
||||
|
||||
static void gst_quarktv_planetable_clear (GstQuarkTV * filter);
|
||||
|
||||
|
|
|
@ -135,6 +135,8 @@ static const gint swap_tab[] = { 2, 1, 0, 3 };
|
|||
|
||||
#define gst_radioactv_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstRadioacTV, gst_radioactv, GST_TYPE_VIDEO_FILTER);
|
||||
GST_ELEMENT_REGISTER_DEFINE (radioactv, "radioactv", GST_RANK_NONE,
|
||||
GST_TYPE_RADIOACTV);
|
||||
|
||||
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
|
||||
#define CAPS_STR GST_VIDEO_CAPS_MAKE ("{ RGBx, BGRx }")
|
||||
|
|
|
@ -62,6 +62,7 @@
|
|||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "gsteffectv.h"
|
||||
#include "gstrev.h"
|
||||
|
||||
#define THE_COLOR 0xffffffff
|
||||
|
@ -76,6 +77,8 @@ enum
|
|||
|
||||
#define gst_revtv_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstRevTV, gst_revtv, GST_TYPE_VIDEO_FILTER);
|
||||
GST_ELEMENT_REGISTER_DEFINE (revtv, "revtv", GST_RANK_NONE,
|
||||
gst_revtv_get_type ());
|
||||
|
||||
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
|
||||
#define CAPS_STR GST_VIDEO_CAPS_MAKE ("{ BGRx, RGBx }")
|
||||
|
|
|
@ -83,6 +83,8 @@ gst_rippletv_mode_get_type (void)
|
|||
|
||||
#define gst_rippletv_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstRippleTV, gst_rippletv, GST_TYPE_VIDEO_FILTER);
|
||||
GST_ELEMENT_REGISTER_DEFINE (rippletv, "rippletv", GST_RANK_NONE,
|
||||
GST_TYPE_RIPPLETV);
|
||||
|
||||
static GstStaticPadTemplate gst_rippletv_src_template =
|
||||
GST_STATIC_PAD_TEMPLATE ("src",
|
||||
|
|
|
@ -51,6 +51,8 @@
|
|||
|
||||
#define gst_shagadelictv_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstShagadelicTV, gst_shagadelictv, GST_TYPE_VIDEO_FILTER);
|
||||
GST_ELEMENT_REGISTER_DEFINE (shagadelictv, "shagadelictv",
|
||||
GST_RANK_NONE, GST_TYPE_SHAGADELICTV);
|
||||
|
||||
static void gst_shagadelic_initialize (GstShagadelicTV * filter,
|
||||
GstVideoInfo * in_info);
|
||||
|
|
|
@ -61,6 +61,8 @@ enum
|
|||
|
||||
#define gst_streaktv_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstStreakTV, gst_streaktv, GST_TYPE_VIDEO_FILTER);
|
||||
GST_ELEMENT_REGISTER_DEFINE (streaktv, "streaktv", GST_RANK_NONE,
|
||||
GST_TYPE_STREAKTV);
|
||||
|
||||
static GstStaticPadTemplate gst_streaktv_src_template =
|
||||
GST_STATIC_PAD_TEMPLATE ("src",
|
||||
|
|
|
@ -41,10 +41,13 @@
|
|||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "gsteffectv.h"
|
||||
#include "gstvertigo.h"
|
||||
|
||||
#define gst_vertigotv_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstVertigoTV, gst_vertigotv, GST_TYPE_VIDEO_FILTER);
|
||||
GST_ELEMENT_REGISTER_DEFINE (vertigotv, "vertigotv", GST_RANK_NONE,
|
||||
GST_TYPE_VERTIGOTV);
|
||||
|
||||
/* Filter signals and args */
|
||||
enum
|
||||
|
|
|
@ -50,6 +50,7 @@
|
|||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "gsteffectv.h"
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
||||
|
@ -63,6 +64,7 @@
|
|||
|
||||
#define gst_warptv_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstWarpTV, gst_warptv, GST_TYPE_VIDEO_FILTER);
|
||||
GST_ELEMENT_REGISTER_DEFINE (warptv, "warptv", GST_RANK_NONE, GST_TYPE_WARPTV);
|
||||
|
||||
static void initSinTable ();
|
||||
static void initDistTable (GstWarpTV * filter, gint width, gint height);
|
||||
|
|
Loading…
Reference in a new issue