mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-11 00:42:36 +00:00
Port all elements that can be ported to videofilter, and fix up the caps.
Original commit message from CVS: Port all elements that can be ported to videofilter, and fix up the caps. Can someone with a big-endian machine please check them?
This commit is contained in:
parent
2cb6e77679
commit
efe98f1030
10 changed files with 393 additions and 425 deletions
26
ChangeLog
26
ChangeLog
|
@ -1,3 +1,29 @@
|
||||||
|
2004-03-13 Jan Schmidt <thaytan@mad.scientist.com>
|
||||||
|
* gst/effectv/gstaging.c: (gst_agingtv_base_init),
|
||||||
|
(gst_agingtv_setup):
|
||||||
|
* gst/effectv/gstdice.c: (gst_dicetv_get_type),
|
||||||
|
(gst_dicetv_base_init), (gst_dicetv_class_init),
|
||||||
|
(gst_dicetv_setup), (gst_dicetv_init), (gst_dicetv_draw):
|
||||||
|
* gst/effectv/gstedge.c: (gst_edgetv_get_type),
|
||||||
|
(gst_edgetv_base_init), (gst_edgetv_class_init), (gst_edgetv_init),
|
||||||
|
(gst_edgetv_setup), (gst_edgetv_rgb32):
|
||||||
|
* gst/effectv/gsteffectv.c:
|
||||||
|
* gst/effectv/gstquark.c: (gst_quarktv_link), (gst_quarktv_init),
|
||||||
|
(gst_quarktv_set_property):
|
||||||
|
* gst/effectv/gstrev.c: (gst_revtv_get_type),
|
||||||
|
(gst_revtv_base_init), (gst_revtv_class_init), (gst_revtv_init),
|
||||||
|
(gst_revtv_setup), (gst_revtv_rgb32):
|
||||||
|
* gst/effectv/gstshagadelic.c: (gst_shagadelictv_get_type),
|
||||||
|
(gst_shagadelictv_base_init), (gst_shagadelictv_class_init),
|
||||||
|
(gst_shagadelictv_init), (gst_shagadelictv_setup),
|
||||||
|
(gst_shagadelictv_rgb32):
|
||||||
|
* gst/effectv/gstvertigo.c: (gst_vertigotv_get_type),
|
||||||
|
(gst_vertigotv_base_init), (gst_vertigotv_class_init),
|
||||||
|
(gst_vertigotv_setup), (gst_vertigotv_init), (gst_vertigotv_rgb32):
|
||||||
|
* gst/effectv/gstwarp.c:
|
||||||
|
Port everything that can be ported to videofilter and fix up the caps.
|
||||||
|
Can someone with a big-endian machine please check these?
|
||||||
|
|
||||||
2004-03-10 Ronald Bultje <rbultje@ronald.bitfreak.net>
|
2004-03-10 Ronald Bultje <rbultje@ronald.bitfreak.net>
|
||||||
|
|
||||||
* sys/oss/gstosssink.c: (gst_osssink_init), (gst_osssink_get_time),
|
* sys/oss/gstosssink.c: (gst_osssink_init), (gst_osssink_get_time),
|
||||||
|
|
|
@ -41,9 +41,6 @@
|
||||||
#include <gstvideofilter.h>
|
#include <gstvideofilter.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include "gsteffectv.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define GST_TYPE_AGINGTV \
|
#define GST_TYPE_AGINGTV \
|
||||||
(gst_agingtv_get_type())
|
(gst_agingtv_get_type())
|
||||||
|
@ -89,7 +86,6 @@ struct _GstAgingTVClass {
|
||||||
GstVideofilterClass parent_class;
|
GstVideofilterClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* GstAgingTV signals and args */
|
/* GstAgingTV signals and args */
|
||||||
enum {
|
enum {
|
||||||
/* FILL ME */
|
/* FILL ME */
|
||||||
|
@ -103,12 +99,12 @@ enum {
|
||||||
|
|
||||||
static void gst_agingtv_base_init (gpointer g_class);
|
static void gst_agingtv_base_init (gpointer g_class);
|
||||||
static void gst_agingtv_class_init (gpointer g_class, gpointer class_data);
|
static void gst_agingtv_class_init (gpointer g_class, gpointer class_data);
|
||||||
static void gst_agingtv_init (GTypeInstance *instance, gpointer g_class);
|
static void gst_agingtv_init (GTypeInstance *instance, gpointer g_class);
|
||||||
static void gst_agingtv_setup(GstVideofilter *videofilter);
|
static void gst_agingtv_setup (GstVideofilter *videofilter);
|
||||||
|
|
||||||
static void gst_agingtv_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
|
static void gst_agingtv_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
|
||||||
static void gst_agingtv_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
|
static void gst_agingtv_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
|
||||||
static void gst_agingtv_rgb32 (GstVideofilter *videofilter, void *d, void *s);
|
static void gst_agingtv_rgb32 (GstVideofilter *videofilter, void *d, void *s);
|
||||||
|
|
||||||
GType
|
GType
|
||||||
gst_agingtv_get_type (void)
|
gst_agingtv_get_type (void)
|
||||||
|
@ -134,12 +130,8 @@ gst_agingtv_get_type (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstVideofilterFormat gst_agingtv_formats[] = {
|
static GstVideofilterFormat gst_agingtv_formats[] = {
|
||||||
{ "RGB ", 32, gst_agingtv_rgb32, 24, G_BIG_ENDIAN, 0x00ff0000, 0x0000ff00, 0x000000ff },
|
{ "RGB ", 32, gst_agingtv_rgb32, 24, G_BIG_ENDIAN, 0x0000ff00, 0x00ff0000, 0xff000000 }
|
||||||
{ "RGB ", 32, gst_agingtv_rgb32, 24, G_BIG_ENDIAN, 0xff000000, 0x00ff0000, 0x0000ff00 },
|
|
||||||
{ "RGB ", 32, gst_agingtv_rgb32, 24, G_BIG_ENDIAN, 0x000000ff, 0x0000ff00, 0x00ff0000 },
|
|
||||||
{ "RGB ", 32, gst_agingtv_rgb32, 24, G_BIG_ENDIAN, 0x0000ff00, 0x00ff0000, 0xff000000 },
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_agingtv_base_init (gpointer g_class)
|
gst_agingtv_base_init (gpointer g_class)
|
||||||
|
@ -147,7 +139,7 @@ gst_agingtv_base_init (gpointer g_class)
|
||||||
static GstElementDetails agingtv_details = GST_ELEMENT_DETAILS (
|
static GstElementDetails agingtv_details = GST_ELEMENT_DETAILS (
|
||||||
"AgingTV",
|
"AgingTV",
|
||||||
"Filter/Effect/Video",
|
"Filter/Effect/Video",
|
||||||
"AgingTV does realtime goo'ing of the video input",
|
"AgingTV adds age to video input using scratches and dust",
|
||||||
"Sam Lantinga <slouken@devolution.com>"
|
"Sam Lantinga <slouken@devolution.com>"
|
||||||
);
|
);
|
||||||
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
|
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
|
||||||
|
@ -212,7 +204,6 @@ static void gst_agingtv_setup(GstVideofilter *videofilter)
|
||||||
|
|
||||||
agingtv->width = width;
|
agingtv->width = width;
|
||||||
agingtv->height = height;
|
agingtv->height = height;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int
|
static unsigned int
|
||||||
|
|
|
@ -15,14 +15,14 @@
|
||||||
#endif
|
#endif
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include "gsteffectv.h"
|
#include <gstvideofilter.h>
|
||||||
|
|
||||||
#define GST_TYPE_DICETV \
|
#define GST_TYPE_DICETV \
|
||||||
(gst_dicetv_get_type())
|
(gst_dicetv_get_type())
|
||||||
#define GST_DICETV(obj) \
|
#define GST_DICETV(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DICETV,GstDiceTV))
|
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DICETV,GstDiceTV))
|
||||||
#define GST_DICETV_CLASS(klass) \
|
#define GST_DICETV_CLASS(klass) \
|
||||||
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ULAW,GstDiceTV))
|
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DICETV,GstDiceTVClass))
|
||||||
#define GST_IS_DICETV(obj) \
|
#define GST_IS_DICETV(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DICETV))
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DICETV))
|
||||||
#define GST_IS_DICETV_CLASS(obj) \
|
#define GST_IS_DICETV_CLASS(obj) \
|
||||||
|
@ -45,9 +45,7 @@ typedef enum _dice_dir
|
||||||
|
|
||||||
struct _GstDiceTV
|
struct _GstDiceTV
|
||||||
{
|
{
|
||||||
GstElement element;
|
GstVideofilter videofilter;
|
||||||
|
|
||||||
GstPad *sinkpad, *srcpad;
|
|
||||||
|
|
||||||
gint width, height;
|
gint width, height;
|
||||||
gchar* dicemap;
|
gchar* dicemap;
|
||||||
|
@ -60,20 +58,11 @@ struct _GstDiceTV
|
||||||
|
|
||||||
struct _GstDiceTVClass
|
struct _GstDiceTVClass
|
||||||
{
|
{
|
||||||
GstElementClass parent_class;
|
GstVideofilterClass parent_class;
|
||||||
|
|
||||||
void (*reset) (GstElement *element);
|
void (*reset) (GstElement *element);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* elementfactory information */
|
|
||||||
static GstElementDetails gst_dicetv_details = GST_ELEMENT_DETAILS (
|
|
||||||
"DiceTV",
|
|
||||||
"Filter/Effect/Video",
|
|
||||||
"'Dices' the screen up into many small squares",
|
|
||||||
"Wim Taymans <wim.taymans@chello.be>"
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
/* Filter signals and args */
|
/* Filter signals and args */
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
@ -88,9 +77,9 @@ enum
|
||||||
ARG_CUBE_BITS,
|
ARG_CUBE_BITS,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void gst_dicetv_base_init (gpointer g_class);
|
static void gst_dicetv_base_init (gpointer g_class);
|
||||||
static void gst_dicetv_class_init (GstDiceTVClass * klass);
|
static void gst_dicetv_class_init (gpointer g_class, gpointer class_data);
|
||||||
static void gst_dicetv_init (GstDiceTV * filter);
|
static void gst_dicetv_init (GTypeInstance *instance, gpointer g_class);
|
||||||
|
|
||||||
static void gst_dicetv_reset_handler (GstElement *elem);
|
static void gst_dicetv_reset_handler (GstElement *elem);
|
||||||
static void gst_dicetv_create_map (GstDiceTV *filter);
|
static void gst_dicetv_create_map (GstDiceTV *filter);
|
||||||
|
@ -99,10 +88,9 @@ static void gst_dicetv_set_property (GObject * object, guint prop_id,
|
||||||
const GValue * value, GParamSpec * pspec);
|
const GValue * value, GParamSpec * pspec);
|
||||||
static void gst_dicetv_get_property (GObject * object, guint prop_id,
|
static void gst_dicetv_get_property (GObject * object, guint prop_id,
|
||||||
GValue * value, GParamSpec * pspec);
|
GValue * value, GParamSpec * pspec);
|
||||||
|
static void gst_dicetv_setup (GstVideofilter *videofilter);
|
||||||
|
static void gst_dicetv_draw (GstVideofilter *videofilter, void *d, void *s);
|
||||||
|
|
||||||
static void gst_dicetv_chain (GstPad * pad, GstData *_data);
|
|
||||||
|
|
||||||
static GstElementClass *parent_class = NULL;
|
|
||||||
static guint gst_dicetv_signals[LAST_SIGNAL] = { 0 };
|
static guint gst_dicetv_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
GType gst_dicetv_get_type (void)
|
GType gst_dicetv_get_type (void)
|
||||||
|
@ -122,86 +110,95 @@ GType gst_dicetv_get_type (void)
|
||||||
(GInstanceInitFunc) gst_dicetv_init,
|
(GInstanceInitFunc) gst_dicetv_init,
|
||||||
};
|
};
|
||||||
|
|
||||||
dicetv_type = g_type_register_static (GST_TYPE_ELEMENT, "GstDiceTV", &dicetv_info, 0);
|
dicetv_type = g_type_register_static (GST_TYPE_VIDEOFILTER, "GstDiceTV", &dicetv_info, 0);
|
||||||
}
|
}
|
||||||
return dicetv_type;
|
return dicetv_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static GstVideofilterFormat gst_dicetv_formats[] = {
|
||||||
|
{ "RGB ", 32, gst_dicetv_draw, 24, G_BIG_ENDIAN, 0x00ff0000, 0x0000ff00, 0x000000ff },
|
||||||
|
{ "RGB ", 32, gst_dicetv_draw, 24, G_BIG_ENDIAN, 0xff000000, 0x00ff0000, 0x0000ff00 },
|
||||||
|
{ "RGB ", 32, gst_dicetv_draw, 24, G_BIG_ENDIAN, 0x000000ff, 0x0000ff00, 0x00ff0000 },
|
||||||
|
{ "RGB ", 32, gst_dicetv_draw, 24, G_BIG_ENDIAN, 0x0000ff00, 0x00ff0000, 0xff000000 },
|
||||||
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_dicetv_base_init (gpointer g_class)
|
gst_dicetv_base_init (gpointer g_class)
|
||||||
{
|
{
|
||||||
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
|
/* elementfactory information */
|
||||||
|
static GstElementDetails gst_dicetv_details = GST_ELEMENT_DETAILS (
|
||||||
|
"DiceTV",
|
||||||
|
"Filter/Effect/Video",
|
||||||
|
"'Dices' the screen up into many small squares",
|
||||||
|
"Wim Taymans <wim.taymans@chello.be>"
|
||||||
|
);
|
||||||
|
|
||||||
gst_element_class_add_pad_template (element_class,
|
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
|
||||||
gst_static_pad_template_get (&gst_effectv_src_template));
|
GstVideofilterClass *videofilter_class = GST_VIDEOFILTER_CLASS (g_class);
|
||||||
gst_element_class_add_pad_template (element_class,
|
int i;
|
||||||
gst_static_pad_template_get (&gst_effectv_sink_template));
|
|
||||||
|
|
||||||
gst_element_class_set_details (element_class, &gst_dicetv_details);
|
gst_element_class_set_details (element_class, &gst_dicetv_details);
|
||||||
|
|
||||||
|
for(i=0; i < G_N_ELEMENTS(gst_dicetv_formats); i++) {
|
||||||
|
gst_videofilter_class_add_format(videofilter_class,
|
||||||
|
gst_dicetv_formats + i);
|
||||||
|
}
|
||||||
|
|
||||||
|
gst_videofilter_class_add_pad_templates (GST_VIDEOFILTER_CLASS (g_class));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_dicetv_class_init (GstDiceTVClass * klass)
|
gst_dicetv_class_init (gpointer g_class, gpointer class_data)
|
||||||
{
|
{
|
||||||
GObjectClass *gobject_class;
|
GObjectClass *gobject_class;
|
||||||
GstElementClass *gstelement_class;
|
GstVideofilterClass *videofilter_class;
|
||||||
|
GstDiceTVClass *dicetv_class;
|
||||||
|
|
||||||
gobject_class = (GObjectClass *) klass;
|
gobject_class = G_OBJECT_CLASS (g_class);
|
||||||
gstelement_class = (GstElementClass *) klass;
|
videofilter_class = GST_VIDEOFILTER_CLASS (g_class);
|
||||||
|
dicetv_class = GST_DICETV_CLASS (g_class);
|
||||||
parent_class = g_type_class_ref (GST_TYPE_ELEMENT);
|
|
||||||
|
|
||||||
gst_dicetv_signals[RESET_SIGNAL] =
|
gst_dicetv_signals[RESET_SIGNAL] =
|
||||||
g_signal_new ("reset",
|
g_signal_new ("reset",
|
||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (g_class),
|
||||||
G_SIGNAL_RUN_LAST,
|
G_SIGNAL_RUN_LAST,
|
||||||
G_STRUCT_OFFSET (GstDiceTVClass, reset),
|
G_STRUCT_OFFSET (GstDiceTVClass, reset),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
g_cclosure_marshal_VOID__VOID,
|
g_cclosure_marshal_VOID__VOID,
|
||||||
G_TYPE_NONE, 0);
|
G_TYPE_NONE, 0);
|
||||||
|
|
||||||
klass->reset = gst_dicetv_reset_handler;
|
dicetv_class->reset = gst_dicetv_reset_handler;
|
||||||
|
|
||||||
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_CUBE_BITS,
|
g_object_class_install_property (gobject_class, ARG_CUBE_BITS,
|
||||||
g_param_spec_int ("square_bits","Square Bits","The size of the Squares",
|
g_param_spec_int ("square_bits","Square Bits","The size of the Squares",
|
||||||
MIN_CUBE_BITS, MAX_CUBE_BITS, DEFAULT_CUBE_BITS, G_PARAM_READWRITE));
|
MIN_CUBE_BITS, MAX_CUBE_BITS, DEFAULT_CUBE_BITS, G_PARAM_READWRITE));
|
||||||
|
|
||||||
gobject_class->set_property = gst_dicetv_set_property;
|
gobject_class->set_property = gst_dicetv_set_property;
|
||||||
gobject_class->get_property = gst_dicetv_get_property;
|
gobject_class->get_property = gst_dicetv_get_property;
|
||||||
}
|
|
||||||
|
|
||||||
static GstPadLinkReturn
|
videofilter_class->setup = gst_dicetv_setup;
|
||||||
gst_dicetv_sinkconnect (GstPad * pad, const GstCaps * caps)
|
|
||||||
{
|
|
||||||
GstDiceTV *filter;
|
|
||||||
GstStructure *structure;
|
|
||||||
|
|
||||||
filter = GST_DICETV (gst_pad_get_parent (pad));
|
|
||||||
|
|
||||||
structure = gst_caps_get_structure (caps, 0);
|
|
||||||
|
|
||||||
gst_structure_get_int (structure, "width", &filter->width);
|
|
||||||
gst_structure_get_int (structure, "height", &filter->height);
|
|
||||||
|
|
||||||
g_free (filter->dicemap);
|
|
||||||
filter->dicemap = (gchar *) g_malloc (filter->height * filter->width * sizeof(char));
|
|
||||||
gst_dicetv_create_map (filter);
|
|
||||||
|
|
||||||
return gst_pad_try_set_caps (filter->srcpad, caps);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_dicetv_init (GstDiceTV * filter)
|
gst_dicetv_setup (GstVideofilter *videofilter)
|
||||||
{
|
{
|
||||||
filter->sinkpad = gst_pad_new_from_template (
|
GstDiceTV *dicetv;
|
||||||
gst_static_pad_template_get (&gst_effectv_sink_template), "sink");
|
|
||||||
gst_pad_set_chain_function (filter->sinkpad, gst_dicetv_chain);
|
|
||||||
gst_pad_set_link_function (filter->sinkpad, gst_dicetv_sinkconnect);
|
|
||||||
gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad);
|
|
||||||
|
|
||||||
filter->srcpad = gst_pad_new_from_template (
|
g_return_if_fail (GST_IS_DICETV (videofilter));
|
||||||
gst_static_pad_template_get (&gst_effectv_src_template), "src");
|
dicetv = GST_DICETV (videofilter);
|
||||||
gst_element_add_pad (GST_ELEMENT (filter), filter->srcpad);
|
|
||||||
|
dicetv->width = gst_videofilter_get_input_width (videofilter);
|
||||||
|
dicetv->height = gst_videofilter_get_input_height (videofilter);
|
||||||
|
|
||||||
|
g_free (dicetv->dicemap);
|
||||||
|
dicetv->dicemap = (gchar *) g_malloc (dicetv->height * dicetv->width * sizeof(char));
|
||||||
|
gst_dicetv_create_map (dicetv);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gst_dicetv_init (GTypeInstance *instance, gpointer g_class)
|
||||||
|
{
|
||||||
|
GstDiceTV *filter = GST_DICETV (instance);
|
||||||
|
|
||||||
filter->dicemap = NULL;
|
filter->dicemap = NULL;
|
||||||
filter->g_cube_bits = DEFAULT_CUBE_BITS;
|
filter->g_cube_bits = DEFAULT_CUBE_BITS;
|
||||||
|
@ -218,7 +215,6 @@ gst_dicetv_reset_handler (GstElement *element)
|
||||||
gst_dicetv_create_map (filter);
|
gst_dicetv_create_map (filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static unsigned int
|
static unsigned int
|
||||||
fastrand (void)
|
fastrand (void)
|
||||||
{
|
{
|
||||||
|
@ -228,8 +224,11 @@ fastrand (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_dicetv_draw (GstDiceTV *filter, guint32 *src, guint32 *dest)
|
gst_dicetv_draw (GstVideofilter *videofilter, void *d, void *s)
|
||||||
{
|
{
|
||||||
|
GstDiceTV *filter;
|
||||||
|
guint32 *src;
|
||||||
|
guint32 *dest;
|
||||||
gint i;
|
gint i;
|
||||||
gint map_x, map_y, map_i;
|
gint map_x, map_y, map_i;
|
||||||
gint base;
|
gint base;
|
||||||
|
@ -238,6 +237,14 @@ gst_dicetv_draw (GstDiceTV *filter, guint32 *src, guint32 *dest)
|
||||||
gint g_cube_bits = filter->g_cube_bits;
|
gint g_cube_bits = filter->g_cube_bits;
|
||||||
gint g_cube_size = filter->g_cube_size;
|
gint g_cube_size = filter->g_cube_size;
|
||||||
|
|
||||||
|
filter = GST_DICETV (videofilter);
|
||||||
|
src = (guint32 *)s;
|
||||||
|
dest = (guint32 *)d;
|
||||||
|
|
||||||
|
video_width = filter->width;
|
||||||
|
g_cube_bits = filter->g_cube_bits;
|
||||||
|
g_cube_size = filter->g_cube_size;
|
||||||
|
|
||||||
map_i = 0;
|
map_i = 0;
|
||||||
for (map_y = 0; map_y < filter->g_map_height; map_y++) {
|
for (map_y = 0; map_y < filter->g_map_height; map_y++) {
|
||||||
for (map_x = 0; map_x < filter->g_map_width; map_x++) {
|
for (map_x = 0; map_x < filter->g_map_width; map_x++) {
|
||||||
|
@ -314,30 +321,6 @@ gst_dicetv_create_map (GstDiceTV *filter)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
gst_dicetv_chain (GstPad * pad, GstData *_data)
|
|
||||||
{
|
|
||||||
GstBuffer *buf = GST_BUFFER (_data);
|
|
||||||
GstDiceTV *filter;
|
|
||||||
guint32 *src, *dest;
|
|
||||||
GstBuffer *outbuf;
|
|
||||||
|
|
||||||
filter = GST_DICETV (gst_pad_get_parent (pad));
|
|
||||||
|
|
||||||
src = (guint32 *) GST_BUFFER_DATA (buf);
|
|
||||||
|
|
||||||
outbuf = gst_buffer_new ();
|
|
||||||
GST_BUFFER_SIZE (outbuf) = (filter->width * filter->height * sizeof(guint32));
|
|
||||||
dest = (guint32 *) GST_BUFFER_DATA (outbuf) = g_malloc (GST_BUFFER_SIZE (outbuf));
|
|
||||||
GST_BUFFER_TIMESTAMP (outbuf) = GST_BUFFER_TIMESTAMP (buf);
|
|
||||||
|
|
||||||
gst_dicetv_draw (filter, src, dest);
|
|
||||||
|
|
||||||
gst_buffer_unref (buf);
|
|
||||||
|
|
||||||
gst_pad_push (filter->srcpad, GST_DATA (outbuf));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_dicetv_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec)
|
gst_dicetv_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec)
|
||||||
{
|
{
|
||||||
|
|
|
@ -26,14 +26,14 @@
|
||||||
#endif
|
#endif
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include "gsteffectv.h"
|
#include <gstvideofilter.h>
|
||||||
|
|
||||||
#define GST_TYPE_EDGETV \
|
#define GST_TYPE_EDGETV \
|
||||||
(gst_edgetv_get_type())
|
(gst_edgetv_get_type())
|
||||||
#define GST_EDGETV(obj) \
|
#define GST_EDGETV(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_EDGETV,GstEdgeTV))
|
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_EDGETV,GstEdgeTV))
|
||||||
#define GST_EDGETV_CLASS(klass) \
|
#define GST_EDGETV_CLASS(klass) \
|
||||||
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ULAW,GstEdgeTV))
|
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_EDGETV,GstEdgeTVClass))
|
||||||
#define GST_IS_EDGETV(obj) \
|
#define GST_IS_EDGETV(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_EDGETV))
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_EDGETV))
|
||||||
#define GST_IS_EDGETV_CLASS(obj) \
|
#define GST_IS_EDGETV_CLASS(obj) \
|
||||||
|
@ -44,9 +44,7 @@ typedef struct _GstEdgeTVClass GstEdgeTVClass;
|
||||||
|
|
||||||
struct _GstEdgeTV
|
struct _GstEdgeTV
|
||||||
{
|
{
|
||||||
GstElement element;
|
GstVideofilter videofilter;
|
||||||
|
|
||||||
GstPad *sinkpad, *srcpad;
|
|
||||||
|
|
||||||
gint width, height;
|
gint width, height;
|
||||||
gint map_width, map_height;
|
gint map_width, map_height;
|
||||||
|
@ -56,18 +54,9 @@ struct _GstEdgeTV
|
||||||
|
|
||||||
struct _GstEdgeTVClass
|
struct _GstEdgeTVClass
|
||||||
{
|
{
|
||||||
GstElementClass parent_class;
|
GstVideofilterClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* elementfactory information */
|
|
||||||
static GstElementDetails gst_edgetv_details = GST_ELEMENT_DETAILS (
|
|
||||||
"EdgeTV",
|
|
||||||
"Filter/Effect/Video",
|
|
||||||
"Apply edge detect on video",
|
|
||||||
"Wim Taymans <wim.taymans@chello.be>"
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
/* Filter signals and args */
|
/* Filter signals and args */
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
@ -81,17 +70,17 @@ enum
|
||||||
};
|
};
|
||||||
|
|
||||||
static void gst_edgetv_base_init (gpointer g_class);
|
static void gst_edgetv_base_init (gpointer g_class);
|
||||||
static void gst_edgetv_class_init (GstEdgeTVClass * klass);
|
static void gst_edgetv_class_init (gpointer g_class, gpointer class_data);
|
||||||
static void gst_edgetv_init (GstEdgeTV * filter);
|
static void gst_edgetv_init (GTypeInstance *instance, gpointer g_class);
|
||||||
|
|
||||||
static void gst_edgetv_set_property (GObject * object, guint prop_id,
|
static void gst_edgetv_set_property (GObject * object, guint prop_id,
|
||||||
const GValue * value, GParamSpec * pspec);
|
const GValue * value, GParamSpec * pspec);
|
||||||
static void gst_edgetv_get_property (GObject * object, guint prop_id,
|
static void gst_edgetv_get_property (GObject * object, guint prop_id,
|
||||||
GValue * value, GParamSpec * pspec);
|
GValue * value, GParamSpec * pspec);
|
||||||
|
|
||||||
static void gst_edgetv_chain (GstPad * pad, GstData *_data);
|
static void gst_edgetv_setup (GstVideofilter *videofilter);
|
||||||
|
static void gst_edgetv_rgb32 (GstVideofilter *videofilter, void *d, void *s);
|
||||||
|
|
||||||
static GstElementClass *parent_class = NULL;
|
|
||||||
/*static guint gst_edgetv_signals[LAST_SIGNAL] = { 0 }; */
|
/*static guint gst_edgetv_signals[LAST_SIGNAL] = { 0 }; */
|
||||||
|
|
||||||
GType gst_edgetv_get_type (void)
|
GType gst_edgetv_get_type (void)
|
||||||
|
@ -111,99 +100,97 @@ GType gst_edgetv_get_type (void)
|
||||||
(GInstanceInitFunc) gst_edgetv_init,
|
(GInstanceInitFunc) gst_edgetv_init,
|
||||||
};
|
};
|
||||||
|
|
||||||
edgetv_type = g_type_register_static (GST_TYPE_ELEMENT, "GstEdgeTV", &edgetv_info, 0);
|
edgetv_type = g_type_register_static (GST_TYPE_VIDEOFILTER, "GstEdgeTV", &edgetv_info, 0);
|
||||||
}
|
}
|
||||||
return edgetv_type;
|
return edgetv_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static GstVideofilterFormat gst_edgetv_formats[] = {
|
||||||
|
{ "RGB ", 32, gst_edgetv_rgb32, 24, G_BIG_ENDIAN, 0x0000ff00, 0x00ff0000, 0xff000000 }
|
||||||
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_edgetv_base_init (gpointer g_class)
|
gst_edgetv_base_init (gpointer g_class)
|
||||||
{
|
{
|
||||||
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
|
/* elementfactory information */
|
||||||
|
static GstElementDetails gst_edgetv_details = GST_ELEMENT_DETAILS (
|
||||||
|
"EdgeTV",
|
||||||
|
"Filter/Effect/Video",
|
||||||
|
"Apply edge detect on video",
|
||||||
|
"Wim Taymans <wim.taymans@chello.be>"
|
||||||
|
);
|
||||||
|
|
||||||
gst_element_class_add_pad_template (element_class,
|
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
|
||||||
gst_static_pad_template_get(&gst_effectv_src_template));
|
GstVideofilterClass *videofilter_class = GST_VIDEOFILTER_CLASS (g_class);
|
||||||
gst_element_class_add_pad_template (element_class,
|
int i;
|
||||||
gst_static_pad_template_get(&gst_effectv_sink_template));
|
|
||||||
|
|
||||||
gst_element_class_set_details (element_class, &gst_edgetv_details);
|
gst_element_class_set_details (element_class, &gst_edgetv_details);
|
||||||
|
|
||||||
|
for(i=0; i < G_N_ELEMENTS(gst_edgetv_formats); i++) {
|
||||||
|
gst_videofilter_class_add_format(videofilter_class,
|
||||||
|
gst_edgetv_formats + i);
|
||||||
|
}
|
||||||
|
|
||||||
|
gst_videofilter_class_add_pad_templates (GST_VIDEOFILTER_CLASS (g_class));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_edgetv_class_init (GstEdgeTVClass * klass)
|
gst_edgetv_class_init (gpointer g_class, gpointer class_data)
|
||||||
{
|
{
|
||||||
GObjectClass *gobject_class;
|
GObjectClass *gobject_class;
|
||||||
GstElementClass *gstelement_class;
|
GstVideofilterClass *videofilter_class;
|
||||||
|
|
||||||
gobject_class = (GObjectClass *) klass;
|
gobject_class = G_OBJECT_CLASS (g_class);
|
||||||
gstelement_class = (GstElementClass *) klass;
|
videofilter_class = GST_VIDEOFILTER_CLASS (g_class);
|
||||||
|
|
||||||
parent_class = g_type_class_ref (GST_TYPE_ELEMENT);
|
|
||||||
|
|
||||||
gobject_class->set_property = gst_edgetv_set_property;
|
gobject_class->set_property = gst_edgetv_set_property;
|
||||||
gobject_class->get_property = gst_edgetv_get_property;
|
gobject_class->get_property = gst_edgetv_get_property;
|
||||||
}
|
|
||||||
|
|
||||||
static GstPadLinkReturn
|
videofilter_class->setup = gst_edgetv_setup;
|
||||||
gst_edgetv_sinkconnect (GstPad * pad, const GstCaps * caps)
|
|
||||||
{
|
|
||||||
GstEdgeTV *filter;
|
|
||||||
GstStructure *structure;
|
|
||||||
|
|
||||||
filter = GST_EDGETV (gst_pad_get_parent (pad));
|
|
||||||
|
|
||||||
structure = gst_caps_get_structure (caps, 0);
|
|
||||||
|
|
||||||
gst_structure_get_int (structure, "width", &filter->width);
|
|
||||||
gst_structure_get_int (structure, "height", &filter->height);
|
|
||||||
|
|
||||||
filter->map_width = filter->width / 4;
|
|
||||||
filter->map_height = filter->height / 4;
|
|
||||||
filter->video_width_margin = filter->width - filter->map_width * 4;
|
|
||||||
|
|
||||||
g_free (filter->map);
|
|
||||||
filter->map = (guint32 *)g_malloc (filter->map_width * filter->map_height * sizeof(guint32) * 2);
|
|
||||||
memset(filter->map, 0, filter->map_width * filter->map_height * sizeof(guint32) * 2);
|
|
||||||
|
|
||||||
return gst_pad_try_set_caps (filter->srcpad, caps);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_edgetv_init (GstEdgeTV * filter)
|
gst_edgetv_init (GTypeInstance *instance, gpointer g_class)
|
||||||
{
|
{
|
||||||
filter->sinkpad = gst_pad_new_from_template (
|
GstEdgeTV *edgetv = GST_EDGETV (instance);
|
||||||
gst_static_pad_template_get(&gst_effectv_sink_template), "sink");
|
|
||||||
gst_pad_set_chain_function (filter->sinkpad, gst_edgetv_chain);
|
|
||||||
gst_pad_set_link_function (filter->sinkpad, gst_edgetv_sinkconnect);
|
|
||||||
gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad);
|
|
||||||
|
|
||||||
filter->srcpad = gst_pad_new_from_template (
|
edgetv->map = NULL;
|
||||||
gst_static_pad_template_get(&gst_effectv_src_template), "src");
|
|
||||||
gst_element_add_pad (GST_ELEMENT (filter), filter->srcpad);
|
|
||||||
|
|
||||||
filter->map = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void gst_edgetv_setup(GstVideofilter *videofilter)
|
||||||
gst_edgetv_chain (GstPad * pad, GstData *_data)
|
{
|
||||||
|
GstEdgeTV *edgetv;
|
||||||
|
int width = gst_videofilter_get_input_width (videofilter);
|
||||||
|
int height = gst_videofilter_get_input_height (videofilter);
|
||||||
|
|
||||||
|
g_return_if_fail (GST_IS_EDGETV (videofilter));
|
||||||
|
edgetv = GST_EDGETV (videofilter);
|
||||||
|
|
||||||
|
edgetv->width = width;
|
||||||
|
edgetv->height = height;
|
||||||
|
edgetv->map_width = width / 4;
|
||||||
|
edgetv->map_height = height / 4;
|
||||||
|
edgetv->video_width_margin = width % 4;
|
||||||
|
|
||||||
|
g_free (edgetv->map);
|
||||||
|
edgetv->map = (guint32 *)g_malloc (edgetv->map_width * edgetv->map_height * sizeof (guint32) * 2);
|
||||||
|
memset(edgetv->map, 0, edgetv->map_width * edgetv->map_height * sizeof (guint32) * 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gst_edgetv_rgb32 (GstVideofilter *videofilter, void *d, void *s)
|
||||||
{
|
{
|
||||||
GstBuffer *buf = GST_BUFFER (_data);
|
|
||||||
GstEdgeTV *filter;
|
GstEdgeTV *filter;
|
||||||
int x, y;
|
int x, y;
|
||||||
int r, g, b;
|
int r, g, b;
|
||||||
guint32 *src, *dest;
|
guint32 *src, *dest;
|
||||||
guint32 p, q;
|
guint32 p, q;
|
||||||
guint32 v0, v1, v2, v3;
|
guint32 v0, v1, v2, v3;
|
||||||
GstBuffer *outbuf;
|
|
||||||
|
|
||||||
filter = GST_EDGETV (gst_pad_get_parent (pad));
|
filter = GST_EDGETV (videofilter);
|
||||||
|
|
||||||
src = (guint32 *) GST_BUFFER_DATA (buf);
|
src = (guint32 *) s;
|
||||||
|
dest = (guint32 *) d;
|
||||||
outbuf = gst_buffer_new ();
|
|
||||||
GST_BUFFER_SIZE (outbuf) = (filter->width * filter->height * 4);
|
|
||||||
dest = (guint32 *) GST_BUFFER_DATA (outbuf) = g_malloc (GST_BUFFER_SIZE (outbuf));
|
|
||||||
GST_BUFFER_TIMESTAMP (outbuf) = GST_BUFFER_TIMESTAMP (buf);
|
|
||||||
|
|
||||||
src += filter->width * 4 + 4;
|
src += filter->width * 4 + 4;
|
||||||
dest += filter->width * 4 + 4;
|
dest += filter->width * 4 + 4;
|
||||||
|
@ -282,9 +269,6 @@ gst_edgetv_chain (GstPad * pad, GstData *_data)
|
||||||
src += filter->width * 3 + 8 + filter->video_width_margin;
|
src += filter->width * 3 + 8 + filter->video_width_margin;
|
||||||
dest += filter->width * 3 + 8 + filter->video_width_margin;
|
dest += filter->width * 3 + 8 + filter->video_width_margin;
|
||||||
}
|
}
|
||||||
gst_buffer_unref (buf);
|
|
||||||
|
|
||||||
gst_pad_push (filter->srcpad, GST_DATA (outbuf));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -54,7 +54,10 @@ GST_STATIC_PAD_TEMPLATE (
|
||||||
"src",
|
"src",
|
||||||
GST_PAD_SRC,
|
GST_PAD_SRC,
|
||||||
GST_PAD_ALWAYS,
|
GST_PAD_ALWAYS,
|
||||||
GST_STATIC_CAPS ( GST_VIDEO_CAPS_xRGB_HOST_ENDIAN )
|
GST_STATIC_CAPS (
|
||||||
|
GST_VIDEO_CAPS_BGRx "; "
|
||||||
|
GST_VIDEO_CAPS_RGBx
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
GstStaticPadTemplate gst_effectv_sink_template =
|
GstStaticPadTemplate gst_effectv_sink_template =
|
||||||
|
@ -62,7 +65,10 @@ GST_STATIC_PAD_TEMPLATE (
|
||||||
"sink",
|
"sink",
|
||||||
GST_PAD_SINK,
|
GST_PAD_SINK,
|
||||||
GST_PAD_ALWAYS,
|
GST_PAD_ALWAYS,
|
||||||
GST_STATIC_CAPS ( GST_VIDEO_CAPS_xRGB_HOST_ENDIAN )
|
GST_STATIC_CAPS (
|
||||||
|
GST_VIDEO_CAPS_BGRx "; "
|
||||||
|
GST_VIDEO_CAPS_RGBx
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
#define GST_QUARKTV(obj) \
|
#define GST_QUARKTV(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_QUARKTV,GstQuarkTV))
|
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_QUARKTV,GstQuarkTV))
|
||||||
#define GST_QUARKTV_CLASS(klass) \
|
#define GST_QUARKTV_CLASS(klass) \
|
||||||
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ULAW,GstQuarkTV))
|
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_QUARKTV,GstQuarkTVClass))
|
||||||
#define GST_IS_QUARKTV(obj) \
|
#define GST_IS_QUARKTV(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_QUARKTV))
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_QUARKTV))
|
||||||
#define GST_IS_QUARKTV_CLASS(obj) \
|
#define GST_IS_QUARKTV_CLASS(obj) \
|
||||||
|
@ -168,29 +168,37 @@ gst_quarktv_class_init (GstQuarkTVClass * klass)
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstPadLinkReturn
|
static GstPadLinkReturn
|
||||||
gst_quarktv_sinkconnect (GstPad * pad, const GstCaps * caps)
|
gst_quarktv_link (GstPad * pad, const GstCaps * caps)
|
||||||
{
|
{
|
||||||
GstQuarkTV *filter;
|
GstQuarkTV *filter;
|
||||||
|
GstPad *otherpad;
|
||||||
gint i;
|
gint i;
|
||||||
GstStructure *structure;
|
GstStructure *structure;
|
||||||
|
GstPadLinkReturn res;
|
||||||
|
|
||||||
filter = GST_QUARKTV (gst_pad_get_parent (pad));
|
filter = GST_QUARKTV (gst_pad_get_parent (pad));
|
||||||
|
g_return_val_if_fail (GST_IS_QUARKTV (filter), GST_PAD_LINK_REFUSED);
|
||||||
|
|
||||||
|
otherpad = (pad == filter->srcpad ? filter->sinkpad : filter->srcpad);
|
||||||
|
|
||||||
|
res = gst_pad_try_set_caps (otherpad, caps);
|
||||||
|
if (GST_PAD_LINK_FAILED (res))
|
||||||
|
return res;
|
||||||
|
|
||||||
structure = gst_caps_get_structure (caps, 0);
|
structure = gst_caps_get_structure (caps, 0);
|
||||||
|
if (!gst_structure_get_int (structure, "width", &filter->width) ||
|
||||||
gst_structure_get_int (structure, "width", &filter->width);
|
!gst_structure_get_int (structure, "height", &filter->height))
|
||||||
gst_structure_get_int (structure, "height", &filter->height);
|
return GST_PAD_LINK_REFUSED;
|
||||||
|
|
||||||
filter->area = filter->width * filter->height;
|
filter->area = filter->width * filter->height;
|
||||||
|
|
||||||
g_free (filter->planetable);
|
|
||||||
filter->planetable = (GstBuffer **) g_malloc(filter->planes * sizeof(GstBuffer *));
|
|
||||||
|
|
||||||
for(i = 0; i < filter->planes; i++) {
|
for(i = 0; i < filter->planes; i++) {
|
||||||
|
if (filter->planetable[i])
|
||||||
|
gst_buffer_unref (filter->planetable[i]);
|
||||||
filter->planetable[i] = NULL;
|
filter->planetable[i] = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return gst_pad_try_set_caps (filter->srcpad, caps);
|
return GST_PAD_LINK_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -198,17 +206,21 @@ gst_quarktv_init (GstQuarkTV * filter)
|
||||||
{
|
{
|
||||||
filter->sinkpad = gst_pad_new_from_template (
|
filter->sinkpad = gst_pad_new_from_template (
|
||||||
gst_static_pad_template_get(&gst_effectv_sink_template), "sink");
|
gst_static_pad_template_get(&gst_effectv_sink_template), "sink");
|
||||||
|
gst_pad_set_getcaps_function (filter->sinkpad, gst_pad_proxy_getcaps);
|
||||||
gst_pad_set_chain_function (filter->sinkpad, gst_quarktv_chain);
|
gst_pad_set_chain_function (filter->sinkpad, gst_quarktv_chain);
|
||||||
gst_pad_set_link_function (filter->sinkpad, gst_quarktv_sinkconnect);
|
gst_pad_set_link_function (filter->sinkpad, gst_quarktv_link);
|
||||||
gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad);
|
gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad);
|
||||||
|
|
||||||
filter->srcpad = gst_pad_new_from_template (
|
filter->srcpad = gst_pad_new_from_template (
|
||||||
gst_static_pad_template_get(&gst_effectv_src_template), "src");
|
gst_static_pad_template_get(&gst_effectv_src_template), "src");
|
||||||
|
gst_pad_set_getcaps_function (filter->srcpad, gst_pad_proxy_getcaps);
|
||||||
|
gst_pad_set_link_function (filter->srcpad, gst_quarktv_link);
|
||||||
gst_element_add_pad (GST_ELEMENT (filter), filter->srcpad);
|
gst_element_add_pad (GST_ELEMENT (filter), filter->srcpad);
|
||||||
|
|
||||||
filter->planes = PLANES;
|
filter->planes = PLANES;
|
||||||
filter->current_plane = filter->planes - 1;
|
filter->current_plane = filter->planes - 1;
|
||||||
filter->planetable = NULL;
|
filter->planetable = (GstBuffer **) g_malloc(filter->planes * sizeof(GstBuffer *));
|
||||||
|
memset (filter->planetable, 0, filter->planes * sizeof(GstBuffer *));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -292,8 +304,29 @@ gst_quarktv_set_property (GObject * object, guint prop_id, const GValue * value,
|
||||||
|
|
||||||
switch (prop_id) {
|
switch (prop_id) {
|
||||||
case ARG_PLANES:
|
case ARG_PLANES:
|
||||||
filter->planes = g_value_get_int (value);
|
{
|
||||||
filter->current_plane = filter->planes - 1;
|
gint new_n_planes = g_value_get_int (value);
|
||||||
|
GstBuffer **new_planetable;
|
||||||
|
gint i;
|
||||||
|
|
||||||
|
/* If the number of planes changed, copy across any existing planes */
|
||||||
|
if (new_n_planes != filter->planes)
|
||||||
|
{
|
||||||
|
new_planetable = (GstBuffer **) g_malloc(new_n_planes * sizeof(GstBuffer *));
|
||||||
|
|
||||||
|
for(i = 0; (i < new_n_planes) && (i < filter->planes); i++) {
|
||||||
|
new_planetable[i] = filter->planetable[i];
|
||||||
|
}
|
||||||
|
for(; i < filter->planes; i++) {
|
||||||
|
if (filter->planetable[i])
|
||||||
|
gst_buffer_unref (filter->planetable[i]);
|
||||||
|
}
|
||||||
|
g_free (filter->planetable);
|
||||||
|
filter->planetable = new_planetable;
|
||||||
|
filter->current_plane = filter->planes - 1;
|
||||||
|
filter->planes = new_n_planes;
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
|
|
@ -46,14 +46,14 @@
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include "gsteffectv.h"
|
#include <gstvideofilter.h>
|
||||||
|
|
||||||
#define GST_TYPE_REVTV \
|
#define GST_TYPE_REVTV \
|
||||||
(gst_revtv_get_type())
|
(gst_revtv_get_type())
|
||||||
#define GST_REVTV(obj) \
|
#define GST_REVTV(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_REVTV,GstRevTV))
|
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_REVTV,GstRevTV))
|
||||||
#define GST_REVTV_CLASS(klass) \
|
#define GST_REVTV_CLASS(klass) \
|
||||||
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ULAW,GstRevTV))
|
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_REVTV,GstRevTVClass))
|
||||||
#define GST_IS_REVTV(obj) \
|
#define GST_IS_REVTV(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_REVTV))
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_REVTV))
|
||||||
#define GST_IS_REVTV_CLASS(obj) \
|
#define GST_IS_REVTV_CLASS(obj) \
|
||||||
|
@ -66,9 +66,7 @@ typedef struct _GstRevTVClass GstRevTVClass;
|
||||||
|
|
||||||
struct _GstRevTV
|
struct _GstRevTV
|
||||||
{
|
{
|
||||||
GstElement element;
|
GstVideofilter videofilter;
|
||||||
|
|
||||||
GstPad *sinkpad, *srcpad;
|
|
||||||
|
|
||||||
gint width, height;
|
gint width, height;
|
||||||
gint vgrabtime;
|
gint vgrabtime;
|
||||||
|
@ -79,20 +77,11 @@ struct _GstRevTV
|
||||||
|
|
||||||
struct _GstRevTVClass
|
struct _GstRevTVClass
|
||||||
{
|
{
|
||||||
GstElementClass parent_class;
|
GstVideofilterClass parent_class;
|
||||||
|
|
||||||
void (*reset) (GstElement *element);
|
void (*reset) (GstElement *element);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* elementfactory information */
|
|
||||||
static GstElementDetails gst_revtv_details = GST_ELEMENT_DETAILS (
|
|
||||||
"RevTV",
|
|
||||||
"Filter/Effect/Video",
|
|
||||||
"A video waveform monitor for each line of video processed",
|
|
||||||
"Wim Taymans <wim.taymans@chello.be>"
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
/* Filter signals and args */
|
/* Filter signals and args */
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
@ -109,17 +98,16 @@ enum
|
||||||
};
|
};
|
||||||
|
|
||||||
static void gst_revtv_base_init (gpointer g_class);
|
static void gst_revtv_base_init (gpointer g_class);
|
||||||
static void gst_revtv_class_init (GstRevTVClass * klass);
|
static void gst_revtv_class_init (gpointer g_class, gpointer class_data);
|
||||||
static void gst_revtv_init (GstRevTV * filter);
|
static void gst_revtv_init (GTypeInstance *instance, gpointer g_class);
|
||||||
|
|
||||||
static void gst_revtv_set_property (GObject * object, guint prop_id,
|
static void gst_revtv_set_property (GObject * object, guint prop_id,
|
||||||
const GValue * value, GParamSpec * pspec);
|
const GValue * value, GParamSpec * pspec);
|
||||||
static void gst_revtv_get_property (GObject * object, guint prop_id,
|
static void gst_revtv_get_property (GObject * object, guint prop_id,
|
||||||
GValue * value, GParamSpec * pspec);
|
GValue * value, GParamSpec * pspec);
|
||||||
|
static void gst_revtv_setup (GstVideofilter *videofilter);
|
||||||
|
static void gst_revtv_rgb32 (GstVideofilter *videofilter, void *d, void *s);
|
||||||
|
|
||||||
static void gst_revtv_chain (GstPad * pad, GstData *_data);
|
|
||||||
|
|
||||||
static GstElementClass *parent_class = NULL;
|
|
||||||
/* static guint gst_revtv_signals[LAST_SIGNAL] = { 0 }; */
|
/* static guint gst_revtv_signals[LAST_SIGNAL] = { 0 }; */
|
||||||
|
|
||||||
GType gst_revtv_get_type (void)
|
GType gst_revtv_get_type (void)
|
||||||
|
@ -139,34 +127,48 @@ GType gst_revtv_get_type (void)
|
||||||
(GInstanceInitFunc) gst_revtv_init,
|
(GInstanceInitFunc) gst_revtv_init,
|
||||||
};
|
};
|
||||||
|
|
||||||
revtv_type = g_type_register_static (GST_TYPE_ELEMENT, "GstRevTV", &revtv_info, 0);
|
revtv_type = g_type_register_static (GST_TYPE_VIDEOFILTER, "GstRevTV", &revtv_info, 0);
|
||||||
}
|
}
|
||||||
return revtv_type;
|
return revtv_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static GstVideofilterFormat gst_revtv_formats[] = {
|
||||||
|
{ "RGB ", 32, gst_revtv_rgb32, 24, G_BIG_ENDIAN, 0x0000ff00, 0x00ff0000, 0xff000000 }
|
||||||
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_revtv_base_init (gpointer g_class)
|
gst_revtv_base_init (gpointer g_class)
|
||||||
{
|
{
|
||||||
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
|
/* elementfactory information */
|
||||||
|
static GstElementDetails gst_revtv_details = GST_ELEMENT_DETAILS (
|
||||||
|
"RevTV",
|
||||||
|
"Filter/Effect/Video",
|
||||||
|
"A video waveform monitor for each line of video processed",
|
||||||
|
"Wim Taymans <wim.taymans@chello.be>"
|
||||||
|
);
|
||||||
|
|
||||||
gst_element_class_add_pad_template (element_class,
|
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
|
||||||
gst_static_pad_template_get (&gst_effectv_src_template));
|
GstVideofilterClass *videofilter_class = GST_VIDEOFILTER_CLASS (g_class);
|
||||||
gst_element_class_add_pad_template (element_class,
|
int i;
|
||||||
gst_static_pad_template_get (&gst_effectv_sink_template));
|
|
||||||
|
|
||||||
gst_element_class_set_details (element_class, &gst_revtv_details);
|
gst_element_class_set_details (element_class, &gst_revtv_details);
|
||||||
|
|
||||||
|
for(i=0; i < G_N_ELEMENTS(gst_revtv_formats); i++) {
|
||||||
|
gst_videofilter_class_add_format(videofilter_class,
|
||||||
|
gst_revtv_formats + i);
|
||||||
|
}
|
||||||
|
|
||||||
|
gst_videofilter_class_add_pad_templates (GST_VIDEOFILTER_CLASS (g_class));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_revtv_class_init (GstRevTVClass * klass)
|
gst_revtv_class_init (gpointer klass, gpointer class_data)
|
||||||
{
|
{
|
||||||
GObjectClass *gobject_class;
|
GObjectClass *gobject_class;
|
||||||
GstElementClass *gstelement_class;
|
GstVideofilterClass *videofilter_class;
|
||||||
|
|
||||||
gobject_class = (GObjectClass *) klass;
|
gobject_class = G_OBJECT_CLASS (klass);
|
||||||
gstelement_class = (GstElementClass *) klass;
|
videofilter_class = GST_VIDEOFILTER_CLASS (klass);
|
||||||
|
|
||||||
parent_class = g_type_class_ref (GST_TYPE_ELEMENT);
|
|
||||||
|
|
||||||
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_DELAY,
|
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_DELAY,
|
||||||
g_param_spec_int ("delay","Delay","Delay in frames between updates",
|
g_param_spec_int ("delay","Delay","Delay in frames between updates",
|
||||||
|
@ -180,67 +182,52 @@ gst_revtv_class_init (GstRevTVClass * klass)
|
||||||
|
|
||||||
gobject_class->set_property = gst_revtv_set_property;
|
gobject_class->set_property = gst_revtv_set_property;
|
||||||
gobject_class->get_property = gst_revtv_get_property;
|
gobject_class->get_property = gst_revtv_get_property;
|
||||||
}
|
|
||||||
|
|
||||||
static GstPadLinkReturn
|
videofilter_class->setup = gst_revtv_setup;
|
||||||
gst_revtv_sinkconnect (GstPad * pad, const GstCaps * caps)
|
|
||||||
{
|
|
||||||
GstRevTV *filter;
|
|
||||||
GstStructure *structure;
|
|
||||||
|
|
||||||
filter = GST_REVTV (gst_pad_get_parent (pad));
|
|
||||||
|
|
||||||
structure = gst_caps_get_structure (caps, 0);
|
|
||||||
|
|
||||||
gst_structure_get_int (structure, "width", &filter->width);
|
|
||||||
gst_structure_get_int (structure, "height", &filter->height);
|
|
||||||
|
|
||||||
return gst_pad_try_set_caps (filter->srcpad, caps);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_revtv_init (GstRevTV * filter)
|
gst_revtv_init (GTypeInstance *instance, gpointer g_class)
|
||||||
{
|
{
|
||||||
filter->sinkpad = gst_pad_new_from_template (
|
GstRevTV *restv = GST_REVTV (instance);
|
||||||
gst_static_pad_template_get (&gst_effectv_sink_template), "sink");
|
|
||||||
gst_pad_set_chain_function (filter->sinkpad, gst_revtv_chain);
|
|
||||||
gst_pad_set_link_function (filter->sinkpad, gst_revtv_sinkconnect);
|
|
||||||
gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad);
|
|
||||||
|
|
||||||
filter->srcpad = gst_pad_new_from_template (
|
restv->vgrabtime = 1;
|
||||||
gst_static_pad_template_get (&gst_effectv_src_template), "src");
|
restv->vgrab = 0;
|
||||||
gst_element_add_pad (GST_ELEMENT (filter), filter->srcpad);
|
restv->linespace = 6;
|
||||||
|
restv->vscale = 50;
|
||||||
filter->vgrabtime = 1;
|
|
||||||
filter->vgrab = 0;
|
|
||||||
filter->linespace = 6;
|
|
||||||
filter->vscale = 50;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gst_revtv_setup (GstVideofilter *videofilter)
|
||||||
|
{
|
||||||
|
GstRevTV *revtv;
|
||||||
|
|
||||||
|
g_return_if_fail (GST_IS_REVTV (videofilter));
|
||||||
|
revtv = GST_REVTV (videofilter);
|
||||||
|
|
||||||
|
revtv->width = gst_videofilter_get_input_width (videofilter);
|
||||||
|
revtv->height = gst_videofilter_get_input_height (videofilter);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_revtv_chain (GstPad * pad, GstData *_data)
|
gst_revtv_rgb32 (GstVideofilter *videofilter, void *d, void *s)
|
||||||
{
|
{
|
||||||
GstBuffer *buf = GST_BUFFER (_data);
|
|
||||||
GstRevTV *filter;
|
GstRevTV *filter;
|
||||||
guint32 *src, *dest;
|
guint32 *src, *dest;
|
||||||
GstBuffer *outbuf;
|
gint width, height;
|
||||||
gint width, height, area;
|
|
||||||
guint32 *nsrc;
|
guint32 *nsrc;
|
||||||
gint y, x, R, G, B, yval;
|
gint y, x, R, G, B, yval;
|
||||||
|
|
||||||
filter = GST_REVTV (gst_pad_get_parent (pad));
|
filter = GST_REVTV (videofilter);
|
||||||
|
|
||||||
src = (guint32 *) GST_BUFFER_DATA (buf);
|
src = (guint32 *) s;
|
||||||
|
dest = (guint32 *) d;
|
||||||
|
|
||||||
width = filter->width;
|
width = filter->width;
|
||||||
height = filter->height;
|
height = filter->height;
|
||||||
area = width * height;
|
|
||||||
|
|
||||||
outbuf = gst_buffer_new ();
|
/* Clear everything to black */
|
||||||
GST_BUFFER_SIZE (outbuf) = area * sizeof(guint32);
|
memset (dest, 0, width*height*sizeof(guint32));
|
||||||
dest = (guint32 *) GST_BUFFER_DATA (outbuf) = g_malloc (GST_BUFFER_SIZE (outbuf));
|
|
||||||
GST_BUFFER_TIMESTAMP (outbuf) = GST_BUFFER_TIMESTAMP (buf);
|
|
||||||
|
|
||||||
// draw the offset lines
|
// draw the offset lines
|
||||||
for (y = 0; y < height ; y += filter->linespace){
|
for (y = 0; y < height ; y += filter->linespace){
|
||||||
|
@ -259,10 +246,6 @@ gst_revtv_chain (GstPad * pad, GstData *_data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_buffer_unref (buf);
|
|
||||||
|
|
||||||
gst_pad_push (filter->srcpad, GST_DATA (outbuf));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -28,14 +28,14 @@
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include "gsteffectv.h"
|
#include <gstvideofilter.h>
|
||||||
|
|
||||||
#define GST_TYPE_SHAGADELICTV \
|
#define GST_TYPE_SHAGADELICTV \
|
||||||
(gst_shagadelictv_get_type())
|
(gst_shagadelictv_get_type())
|
||||||
#define GST_SHAGADELICTV(obj) \
|
#define GST_SHAGADELICTV(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SHAGADELICTV,GstShagadelicTV))
|
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SHAGADELICTV,GstShagadelicTV))
|
||||||
#define GST_SHAGADELICTV_CLASS(klass) \
|
#define GST_SHAGADELICTV_CLASS(klass) \
|
||||||
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ULAW,GstShagadelicTV))
|
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SHAGADELICTV,GstShagadelicTVClass))
|
||||||
#define GST_IS_SHAGADELICTV(obj) \
|
#define GST_IS_SHAGADELICTV(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SHAGADELICTV))
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SHAGADELICTV))
|
||||||
#define GST_IS_SHAGADELICTV_CLASS(obj) \
|
#define GST_IS_SHAGADELICTV_CLASS(obj) \
|
||||||
|
@ -46,9 +46,7 @@ typedef struct _GstShagadelicTVClass GstShagadelicTVClass;
|
||||||
|
|
||||||
struct _GstShagadelicTV
|
struct _GstShagadelicTV
|
||||||
{
|
{
|
||||||
GstElement element;
|
GstVideofilter videofilter;
|
||||||
|
|
||||||
GstPad *sinkpad, *srcpad;
|
|
||||||
|
|
||||||
gint width, height;
|
gint width, height;
|
||||||
gint stat;
|
gint stat;
|
||||||
|
@ -63,18 +61,9 @@ struct _GstShagadelicTV
|
||||||
|
|
||||||
struct _GstShagadelicTVClass
|
struct _GstShagadelicTVClass
|
||||||
{
|
{
|
||||||
GstElementClass parent_class;
|
GstVideofilterClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* elementfactory information */
|
|
||||||
static GstElementDetails gst_shagadelictv_details = GST_ELEMENT_DETAILS (
|
|
||||||
"ShagadelicTV",
|
|
||||||
"Filter/Effect/Video",
|
|
||||||
"Oh behave, ShagedelicTV makes images shagadelic!",
|
|
||||||
"Wim Taymans <wim.taymans@chello.be>"
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
/* Filter signals and args */
|
/* Filter signals and args */
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
@ -88,8 +77,8 @@ enum
|
||||||
};
|
};
|
||||||
|
|
||||||
static void gst_shagadelictv_base_init (gpointer g_class);
|
static void gst_shagadelictv_base_init (gpointer g_class);
|
||||||
static void gst_shagadelictv_class_init (GstShagadelicTVClass * klass);
|
static void gst_shagadelictv_class_init (gpointer g_class, gpointer class_data);
|
||||||
static void gst_shagadelictv_init (GstShagadelicTV * filter);
|
static void gst_shagadelictv_init (GTypeInstance *instance, gpointer g_class);
|
||||||
|
|
||||||
static void gst_shagadelic_initialize (GstShagadelicTV *filter);
|
static void gst_shagadelic_initialize (GstShagadelicTV *filter);
|
||||||
|
|
||||||
|
@ -97,10 +86,9 @@ static void gst_shagadelictv_set_property (GObject * object, guint prop_id,
|
||||||
const GValue * value, GParamSpec * pspec);
|
const GValue * value, GParamSpec * pspec);
|
||||||
static void gst_shagadelictv_get_property (GObject * object, guint prop_id,
|
static void gst_shagadelictv_get_property (GObject * object, guint prop_id,
|
||||||
GValue * value, GParamSpec * pspec);
|
GValue * value, GParamSpec * pspec);
|
||||||
|
static void gst_shagadelictv_setup (GstVideofilter *videofilter);
|
||||||
|
static void gst_shagadelictv_rgb32 (GstVideofilter *videofilter, void *d, void *s);
|
||||||
|
|
||||||
static void gst_shagadelictv_chain (GstPad * pad, GstData *_data);
|
|
||||||
|
|
||||||
static GstElementClass *parent_class = NULL;
|
|
||||||
/*static guint gst_shagadelictv_signals[LAST_SIGNAL] = { 0 }; */
|
/*static guint gst_shagadelictv_signals[LAST_SIGNAL] = { 0 }; */
|
||||||
|
|
||||||
GType gst_shagadelictv_get_type (void)
|
GType gst_shagadelictv_get_type (void)
|
||||||
|
@ -120,52 +108,77 @@ GType gst_shagadelictv_get_type (void)
|
||||||
(GInstanceInitFunc) gst_shagadelictv_init,
|
(GInstanceInitFunc) gst_shagadelictv_init,
|
||||||
};
|
};
|
||||||
|
|
||||||
shagadelictv_type = g_type_register_static (GST_TYPE_ELEMENT, "GstShagadelicTV", &shagadelictv_info, 0);
|
shagadelictv_type = g_type_register_static (GST_TYPE_VIDEOFILTER, "GstShagadelicTV", &shagadelictv_info, 0);
|
||||||
}
|
}
|
||||||
return shagadelictv_type;
|
return shagadelictv_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static GstVideofilterFormat gst_shagadelictv_formats[] = {
|
||||||
|
{ "RGB ", 32, gst_shagadelictv_rgb32, 24, G_BIG_ENDIAN, 0x0000ff00, 0x00ff0000, 0xff000000 }
|
||||||
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_shagadelictv_base_init (gpointer g_class)
|
gst_shagadelictv_base_init (gpointer g_class)
|
||||||
{
|
{
|
||||||
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
|
/* elementfactory information */
|
||||||
|
static GstElementDetails gst_shagadelictv_details = GST_ELEMENT_DETAILS (
|
||||||
|
"ShagadelicTV",
|
||||||
|
"Filter/Effect/Video",
|
||||||
|
"Oh behave, ShagedelicTV makes images shagadelic!",
|
||||||
|
"Wim Taymans <wim.taymans@chello.be>"
|
||||||
|
);
|
||||||
|
|
||||||
gst_element_class_add_pad_template (element_class,
|
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
|
||||||
gst_static_pad_template_get(&gst_effectv_src_template));
|
GstVideofilterClass *videofilter_class = GST_VIDEOFILTER_CLASS (g_class);
|
||||||
gst_element_class_add_pad_template (element_class,
|
int i;
|
||||||
gst_static_pad_template_get(&gst_effectv_sink_template));
|
|
||||||
|
|
||||||
gst_element_class_set_details (element_class, &gst_shagadelictv_details);
|
gst_element_class_set_details (element_class, &gst_shagadelictv_details);
|
||||||
|
|
||||||
|
for(i=0;i<G_N_ELEMENTS(gst_shagadelictv_formats);i++){
|
||||||
|
gst_videofilter_class_add_format(videofilter_class,
|
||||||
|
gst_shagadelictv_formats + i);
|
||||||
|
}
|
||||||
|
|
||||||
|
gst_videofilter_class_add_pad_templates (GST_VIDEOFILTER_CLASS (g_class));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_shagadelictv_class_init (GstShagadelicTVClass * klass)
|
gst_shagadelictv_class_init (gpointer g_class, gpointer class_data)
|
||||||
{
|
{
|
||||||
GObjectClass *gobject_class;
|
GObjectClass *gobject_class;
|
||||||
GstElementClass *gstelement_class;
|
GstVideofilterClass *videofilter_class;
|
||||||
|
|
||||||
gobject_class = (GObjectClass *) klass;
|
gobject_class = G_OBJECT_CLASS (g_class);
|
||||||
gstelement_class = (GstElementClass *) klass;
|
videofilter_class = GST_VIDEOFILTER_CLASS (g_class);
|
||||||
|
|
||||||
parent_class = g_type_class_ref (GST_TYPE_ELEMENT);
|
|
||||||
|
|
||||||
gobject_class->set_property = gst_shagadelictv_set_property;
|
gobject_class->set_property = gst_shagadelictv_set_property;
|
||||||
gobject_class->get_property = gst_shagadelictv_get_property;
|
gobject_class->get_property = gst_shagadelictv_get_property;
|
||||||
|
|
||||||
|
videofilter_class->setup = gst_shagadelictv_setup;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstPadLinkReturn
|
static void
|
||||||
gst_shagadelictv_sinkconnect (GstPad * pad, const GstCaps * caps)
|
gst_shagadelictv_init (GTypeInstance *instance, gpointer g_class)
|
||||||
|
{
|
||||||
|
GstShagadelicTV *filter = GST_SHAGADELICTV (instance);
|
||||||
|
|
||||||
|
filter->ripple = NULL;
|
||||||
|
filter->spiral = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gst_shagadelictv_setup(GstVideofilter *videofilter)
|
||||||
{
|
{
|
||||||
GstShagadelicTV *filter;
|
GstShagadelicTV *filter;
|
||||||
gint area;
|
int width = gst_videofilter_get_input_width(videofilter);
|
||||||
GstStructure *structure;
|
int height = gst_videofilter_get_input_height(videofilter);
|
||||||
|
int area;
|
||||||
|
|
||||||
filter = GST_SHAGADELICTV (gst_pad_get_parent (pad));
|
g_return_if_fail (GST_IS_SHAGADELICTV (videofilter));
|
||||||
|
filter = GST_SHAGADELICTV (videofilter);
|
||||||
|
|
||||||
structure = gst_caps_get_structure (caps, 0);
|
filter->width = width;
|
||||||
|
filter->height = height;
|
||||||
gst_structure_get_int (structure, "width", &filter->width);
|
|
||||||
gst_structure_get_int (structure, "height", &filter->height);
|
|
||||||
|
|
||||||
area = filter->width * filter->height;
|
area = filter->width * filter->height;
|
||||||
|
|
||||||
|
@ -176,25 +189,6 @@ gst_shagadelictv_sinkconnect (GstPad * pad, const GstCaps * caps)
|
||||||
filter->spiral = (gchar *) g_malloc (area);
|
filter->spiral = (gchar *) g_malloc (area);
|
||||||
|
|
||||||
gst_shagadelic_initialize (filter);
|
gst_shagadelic_initialize (filter);
|
||||||
|
|
||||||
return gst_pad_try_set_caps (filter->srcpad, caps);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gst_shagadelictv_init (GstShagadelicTV * filter)
|
|
||||||
{
|
|
||||||
filter->sinkpad = gst_pad_new_from_template (
|
|
||||||
gst_static_pad_template_get(&gst_effectv_sink_template), "sink");
|
|
||||||
gst_pad_set_chain_function (filter->sinkpad, gst_shagadelictv_chain);
|
|
||||||
gst_pad_set_link_function (filter->sinkpad, gst_shagadelictv_sinkconnect);
|
|
||||||
gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad);
|
|
||||||
|
|
||||||
filter->srcpad = gst_pad_new_from_template (
|
|
||||||
gst_static_pad_template_get(&gst_effectv_src_template), "src");
|
|
||||||
gst_element_add_pad (GST_ELEMENT (filter), filter->srcpad);
|
|
||||||
|
|
||||||
filter->ripple = NULL;
|
|
||||||
filter->spiral = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int
|
static unsigned int
|
||||||
|
@ -259,30 +253,20 @@ gst_shagadelic_initialize (GstShagadelicTV *filter)
|
||||||
filter->phase = 0;
|
filter->phase = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int shagadelicDraw()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
static void
|
static void
|
||||||
gst_shagadelictv_chain (GstPad * pad, GstData *_data)
|
gst_shagadelictv_rgb32 (GstVideofilter *videofilter, void *d, void *s)
|
||||||
{
|
{
|
||||||
GstBuffer *buf = GST_BUFFER (_data);
|
|
||||||
GstShagadelicTV *filter;
|
GstShagadelicTV *filter;
|
||||||
guint32 *src, *dest;
|
guint32 *src, *dest;
|
||||||
GstBuffer *outbuf;
|
|
||||||
gint x, y;
|
gint x, y;
|
||||||
guint32 v;
|
guint32 v;
|
||||||
guchar r, g, b;
|
guchar r, g, b;
|
||||||
gint width, height;
|
gint width, height;
|
||||||
|
|
||||||
filter = GST_SHAGADELICTV (gst_pad_get_parent (pad));
|
filter = GST_SHAGADELICTV (videofilter);
|
||||||
|
|
||||||
src = (guint32 *) GST_BUFFER_DATA (buf);
|
src = (guint32 *) s;
|
||||||
|
dest = (guint32 *) d;
|
||||||
outbuf = gst_buffer_new ();
|
|
||||||
GST_BUFFER_SIZE (outbuf) = (filter->width * filter->height * 4);
|
|
||||||
dest = (guint32 *) GST_BUFFER_DATA (outbuf) = g_malloc (GST_BUFFER_SIZE (outbuf));
|
|
||||||
GST_BUFFER_TIMESTAMP (outbuf) = GST_BUFFER_TIMESTAMP (buf);
|
|
||||||
|
|
||||||
width = filter->width;
|
width = filter->width;
|
||||||
height = filter->height;
|
height = filter->height;
|
||||||
|
@ -312,10 +296,6 @@ gst_shagadelictv_chain (GstPad * pad, GstData *_data)
|
||||||
filter->ry += filter->rvy;
|
filter->ry += filter->rvy;
|
||||||
filter->bx += filter->bvx;
|
filter->bx += filter->bvx;
|
||||||
filter->by += filter->bvy;
|
filter->by += filter->bvy;
|
||||||
|
|
||||||
gst_buffer_unref (buf);
|
|
||||||
|
|
||||||
gst_pad_push (filter->srcpad, GST_DATA (outbuf));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -28,14 +28,14 @@
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include "gsteffectv.h"
|
#include <gstvideofilter.h>
|
||||||
|
|
||||||
#define GST_TYPE_VERTIGOTV \
|
#define GST_TYPE_VERTIGOTV \
|
||||||
(gst_vertigotv_get_type())
|
(gst_vertigotv_get_type())
|
||||||
#define GST_VERTIGOTV(obj) \
|
#define GST_VERTIGOTV(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VERTIGOTV,GstVertigoTV))
|
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VERTIGOTV,GstVertigoTV))
|
||||||
#define GST_VERTIGOTV_CLASS(klass) \
|
#define GST_VERTIGOTV_CLASS(klass) \
|
||||||
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ULAW,GstVertigoTV))
|
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VERTIGOTV,GstVertigoTVClass))
|
||||||
#define GST_IS_VERTIGOTV(obj) \
|
#define GST_IS_VERTIGOTV(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VERTIGOTV))
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VERTIGOTV))
|
||||||
#define GST_IS_VERTIGOTV_CLASS(obj) \
|
#define GST_IS_VERTIGOTV_CLASS(obj) \
|
||||||
|
@ -46,9 +46,7 @@ typedef struct _GstVertigoTVClass GstVertigoTVClass;
|
||||||
|
|
||||||
struct _GstVertigoTV
|
struct _GstVertigoTV
|
||||||
{
|
{
|
||||||
GstElement element;
|
GstVideofilter videofilter;
|
||||||
|
|
||||||
GstPad *sinkpad, *srcpad;
|
|
||||||
|
|
||||||
gint width, height;
|
gint width, height;
|
||||||
guint32 *buffer;
|
guint32 *buffer;
|
||||||
|
@ -58,25 +56,15 @@ struct _GstVertigoTV
|
||||||
gdouble phase;
|
gdouble phase;
|
||||||
gdouble phase_increment;
|
gdouble phase_increment;
|
||||||
gdouble zoomrate;
|
gdouble zoomrate;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstVertigoTVClass
|
struct _GstVertigoTVClass
|
||||||
{
|
{
|
||||||
GstElementClass parent_class;
|
GstVideofilterClass parent_class;
|
||||||
|
|
||||||
void (*reset) (GstElement *element);
|
void (*reset) (GstElement *element);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* elementfactory information */
|
|
||||||
static GstElementDetails gst_vertigotv_details = GST_ELEMENT_DETAILS (
|
|
||||||
"VertigoTV",
|
|
||||||
"Filter/Effect/Video",
|
|
||||||
"A loopback alpha blending effector with rotating and scaling",
|
|
||||||
"Wim Taymans <wim.taymans@chello.be>"
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
/* Filter signals and args */
|
/* Filter signals and args */
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
@ -93,8 +81,9 @@ enum
|
||||||
};
|
};
|
||||||
|
|
||||||
static void gst_vertigotv_base_init (gpointer g_class);
|
static void gst_vertigotv_base_init (gpointer g_class);
|
||||||
static void gst_vertigotv_class_init (GstVertigoTVClass * klass);
|
static void gst_vertigotv_class_init (GstVertigoTVClass * klass, gpointer class_data);
|
||||||
static void gst_vertigotv_init (GstVertigoTV * filter);
|
static void gst_vertigotv_init (GTypeInstance *instance, gpointer g_class);
|
||||||
|
static void gst_vertigotv_setup (GstVideofilter *videofilter);
|
||||||
|
|
||||||
static void gst_vertigotv_reset_handler (GstElement *element);
|
static void gst_vertigotv_reset_handler (GstElement *element);
|
||||||
|
|
||||||
|
@ -102,10 +91,8 @@ static void gst_vertigotv_set_property (GObject * object, guint prop_id,
|
||||||
const GValue * value, GParamSpec * pspec);
|
const GValue * value, GParamSpec * pspec);
|
||||||
static void gst_vertigotv_get_property (GObject * object, guint prop_id,
|
static void gst_vertigotv_get_property (GObject * object, guint prop_id,
|
||||||
GValue * value, GParamSpec * pspec);
|
GValue * value, GParamSpec * pspec);
|
||||||
|
static void gst_vertigotv_rgb32 (GstVideofilter *videofilter, void *d, void *s);
|
||||||
|
|
||||||
static void gst_vertigotv_chain (GstPad * pad, GstData *_data);
|
|
||||||
|
|
||||||
static GstElementClass *parent_class = NULL;
|
|
||||||
static guint gst_vertigotv_signals[LAST_SIGNAL] = { 0 };
|
static guint gst_vertigotv_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
GType gst_vertigotv_get_type (void)
|
GType gst_vertigotv_get_type (void)
|
||||||
|
@ -125,34 +112,49 @@ GType gst_vertigotv_get_type (void)
|
||||||
(GInstanceInitFunc) gst_vertigotv_init,
|
(GInstanceInitFunc) gst_vertigotv_init,
|
||||||
};
|
};
|
||||||
|
|
||||||
vertigotv_type = g_type_register_static (GST_TYPE_ELEMENT, "GstVertigoTV", &vertigotv_info, 0);
|
vertigotv_type = g_type_register_static (GST_TYPE_VIDEOFILTER, "GstVertigoTV", &vertigotv_info, 0);
|
||||||
}
|
}
|
||||||
return vertigotv_type;
|
return vertigotv_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static GstVideofilterFormat gst_vertigotv_formats[] = {
|
||||||
|
{ "RGB ", 32, gst_vertigotv_rgb32, 24, G_BIG_ENDIAN, 0x0000ff00, 0x00ff0000, 0xff000000 }
|
||||||
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_vertigotv_base_init (gpointer g_class)
|
gst_vertigotv_base_init (gpointer g_class)
|
||||||
{
|
{
|
||||||
|
/* elementfactory information */
|
||||||
|
static GstElementDetails vertigotv_details = GST_ELEMENT_DETAILS (
|
||||||
|
"VertigoTV",
|
||||||
|
"Filter/Effect/Video",
|
||||||
|
"A loopback alpha blending effector with rotating and scaling",
|
||||||
|
"Wim Taymans <wim.taymans@chello.be>"
|
||||||
|
);
|
||||||
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
|
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
|
||||||
|
GstVideofilterClass *videofilter_class = GST_VIDEOFILTER_CLASS (g_class);
|
||||||
|
int i;
|
||||||
|
|
||||||
|
gst_element_class_set_details (element_class, &vertigotv_details);
|
||||||
|
|
||||||
gst_element_class_add_pad_template (element_class,
|
for(i=0;i<G_N_ELEMENTS(gst_vertigotv_formats);i++){
|
||||||
gst_static_pad_template_get (&gst_effectv_src_template));
|
gst_videofilter_class_add_format(videofilter_class,
|
||||||
gst_element_class_add_pad_template (element_class,
|
gst_vertigotv_formats + i);
|
||||||
gst_static_pad_template_get (&gst_effectv_sink_template));
|
}
|
||||||
|
|
||||||
gst_element_class_set_details (element_class, &gst_vertigotv_details);
|
gst_videofilter_class_add_pad_templates (GST_VIDEOFILTER_CLASS (g_class));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_vertigotv_class_init (GstVertigoTVClass * klass)
|
gst_vertigotv_class_init (GstVertigoTVClass * klass, gpointer class_data)
|
||||||
{
|
{
|
||||||
GObjectClass *gobject_class;
|
GObjectClass *gobject_class;
|
||||||
GstElementClass *gstelement_class;
|
GstElementClass *gstelement_class;
|
||||||
|
GstVideofilterClass *videofilter_class;
|
||||||
|
|
||||||
gobject_class = (GObjectClass *) klass;
|
gobject_class = (GObjectClass *) klass;
|
||||||
gstelement_class = (GstElementClass *) klass;
|
gstelement_class = (GstElementClass *) klass;
|
||||||
|
videofilter_class = GST_VIDEOFILTER_CLASS (klass);
|
||||||
parent_class = g_type_class_ref (GST_TYPE_ELEMENT);
|
|
||||||
|
|
||||||
gst_vertigotv_signals[RESET_SIGNAL] =
|
gst_vertigotv_signals[RESET_SIGNAL] =
|
||||||
g_signal_new ("reset-parms",
|
g_signal_new ("reset-parms",
|
||||||
|
@ -174,6 +176,8 @@ gst_vertigotv_class_init (GstVertigoTVClass * klass)
|
||||||
|
|
||||||
gobject_class->set_property = gst_vertigotv_set_property;
|
gobject_class->set_property = gst_vertigotv_set_property;
|
||||||
gobject_class->get_property = gst_vertigotv_get_property;
|
gobject_class->get_property = gst_vertigotv_get_property;
|
||||||
|
|
||||||
|
videofilter_class->setup = gst_vertigotv_setup;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -186,22 +190,21 @@ gst_vertigotv_reset_handler (GstElement *element)
|
||||||
filter->zoomrate = 1.01;
|
filter->zoomrate = 1.01;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
static GstPadLinkReturn
|
gst_vertigotv_setup(GstVideofilter *videofilter)
|
||||||
gst_vertigotv_sinkconnect (GstPad * pad, const GstCaps * caps)
|
|
||||||
{
|
{
|
||||||
GstVertigoTV *filter;
|
GstVertigoTV *filter;
|
||||||
gint area;
|
gint area;
|
||||||
GstStructure *structure;
|
int width = gst_videofilter_get_input_width(videofilter);
|
||||||
|
int height = gst_videofilter_get_input_height(videofilter);
|
||||||
|
|
||||||
filter = GST_VERTIGOTV (gst_pad_get_parent (pad));
|
g_return_if_fail(GST_IS_VERTIGOTV(videofilter));
|
||||||
|
filter = GST_VERTIGOTV(videofilter);
|
||||||
|
|
||||||
structure = gst_caps_get_structure (caps, 0);
|
filter->width = width;
|
||||||
|
filter->height = height;
|
||||||
|
|
||||||
gst_structure_get_int (structure, "width", &filter->width);
|
area = width * height;
|
||||||
gst_structure_get_int (structure, "height", &filter->height);
|
|
||||||
|
|
||||||
area = filter->width * filter->height;
|
|
||||||
|
|
||||||
g_free (filter->buffer);
|
g_free (filter->buffer);
|
||||||
filter->buffer = (guint32 *) g_malloc (area * 2 * sizeof(guint32));
|
filter->buffer = (guint32 *) g_malloc (area * 2 * sizeof(guint32));
|
||||||
|
@ -210,22 +213,12 @@ gst_vertigotv_sinkconnect (GstPad * pad, const GstCaps * caps)
|
||||||
filter->current_buffer = filter->buffer;
|
filter->current_buffer = filter->buffer;
|
||||||
filter->alt_buffer = filter->buffer + area;
|
filter->alt_buffer = filter->buffer + area;
|
||||||
filter->phase = 0;
|
filter->phase = 0;
|
||||||
|
|
||||||
return gst_pad_try_set_caps (filter->srcpad, caps);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_vertigotv_init (GstVertigoTV * filter)
|
gst_vertigotv_init (GTypeInstance *instance, gpointer g_class)
|
||||||
{
|
{
|
||||||
filter->sinkpad = gst_pad_new_from_template (
|
GstVertigoTV *filter = GST_VERTIGOTV (instance);
|
||||||
gst_static_pad_template_get (&gst_effectv_sink_template), "sink");
|
|
||||||
gst_pad_set_chain_function (filter->sinkpad, gst_vertigotv_chain);
|
|
||||||
gst_pad_set_link_function (filter->sinkpad, gst_vertigotv_sinkconnect);
|
|
||||||
gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad);
|
|
||||||
|
|
||||||
filter->srcpad = gst_pad_new_from_template (
|
|
||||||
gst_static_pad_template_get (&gst_effectv_src_template), "src");
|
|
||||||
gst_element_add_pad (GST_ELEMENT (filter), filter->srcpad);
|
|
||||||
|
|
||||||
filter->buffer = NULL;
|
filter->buffer = NULL;
|
||||||
filter->phase = 0.0;
|
filter->phase = 0.0;
|
||||||
|
@ -276,13 +269,11 @@ gst_vertigotv_set_parms (GstVertigoTV *filter)
|
||||||
if (filter->phase > 5700000) filter->phase = 0;
|
if (filter->phase > 5700000) filter->phase = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_vertigotv_chain (GstPad * pad, GstData *_data)
|
gst_vertigotv_rgb32 (GstVideofilter *videofilter, void *d, void *s)
|
||||||
{
|
{
|
||||||
GstBuffer *buf = GST_BUFFER (_data);
|
|
||||||
GstVertigoTV *filter;
|
GstVertigoTV *filter;
|
||||||
guint32 *src, *dest;
|
guint32 *src, *dest;
|
||||||
GstBuffer *outbuf;
|
|
||||||
guint32 *p;
|
guint32 *p;
|
||||||
guint32 v;
|
guint32 v;
|
||||||
gint x, y;
|
gint x, y;
|
||||||
|
@ -290,19 +281,15 @@ gst_vertigotv_chain (GstPad * pad, GstData *_data)
|
||||||
gint i;
|
gint i;
|
||||||
gint width, height, area;
|
gint width, height, area;
|
||||||
|
|
||||||
filter = GST_VERTIGOTV (gst_pad_get_parent (pad));
|
filter = GST_VERTIGOTV (videofilter);
|
||||||
|
|
||||||
src = (guint32 *) GST_BUFFER_DATA (buf);
|
src = (guint32 *) s;
|
||||||
|
dest = (guint32 *) d;
|
||||||
|
|
||||||
width = filter->width;
|
width = filter->width;
|
||||||
height = filter->height;
|
height = filter->height;
|
||||||
area = width * height;
|
area = width * height;
|
||||||
|
|
||||||
outbuf = gst_buffer_new ();
|
|
||||||
GST_BUFFER_SIZE (outbuf) = area * sizeof(guint32);
|
|
||||||
dest = (guint32 *) GST_BUFFER_DATA (outbuf) = g_malloc (GST_BUFFER_SIZE (outbuf));
|
|
||||||
GST_BUFFER_TIMESTAMP (outbuf) = GST_BUFFER_TIMESTAMP (buf);
|
|
||||||
|
|
||||||
gst_vertigotv_set_parms (filter);
|
gst_vertigotv_set_parms (filter);
|
||||||
p = filter->alt_buffer;
|
p = filter->alt_buffer;
|
||||||
|
|
||||||
|
@ -328,10 +315,6 @@ gst_vertigotv_chain (GstPad * pad, GstData *_data)
|
||||||
|
|
||||||
memcpy(dest, filter->alt_buffer, area * sizeof(guint32));
|
memcpy(dest, filter->alt_buffer, area * sizeof(guint32));
|
||||||
|
|
||||||
gst_buffer_unref (buf);
|
|
||||||
|
|
||||||
gst_pad_push (filter->srcpad, GST_DATA (outbuf));
|
|
||||||
|
|
||||||
p = filter->current_buffer;
|
p = filter->current_buffer;
|
||||||
filter->current_buffer = filter->alt_buffer;
|
filter->current_buffer = filter->alt_buffer;
|
||||||
filter->alt_buffer = p;
|
filter->alt_buffer = p;
|
||||||
|
|
|
@ -132,7 +132,6 @@ static GstVideofilterFormat gst_warptv_formats[] = {
|
||||||
{ "RGB ", 32, gst_warptv_rgb32, 24, G_BIG_ENDIAN, 0x0000ff00, 0x00ff0000, 0xff000000 },
|
{ "RGB ", 32, gst_warptv_rgb32, 24, G_BIG_ENDIAN, 0x0000ff00, 0x00ff0000, 0xff000000 },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_warptv_base_init (gpointer g_class)
|
gst_warptv_base_init (gpointer g_class)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue