effectv: Move type definitions into separate headers

This is needed for the docs later.
This commit is contained in:
Sebastian Dröge 2009-06-16 20:13:35 +02:00
parent 44a822b29f
commit 414d0548e2
19 changed files with 639 additions and 302 deletions

View file

@ -18,4 +18,5 @@ libgsteffectv_la_LIBADD = \
libgsteffectv_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgsteffectv_la_LIBTOOLFLAGS = --tag=disable-static
noinst_HEADERS = gsteffectv.h
noinst_HEADERS = gsteffectv.h gstaging.h gstdice.h gstedge.h \
gstquark.h gstrev.h gstshagadelic.h gstvertigo.h gstwarp.h

View file

@ -31,33 +31,11 @@
#include <string.h>
#include <math.h>
#include <gst/gst.h>
#include "gstaging.h"
#include <gst/video/video.h>
#include <gst/video/gstvideofilter.h>
#include <gst/controller/gstcontroller.h>
#define GST_TYPE_AGINGTV \
(gst_agingtv_get_type())
#define GST_AGINGTV(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AGINGTV,GstAgingTV))
#define GST_AGINGTV_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AGINGTV,GstAgingTVClass))
#define GST_IS_AGINGTV(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AGINGTV))
#define GST_IS_AGINGTV_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AGINGTV))
#define SCRATCH_MAX 20
typedef struct _scratch
{
gint life;
gint x;
gint dx;
gint init;
} scratch;
static const gint dx[8] = { 1, 1, 0, -1, -1, -1, 0, 1 };
static const gint dy[8] = { 0, -1, -1, -1, 0, 1, 1, 1 };
@ -75,34 +53,6 @@ enum
#define DEFAULT_PITS TRUE
#define DEFAULT_DUSTS TRUE
typedef struct _GstAgingTV GstAgingTV;
typedef struct _GstAgingTVClass GstAgingTVClass;
struct _GstAgingTV
{
GstVideoFilter videofilter;
gint width, height;
gboolean color_aging;
gboolean pits;
gboolean dusts;
gint coloraging_state;
scratch scratches[SCRATCH_MAX];
gint scratch_lines;
gint dust_interval;
gint pits_interval;
};
struct _GstAgingTVClass
{
GstVideoFilterClass parent_class;
};
static GstStaticPadTemplate gst_agingtv_src_template =
GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,

89
gst/effectv/gstaging.h Normal file
View file

@ -0,0 +1,89 @@
/* GStreamer
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
* Copyright (C) <2003> David Schleef <ds@schleef.org>
* Copyright (C) <2009> Sebastian Dröge <sebastian.droege@collabora.co.uk>
*
* EffecTV - Realtime Digital Video Effector
* Copyright (C) 2001-2002 FUKUCHI Kentarou
*
* AgingTV - film-aging effect.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GST_AGING_H__
#define __GST_AGING_H__
#include <gst/gst.h>
#include <gst/video/gstvideofilter.h>
G_BEGIN_DECLS
#define GST_TYPE_AGINGTV \
(gst_agingtv_get_type())
#define GST_AGINGTV(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AGINGTV,GstAgingTV))
#define GST_AGINGTV_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AGINGTV,GstAgingTVClass))
#define GST_IS_AGINGTV(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AGINGTV))
#define GST_IS_AGINGTV_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AGINGTV))
typedef struct _scratch
{
gint life;
gint x;
gint dx;
gint init;
} scratch;
#define SCRATCH_MAX 20
typedef struct _GstAgingTV GstAgingTV;
typedef struct _GstAgingTVClass GstAgingTVClass;
struct _GstAgingTV
{
GstVideoFilter videofilter;
gint width, height;
gboolean color_aging;
gboolean pits;
gboolean dusts;
gint coloraging_state;
scratch scratches[SCRATCH_MAX];
gint scratch_lines;
gint dust_interval;
gint pits_interval;
};
struct _GstAgingTVClass
{
GstVideoFilterClass parent_class;
};
GType gst_agingtv_get_type (void);
G_END_DECLS
#endif /* __GST_AGING_H__ */

View file

@ -9,6 +9,21 @@
* I suppose this looks similar to PuzzleTV, but it's not. The screen is
* divided into small squares, each of which is rotated either 0, 90, 180 or
* 270 degrees. The amount of rotation for each square is chosen at random.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
@ -16,27 +31,12 @@
#endif
#include <string.h>
#include <gst/gst.h>
#include "gstdice.h"
#include <gst/video/video.h>
#include <gst/video/gstvideofilter.h>
#include <gst/controller/gstcontroller.h>
#define GST_TYPE_DICETV \
(gst_dicetv_get_type())
#define GST_DICETV(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DICETV,GstDiceTV))
#define GST_DICETV_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DICETV,GstDiceTVClass))
#define GST_IS_DICETV(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DICETV))
#define GST_IS_DICETV_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DICETV))
typedef struct _GstDiceTV GstDiceTV;
typedef struct _GstDiceTVClass GstDiceTVClass;
#define DEFAULT_CUBE_BITS 4
#define MAX_CUBE_BITS 5
#define MIN_CUBE_BITS 0
@ -47,26 +47,7 @@ typedef enum _dice_dir
DICE_RIGHT = 1,
DICE_DOWN = 2,
DICE_LEFT = 3
}
DiceDir;
struct _GstDiceTV
{
GstVideoFilter videofilter;
gint width, height;
guint8 *dicemap;
gint g_cube_bits;
gint g_cube_size;
gint g_map_height;
gint g_map_width;
};
struct _GstDiceTVClass
{
GstVideoFilterClass parent_class;
};
} DiceDir;
GST_BOILERPLATE (GstDiceTV, gst_dicetv, GstVideoFilter, GST_TYPE_VIDEO_FILTER);
@ -90,8 +71,8 @@ static GstStaticPadTemplate gst_dicetv_sink_template =
enum
{
ARG_0,
ARG_CUBE_BITS
PROP_0,
PROP_CUBE_BITS
};
static gboolean
@ -238,7 +219,7 @@ gst_dicetv_set_property (GObject * object, guint prop_id, const GValue * value,
GstDiceTV *filter = GST_DICETV (object);
switch (prop_id) {
case ARG_CUBE_BITS:
case PROP_CUBE_BITS:
filter->g_cube_bits = g_value_get_int (value);
gst_dicetv_create_map (filter);
break;
@ -255,7 +236,7 @@ gst_dicetv_get_property (GObject * object, guint prop_id, GValue * value,
GstDiceTV *filter = GST_DICETV (object);
switch (prop_id) {
case ARG_CUBE_BITS:
case PROP_CUBE_BITS:
g_value_set_int (value, filter->g_cube_bits);
break;
default:
@ -301,7 +282,7 @@ gst_dicetv_class_init (GstDiceTVClass * klass)
gobject_class->get_property = gst_dicetv_get_property;
gobject_class->finalize = gst_dicetv_finalize;
g_object_class_install_property (gobject_class, ARG_CUBE_BITS,
g_object_class_install_property (gobject_class, PROP_CUBE_BITS,
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 | G_PARAM_STATIC_STRINGS | GST_PARAM_CONTROLLABLE));

74
gst/effectv/gstdice.h Normal file
View file

@ -0,0 +1,74 @@
/* GStreamer
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
* Copyright (C) <2009> Sebastian Dröge <sebastian.droege@collabora.co.uk>
*
* dice.c: a 'dicing' effect
* copyright (c) 2001 Sam Mertens. This code is subject to the provisions of
* the GNU Library Public License.
*
* I suppose this looks similar to PuzzleTV, but it's not. The screen is
* divided into small squares, each of which is rotated either 0, 90, 180 or
* 270 degrees. The amount of rotation for each square is chosen at random.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GST_DICE_H__
#define __GST_DICE_H__
#include <gst/gst.h>
#include <gst/video/gstvideofilter.h>
G_BEGIN_DECLS
#define GST_TYPE_DICETV \
(gst_dicetv_get_type())
#define GST_DICETV(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DICETV,GstDiceTV))
#define GST_DICETV_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DICETV,GstDiceTVClass))
#define GST_IS_DICETV(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DICETV))
#define GST_IS_DICETV_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DICETV))
typedef struct _GstDiceTV GstDiceTV;
typedef struct _GstDiceTVClass GstDiceTVClass;
struct _GstDiceTV
{
GstVideoFilter videofilter;
gint width, height;
guint8 *dicemap;
gint g_cube_bits;
gint g_cube_size;
gint g_map_height;
gint g_map_width;
};
struct _GstDiceTVClass
{
GstVideoFilterClass parent_class;
};
GType gst_dicetv_get_type (void);
G_END_DECLS
#endif /* __GST_DICE_H__ */

View file

@ -30,39 +30,9 @@
#include <string.h>
#include <gst/gst.h>
#include "gstedge.h"
#include <gst/video/video.h>
#include <gst/video/gstvideofilter.h>
#define GST_TYPE_EDGETV \
(gst_edgetv_get_type())
#define GST_EDGETV(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_EDGETV,GstEdgeTV))
#define GST_EDGETV_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_EDGETV,GstEdgeTVClass))
#define GST_IS_EDGETV(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_EDGETV))
#define GST_IS_EDGETV_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_EDGETV))
typedef struct _GstEdgeTV GstEdgeTV;
typedef struct _GstEdgeTVClass GstEdgeTVClass;
struct _GstEdgeTV
{
GstVideoFilter videofilter;
gint width, height;
gint map_width, map_height;
guint32 *map;
gint video_width_margin;
};
struct _GstEdgeTVClass
{
GstVideoFilterClass parent_class;
};
GST_BOILERPLATE (GstEdgeTV, gst_edgetv, GstVideoFilter, GST_TYPE_VIDEO_FILTER);

69
gst/effectv/gstedge.h Normal file
View file

@ -0,0 +1,69 @@
/* GStreamer
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
* Copyright (C) <2009> Sebastian Dröge <sebastian.droege@collabora.co.uk>
*
* EffecTV:
* Copyright (C) 2001-2002 FUKUCHI Kentarou
*
* EdgeTV - detects edge and display it in good old computer way
*
* EffecTV is free software. This library is free software;
* you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GST_EDGE_H__
#define __GST_EDGE_H__
#include <gst/gst.h>
#include <gst/video/gstvideofilter.h>
G_BEGIN_DECLS
#define GST_TYPE_EDGETV \
(gst_edgetv_get_type())
#define GST_EDGETV(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_EDGETV,GstEdgeTV))
#define GST_EDGETV_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_EDGETV,GstEdgeTVClass))
#define GST_IS_EDGETV(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_EDGETV))
#define GST_IS_EDGETV_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_EDGETV))
typedef struct _GstEdgeTV GstEdgeTV;
typedef struct _GstEdgeTVClass GstEdgeTVClass;
struct _GstEdgeTV
{
GstVideoFilter videofilter;
gint width, height;
gint map_width, map_height;
guint32 *map;
gint video_width_margin;
};
struct _GstEdgeTVClass
{
GstVideoFilterClass parent_class;
};
GType gst_edgetv_get_type (void);
G_END_DECLS
#endif /* __GST_EDGE_H__ */

View file

@ -26,6 +26,14 @@
#endif
#include "gsteffectv.h"
#include "gstaging.h"
#include "gstdice.h"
#include "gstedge.h"
#include "gstquark.h"
#include "gstrev.h"
#include "gstshagadelic.h"
#include "gstvertigo.h"
#include "gstwarp.h"
struct _elements_entry
{

View file

@ -23,11 +23,3 @@
#include <gst/gst.h>
GType gst_edgetv_get_type (void);
GType gst_agingtv_get_type (void);
GType gst_dicetv_get_type (void);
GType gst_warptv_get_type (void);
GType gst_shagadelictv_get_type (void);
GType gst_vertigotv_get_type (void);
GType gst_revtv_get_type (void);
GType gst_quarktv_get_type (void);

View file

@ -28,47 +28,17 @@
#include "config.h"
#endif
#include <gst/video/gstvideofilter.h>
#include <math.h>
#include <string.h>
#include <gst/video/video.h>
#include "gstquark.h"
#define GST_TYPE_QUARKTV \
(gst_quarktv_get_type())
#define GST_QUARKTV(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_QUARKTV,GstQuarkTV))
#define GST_QUARKTV_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_QUARKTV,GstQuarkTVClass))
#define GST_IS_QUARKTV(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_QUARKTV))
#define GST_IS_QUARKTV_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_QUARKTV))
#include <gst/video/video.h>
/* number of frames of time-buffer. It should be as a configurable paramater */
/* This number also must be 2^n just for the speed. */
#define PLANES 16
typedef struct _GstQuarkTV GstQuarkTV;
typedef struct _GstQuarkTVClass GstQuarkTVClass;
struct _GstQuarkTV
{
GstVideoFilter element;
gint width, height;
gint area;
gint planes;
gint current_plane;
GstBuffer **planetable;
};
struct _GstQuarkTVClass
{
GstVideoFilterClass parent_class;
};
enum
{
PROP_0,

70
gst/effectv/gstquark.h Normal file
View file

@ -0,0 +1,70 @@
/* GStreamer
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
* Copyright (C) <2009> Sebastian Dröge <sebastian.droege@collabora.co.uk>
*
* EffecTV:
* Copyright (C) 2001-2002 FUKUCHI Kentarou
*
* QuarkTV - motion disolver.
*
* EffecTV is free software. This library is free software;
* you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GST_QUARK_H__
#define __GST_QUARK_H__
#include <gst/gst.h>
#include <gst/video/gstvideofilter.h>
G_BEGIN_DECLS
#define GST_TYPE_QUARKTV \
(gst_quarktv_get_type())
#define GST_QUARKTV(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_QUARKTV,GstQuarkTV))
#define GST_QUARKTV_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_QUARKTV,GstQuarkTVClass))
#define GST_IS_QUARKTV(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_QUARKTV))
#define GST_IS_QUARKTV_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_QUARKTV))
typedef struct _GstQuarkTV GstQuarkTV;
typedef struct _GstQuarkTVClass GstQuarkTVClass;
struct _GstQuarkTV
{
GstVideoFilter element;
gint width, height;
gint area;
gint planes;
gint current_plane;
GstBuffer **planetable;
};
struct _GstQuarkTVClass
{
GstVideoFilterClass parent_class;
};
GType gst_quarktv_get_type (void);
G_END_DECLS
#endif /* __GST_QUARK_H__ */

View file

@ -47,43 +47,12 @@
#include <math.h>
#include <string.h>
#include <gst/gst.h>
#include "gstrev.h"
#include <gst/video/video.h>
#include <gst/video/gstvideofilter.h>
#define GST_TYPE_REVTV \
(gst_revtv_get_type())
#define GST_REVTV(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_REVTV,GstRevTV))
#define GST_REVTV_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_REVTV,GstRevTVClass))
#define GST_IS_REVTV(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_REVTV))
#define GST_IS_REVTV_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_REVTV))
#define THE_COLOR 0xffffffff
typedef struct _GstRevTV GstRevTV;
typedef struct _GstRevTVClass GstRevTVClass;
struct _GstRevTV
{
GstVideoFilter videofilter;
gint width, height;
gint vgrabtime;
gint vgrab;
gint linespace;
gint vscale;
};
struct _GstRevTVClass
{
GstVideoFilterClass parent_class;
};
enum
{
PROP_0,

86
gst/effectv/gstrev.h Normal file
View file

@ -0,0 +1,86 @@
/* GStreamer
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
*
* EffecTV:
* Copyright (C) 2001 FUKUCHI Kentarou
*
* EffecTV - Realtime Digital Video Effector
* Copyright (C) 2001 FUKUCHI Kentarou
*
* revTV based on Rutt-Etra Video Synthesizer 1974?
* (c)2002 Ed Tannenbaum
*
* This effect acts like a waveform monitor on each line.
* It was originally done by deflecting the electron beam on a monitor using
* additional electromagnets on the yoke of a b/w CRT.
* Here it is emulated digitally.
* Experimaental tapes were made with this system by Bill and
* Louise Etra and Woody and Steina Vasulka
* The line spacing can be controlled using the 1 and 2 Keys.
* The gain is controlled using the 3 and 4 keys.
* The update rate is controlled using the 0 and - keys.
* EffecTV is free software. This library is free software;
* you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GST_REV_H__
#define __GST_REV_H__
#include <gst/gst.h>
#include <gst/video/gstvideofilter.h>
G_BEGIN_DECLS
#define GST_TYPE_REVTV \
(gst_revtv_get_type())
#define GST_REVTV(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_REVTV,GstRevTV))
#define GST_REVTV_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_REVTV,GstRevTVClass))
#define GST_IS_REVTV(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_REVTV))
#define GST_IS_REVTV_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_REVTV))
typedef struct _GstRevTV GstRevTV;
typedef struct _GstRevTVClass GstRevTVClass;
struct _GstRevTV
{
GstVideoFilter videofilter;
gint width, height;
gint vgrabtime;
gint vgrab;
gint linespace;
gint vscale;
};
struct _GstRevTVClass
{
GstVideoFilterClass parent_class;
};
GType gst_revtv_get_type (void);
G_END_DECLS
#endif /* __GST_REV_H__ */

View file

@ -29,49 +29,14 @@
#include <math.h>
#include <string.h>
#include <gst/gst.h>
#include "gstshagadelic.h"
#include <gst/video/video.h>
#include <gst/video/gstvideofilter.h>
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
#define GST_TYPE_SHAGADELICTV \
(gst_shagadelictv_get_type())
#define GST_SHAGADELICTV(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SHAGADELICTV,GstShagadelicTV))
#define GST_SHAGADELICTV_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SHAGADELICTV,GstShagadelicTVClass))
#define GST_IS_SHAGADELICTV(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SHAGADELICTV))
#define GST_IS_SHAGADELICTV_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SHAGADELICTV))
typedef struct _GstShagadelicTV GstShagadelicTV;
typedef struct _GstShagadelicTVClass GstShagadelicTVClass;
struct _GstShagadelicTV
{
GstVideoFilter videofilter;
gint width, height;
gint stat;
guint8 *ripple;
guint8 *spiral;
guint8 phase;
gint rx, ry;
gint bx, by;
gint rvx, rvy;
gint bvx, bvy;
};
struct _GstShagadelicTVClass
{
GstVideoFilterClass parent_class;
};
GST_BOILERPLATE (GstShagadelicTV, gst_shagadelictv, GstVideoFilter,
GST_TYPE_VIDEO_FILTER);

View file

@ -0,0 +1,72 @@
/* GStreamer
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
*
* EffecTV:
* Copyright (C) 2001 FUKUCHI Kentarou
*
* Inspired by Adrian Likin's script for the GIMP.
* EffecTV is free software. This library is free software;
* you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GST_SHAGADELIC_H__
#define __GST_SHAGADELIC_H__
#include <gst/gst.h>
#include <gst/video/gstvideofilter.h>
G_BEGIN_DECLS
#define GST_TYPE_SHAGADELICTV \
(gst_shagadelictv_get_type())
#define GST_SHAGADELICTV(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SHAGADELICTV,GstShagadelicTV))
#define GST_SHAGADELICTV_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SHAGADELICTV,GstShagadelicTVClass))
#define GST_IS_SHAGADELICTV(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SHAGADELICTV))
#define GST_IS_SHAGADELICTV_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SHAGADELICTV))
typedef struct _GstShagadelicTV GstShagadelicTV;
typedef struct _GstShagadelicTVClass GstShagadelicTVClass;
struct _GstShagadelicTV
{
GstVideoFilter videofilter;
gint width, height;
gint stat;
guint8 *ripple;
guint8 *spiral;
guint8 phase;
gint rx, ry;
gint bx, by;
gint rvx, rvy;
gint bvx, bvy;
};
struct _GstShagadelicTVClass
{
GstVideoFilterClass parent_class;
};
GType gst_shagadelictv_get_type (void);
G_END_DECLS
#endif /* __GST_SHAGADELIC_H__ */

View file

@ -21,7 +21,6 @@
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@ -29,43 +28,9 @@
#include <math.h>
#include <string.h>
#include <gst/gst.h>
#include "gstvertigo.h"
#include <gst/video/video.h>
#include <gst/video/gstvideofilter.h>
#define GST_TYPE_VERTIGOTV \
(gst_vertigotv_get_type())
#define GST_VERTIGOTV(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VERTIGOTV,GstVertigoTV))
#define GST_VERTIGOTV_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VERTIGOTV,GstVertigoTVClass))
#define GST_IS_VERTIGOTV(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VERTIGOTV))
#define GST_IS_VERTIGOTV_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VERTIGOTV))
typedef struct _GstVertigoTV GstVertigoTV;
typedef struct _GstVertigoTVClass GstVertigoTVClass;
struct _GstVertigoTV
{
GstVideoFilter videofilter;
gint width, height;
guint32 *buffer;
guint32 *current_buffer, *alt_buffer;
gint dx, dy;
gint sx, sy;
gdouble phase;
gdouble phase_increment;
gdouble zoomrate;
};
struct _GstVertigoTVClass
{
GstVideoFilterClass parent_class;
};
GST_BOILERPLATE (GstVertigoTV, gst_vertigotv, GstVideoFilter,
GST_TYPE_VIDEO_FILTER);

70
gst/effectv/gstvertigo.h Normal file
View file

@ -0,0 +1,70 @@
/* GStreamer
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
*
* EffecTV:
* Copyright (C) 2001 FUKUCHI Kentarou
*
* EffecTV is free software. This library is free software;
* you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GST_VERTIGO_H__
#define __GST_VERTIGO_H__
#include <gst/gst.h>
#include <gst/video/gstvideofilter.h>
G_BEGIN_DECLS
#define GST_TYPE_VERTIGOTV \
(gst_vertigotv_get_type())
#define GST_VERTIGOTV(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VERTIGOTV,GstVertigoTV))
#define GST_VERTIGOTV_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VERTIGOTV,GstVertigoTVClass))
#define GST_IS_VERTIGOTV(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VERTIGOTV))
#define GST_IS_VERTIGOTV_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VERTIGOTV))
typedef struct _GstVertigoTV GstVertigoTV;
typedef struct _GstVertigoTVClass GstVertigoTVClass;
struct _GstVertigoTV
{
GstVideoFilter videofilter;
gint width, height;
guint32 *buffer;
guint32 *current_buffer, *alt_buffer;
gint dx, dy;
gint sx, sy;
gdouble phase;
gdouble phase_increment;
gdouble zoomrate;
};
struct _GstVertigoTVClass
{
GstVideoFilterClass parent_class;
};
GType gst_vertigotv_get_type (void);
G_END_DECLS
#endif /* __GST_VERTIGO_H__ */

View file

@ -40,46 +40,14 @@
#include <string.h>
#include <math.h>
#include <gst/gst.h>
#include "gstwarp.h"
#include <gst/video/video.h>
#include <gst/video/gstvideofilter.h>
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
#define GST_TYPE_WARPTV \
(gst_warptv_get_type())
#define GST_WARPTV(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_WARPTV,GstWarpTV))
#define GST_WARPTV_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_WARPTV,GstWarpTVClass))
#define GST_IS_WARPTV(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_WARPTV))
#define GST_IS_WARPTV_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_WARPTV))
typedef struct _GstWarpTV GstWarpTV;
typedef struct _GstWarpTVClass GstWarpTVClass;
struct _GstWarpTV
{
GstVideoFilter videofilter;
gint width, height;
gint *offstable;
gint32 *disttable;
gint32 ctable[1024];
gint32 sintable[1024 + 256];
gint tval;
};
struct _GstWarpTVClass
{
GstVideoFilterClass parent_class;
};
GST_BOILERPLATE (GstWarpTV, gst_warptv, GstVideoFilter, GST_TYPE_VIDEO_FILTER);
static void initSinTable (GstWarpTV * filter);

68
gst/effectv/gstwarp.h Normal file
View file

@ -0,0 +1,68 @@
/* GStreamer
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
* Copyright (C) <2003> David Schleef <ds@schleef.org>
*
* EffecTV - Realtime Digital Video Effector
* Copyright (C) 2001 FUKUCHI Kentarou
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GST_WARP_H__
#define __GST_WARP_H__
#include <gst/gst.h>
#include <gst/video/gstvideofilter.h>
G_BEGIN_DECLS
#define GST_TYPE_WARPTV \
(gst_warptv_get_type())
#define GST_WARPTV(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_WARPTV,GstWarpTV))
#define GST_WARPTV_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_WARPTV,GstWarpTVClass))
#define GST_IS_WARPTV(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_WARPTV))
#define GST_IS_WARPTV_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_WARPTV))
typedef struct _GstWarpTV GstWarpTV;
typedef struct _GstWarpTVClass GstWarpTVClass;
struct _GstWarpTV
{
GstVideoFilter videofilter;
gint width, height;
gint *offstable;
gint32 *disttable;
gint32 ctable[1024];
gint32 sintable[1024 + 256];
gint tval;
};
struct _GstWarpTVClass
{
GstVideoFilterClass parent_class;
};
GType gst_warptv_get_type (void);
G_END_DECLS
#endif /* __GST_WARP_H__ */