Commit 414d0548 authored by Sebastian Dröge's avatar Sebastian Dröge
Browse files

effectv: Move type definitions into separate headers

This is needed for the docs later.
parent 44a822b2
......@@ -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
......@@ -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,
......
/* 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__ */
......@@ -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 <gst/video/video.h>
#include <gst/video/gstvideofilter.h>
#include "gstdice.h"
#include <gst/video/video.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));
......
/* 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__ */
......@@ -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);
......
/* 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__ */
......@@ -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
{
......
......@@ -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);
......@@ -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,
......
/* 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__ */
......@@ -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