Commit 43445935 authored by Sebastian Dröge's avatar Sebastian Dröge

Moved 'deinterlace2' from -bad to -good

And rename it to deinterlace.
parent 77c15d10
......@@ -280,6 +280,7 @@ AG_GST_CHECK_PLUGIN(autodetect)
AG_GST_CHECK_PLUGIN(avi)
AG_GST_CHECK_PLUGIN(cutter)
AG_GST_CHECK_PLUGIN(debugutils)
AG_GST_CHECK_PLUGIN(deinterlace)
AG_GST_CHECK_PLUGIN(effectv)
AG_GST_CHECK_PLUGIN(equalizer)
AG_GST_CHECK_PLUGIN(flv)
......@@ -1055,7 +1056,7 @@ gst/auparse/Makefile
gst/autodetect/Makefile
gst/avi/Makefile
gst/cutter/Makefile
gst/debugutils/Makefile
gst/deinterlace/Makefile
gst/effectv/Makefile
gst/equalizer/Makefile
gst/flv/Makefile
......
......@@ -137,6 +137,7 @@ EXTRA_HFILES = \
$(top_srcdir)/gst/cutter/gstcutter.h \
$(top_srcdir)/gst/debugutils/gsttaginject.h \
$(top_srcdir)/gst/debugutils/progressreport.h \
$(top_srcdir)/gst/deinterlace/gstdeinterlace.h \
$(top_srcdir)/gst/equalizer/gstiirequalizer.h \
$(top_srcdir)/gst/equalizer/gstiirequalizer3bands.h \
$(top_srcdir)/gst/equalizer/gstiirequalizer10bands.h \
......
......@@ -50,6 +50,7 @@
<xi:include href="xml/element-cmmldec.xml" />
<xi:include href="xml/element-cmmlenc.xml" />
<xi:include href="xml/element-cutter.xml" />
<xi:include href="xml/element-deinterlace.xml" />
<xi:include href="xml/element-deinterleave.xml" />
<xi:include href="xml/element-directdrawsink.xml" />
<xi:include href="xml/element-directsoundsink.xml" />
......@@ -155,6 +156,7 @@
<xi:include href="xml/plugin-cairo.xml" />
<xi:include href="xml/plugin-cutter.xml" />
<xi:include href="xml/plugin-debug.xml" />
<xi:include href="xml/plugin-deinterlace.xml" />
<xi:include href="xml/plugin-directdraw.xml" />
<xi:include href="xml/plugin-directsound.xml" />
<xi:include href="xml/plugin-dv.xml" />
......
......@@ -464,6 +464,20 @@ GstCutterClass
gst_cutter_get_type
</SECTION>
<SECTION>
<FILE>element-deinterlace</FILE>
<TITLE>deinterlace</TITLE>
GstDeinterlace
<SUBSECTION Standard>
GstDeinterlaceClass
GST_IS_DEINTERLACE
GST_IS_DEINTERLACE_CLASS
GST_DEINTERLACE
GST_DEINTERLACE_CLASS
GST_TYPE_DEINTERLACE
gst_deinterlace_get_type
</SECTION>
<SECTION>
<FILE>element-deinterleave</FILE>
<TITLE>deinterleave</TITLE>
......
......@@ -19918,3 +19918,43 @@
<DEFAULT>TRUE</DEFAULT>
</ARG>
<ARG>
<NAME>GstDeinterlace::fields</NAME>
<TYPE>GstDeinterlaceFields</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>fields</NICK>
<BLURB>Fields to use for deinterlacing.</BLURB>
<DEFAULT>All fields</DEFAULT>
</ARG>
<ARG>
<NAME>GstDeinterlace::method</NAME>
<TYPE>GstDeinterlaceMethods</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Method</NICK>
<BLURB>Deinterlace Method.</BLURB>
<DEFAULT>Motion Adaptive: Advanced Detection</DEFAULT>
</ARG>
<ARG>
<NAME>GstDeinterlace::mode</NAME>
<TYPE>GstDeinterlaceModes</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Mode</NICK>
<BLURB>Deinterlace Mode.</BLURB>
<DEFAULT>Enfore deinterlacing</DEFAULT>
</ARG>
<ARG>
<NAME>GstDeinterlace::tff</NAME>
<TYPE>GstDeinterlaceFieldLayout</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>tff</NICK>
<BLURB>Deinterlace top field first.</BLURB>
<DEFAULT>Auto detection</DEFAULT>
</ARG>
......@@ -142,6 +142,8 @@ GObject
GstID3Demux
GstGoom
GstGoom2k1
GstFLVDemux
GstFlvMux
GstMultipartDemux
GstMultipartMux
GstMuLawEnc
......@@ -187,6 +189,7 @@ GObject
GstInterleave
GstDeinterleave
GstMonoscope
GstDeinterlace
GstWavEnc
GstAuParse
GstRTPDepay
......
......@@ -40,4 +40,6 @@ GstSpeexEnc GstTagSetter GstPreset
GstOssMixerElement GstImplementsInterface GstMixer
GstMatroskaMux GstTagSetter
GstVideoMixer GstChildProxy
GstFlvMux GstTagSetter
GstAviMux GstTagSetter
GstDeinterlace GstChildProxy
<plugin>
<name>deinterlace</name>
<description>Deinterlacer</description>
<filename>../../gst/deinterlace/.libs/libgstdeinterlace.so</filename>
<basename>libgstdeinterlace.so</basename>
<version>0.10.14.2</version>
<license>LGPL</license>
<source>gst-plugins-good</source>
<package>GStreamer Good Plug-ins CVS/prerelease</package>
<origin>Unknown package origin</origin>
<elements>
<element>
<name>deinterlace</name>
<longname>Deinterlacer</longname>
<class>Filter/Video</class>
<description>Deinterlace Methods ported from DScaler/TvTime</description>
<author>Martin Eikermann &lt;meiker@upb.de&gt;, Sebastian Dröge &lt;slomo@circular-chaos.org&gt;</author>
<pads>
<caps>
<name>sink</name>
<direction>sink</direction>
<presence>always</presence>
<details>video/x-raw-yuv, format=(fourcc)YUY2, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)YVYU, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
</caps>
<caps>
<name>src</name>
<direction>source</direction>
<presence>always</presence>
<details>video/x-raw-yuv, format=(fourcc)YUY2, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)YVYU, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
</caps>
</pads>
</element>
</elements>
</plugin>
\ No newline at end of file
plugin_LTLIBRARIES = libgstdeinterlace2.la
plugin_LTLIBRARIES = libgstdeinterlace.la
libgstdeinterlace2_la_SOURCES = \
gstdeinterlace2.c \
libgstdeinterlace_la_SOURCES = \
gstdeinterlace.c \
tvtime/greedy.c \
tvtime/greedyh.c \
tvtime/vfir.c \
......@@ -13,15 +13,15 @@ libgstdeinterlace2_la_SOURCES = \
tvtime/linearblend.c \
tvtime/scalerbob.c
libgstdeinterlace2_la_CFLAGS = $(GST_CFLAGS) \
libgstdeinterlace_la_CFLAGS = $(GST_CFLAGS) \
$(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(LIBOIL_CFLAGS)
libgstdeinterlace2_la_LIBADD = $(GST_LIBS) \
libgstdeinterlace_la_LIBADD = $(GST_LIBS) \
$(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) $(GST_BASE_LIBS) $(LIBOIL_LIBS)
libgstdeinterlace2_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstdeinterlace2_la_LIBTOOLFLAGS = --tag=disable-static
libgstdeinterlace_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstdeinterlace_la_LIBTOOLFLAGS = --tag=disable-static
noinst_HEADERS = \
gstdeinterlace2.h \
gstdeinterlace.h \
tvtime/mmx.h \
tvtime/sse.h \
tvtime/greedyh.asm \
......
......@@ -20,15 +20,15 @@
*/
/**
* SECTION:element-deinterlace2
* SECTION:element-deinterlace
*
* deinterlace2 deinterlaces interlaced video frames to progressive video frames.
* deinterlace deinterlaces interlaced video frames to progressive video frames.
* For this different algorithms can be selected which will be described later.
*
* <refsect2>
* <title>Example launch line</title>
* |[
* gst-launch -v filesrc location=/path/to/file ! decodebin2 ! ffmpegcolorspace ! deinterlace2 ! ffmpegcolorspace ! autovideosink
* gst-launch -v filesrc location=/path/to/file ! decodebin2 ! ffmpegcolorspace ! deinterlace ! ffmpegcolorspace ! autovideosink
* ]| This pipeline deinterlaces a video file with the default deinterlacing options.
* </refsect2>
*/
......@@ -41,13 +41,13 @@
#include <gst/video/video.h>
#include <liboil/liboil.h>
#include "gstdeinterlace2.h"
#include "gstdeinterlace.h"
#include "tvtime/plugins.h"
#include <string.h>
GST_DEBUG_CATEGORY_STATIC (deinterlace2_debug);
#define GST_CAT_DEFAULT (deinterlace2_debug)
GST_DEBUG_CATEGORY_STATIC (deinterlace_debug);
#define GST_CAT_DEFAULT (deinterlace_debug)
/* Object signals and args */
enum
......@@ -57,10 +57,10 @@ enum
/* Properties */
#define DEFAULT_MODE GST_DEINTERLACE2_MODE_INTERLACED
#define DEFAULT_METHOD GST_DEINTERLACE2_GREEDY_H
#define DEFAULT_FIELDS GST_DEINTERLACE2_ALL
#define DEFAULT_FIELD_LAYOUT GST_DEINTERLACE2_LAYOUT_AUTO
#define DEFAULT_MODE GST_DEINTERLACE_MODE_INTERLACED
#define DEFAULT_METHOD GST_DEINTERLACE_GREEDY_H
#define DEFAULT_FIELDS GST_DEINTERLACE_ALL
#define DEFAULT_FIELD_LAYOUT GST_DEINTERLACE_LAYOUT_AUTO
enum
{
......@@ -88,7 +88,7 @@ gst_deinterlace_method_init (GstDeinterlaceMethod * self)
static void
gst_deinterlace_method_deinterlace_frame (GstDeinterlaceMethod * self,
GstDeinterlace2 * parent, GstBuffer * outbuf)
GstDeinterlace * parent, GstBuffer * outbuf)
{
GstDeinterlaceMethodClass *klass = GST_DEINTERLACE_METHOD_GET_CLASS (self);
......@@ -117,7 +117,7 @@ G_DEFINE_TYPE (GstDeinterlaceSimpleMethod, gst_deinterlace_simple_method,
static void
gst_deinterlace_simple_method_interpolate_scanline (GstDeinterlaceMethod * self,
GstDeinterlace2 * parent, guint8 * out,
GstDeinterlace * parent, guint8 * out,
GstDeinterlaceScanlineData * scanlines, gint width)
{
oil_memcpy (out, scanlines->m1, parent->row_stride);
......@@ -125,7 +125,7 @@ gst_deinterlace_simple_method_interpolate_scanline (GstDeinterlaceMethod * self,
static void
gst_deinterlace_simple_method_copy_scanline (GstDeinterlaceMethod * self,
GstDeinterlace2 * parent, guint8 * out,
GstDeinterlace * parent, guint8 * out,
GstDeinterlaceScanlineData * scanlines, gint width)
{
oil_memcpy (out, scanlines->m0, parent->row_stride);
......@@ -133,7 +133,7 @@ gst_deinterlace_simple_method_copy_scanline (GstDeinterlaceMethod * self,
static void
gst_deinterlace_simple_method_deinterlace_frame (GstDeinterlaceMethod * self,
GstDeinterlace2 * parent, GstBuffer * outbuf)
GstDeinterlace * parent, GstBuffer * outbuf)
{
GstDeinterlaceSimpleMethodClass *dsm_class =
GST_DEINTERLACE_SIMPLE_METHOD_GET_CLASS (self);
......@@ -271,94 +271,94 @@ gst_deinterlace_simple_method_init (GstDeinterlaceSimpleMethod * self)
{
}
#define GST_TYPE_DEINTERLACE2_METHODS (gst_deinterlace2_methods_get_type ())
#define GST_TYPE_DEINTERLACE_METHODS (gst_deinterlace_methods_get_type ())
static GType
gst_deinterlace2_methods_get_type (void)
gst_deinterlace_methods_get_type (void)
{
static GType deinterlace2_methods_type = 0;
static GType deinterlace_methods_type = 0;
static const GEnumValue methods_types[] = {
{GST_DEINTERLACE2_TOMSMOCOMP, "Motion Adaptive: Motion Search",
{GST_DEINTERLACE_TOMSMOCOMP, "Motion Adaptive: Motion Search",
"tomsmocomp"},
{GST_DEINTERLACE2_GREEDY_H, "Motion Adaptive: Advanced Detection",
{GST_DEINTERLACE_GREEDY_H, "Motion Adaptive: Advanced Detection",
"greedyh"},
{GST_DEINTERLACE2_GREEDY_L, "Motion Adaptive: Simple Detection", "greedyl"},
{GST_DEINTERLACE2_VFIR, "Blur Vertical", "vfir"},
{GST_DEINTERLACE2_LINEAR, "Television: Full resolution", "linear"},
{GST_DEINTERLACE2_LINEAR_BLEND, "Blur: Temporal", "linearblend"},
{GST_DEINTERLACE2_SCALER_BOB, "Double lines", "scalerbob"},
{GST_DEINTERLACE2_WEAVE, "Weave", "weave"},
{GST_DEINTERLACE2_WEAVE_TFF, "Progressive: Top Field First", "weavetff"},
{GST_DEINTERLACE2_WEAVE_BFF, "Progressive: Bottom Field First", "weavebff"},
{GST_DEINTERLACE_GREEDY_L, "Motion Adaptive: Simple Detection", "greedyl"},
{GST_DEINTERLACE_VFIR, "Blur Vertical", "vfir"},
{GST_DEINTERLACE_LINEAR, "Television: Full resolution", "linear"},
{GST_DEINTERLACE_LINEAR_BLEND, "Blur: Temporal", "linearblend"},
{GST_DEINTERLACE_SCALER_BOB, "Double lines", "scalerbob"},
{GST_DEINTERLACE_WEAVE, "Weave", "weave"},
{GST_DEINTERLACE_WEAVE_TFF, "Progressive: Top Field First", "weavetff"},
{GST_DEINTERLACE_WEAVE_BFF, "Progressive: Bottom Field First", "weavebff"},
{0, NULL, NULL},
};
if (!deinterlace2_methods_type) {
deinterlace2_methods_type =
g_enum_register_static ("GstDeinterlace2Methods", methods_types);
if (!deinterlace_methods_type) {
deinterlace_methods_type =
g_enum_register_static ("GstDeinterlaceMethods", methods_types);
}
return deinterlace2_methods_type;
return deinterlace_methods_type;
}
#define GST_TYPE_DEINTERLACE2_FIELDS (gst_deinterlace2_fields_get_type ())
#define GST_TYPE_DEINTERLACE_FIELDS (gst_deinterlace_fields_get_type ())
static GType
gst_deinterlace2_fields_get_type (void)
gst_deinterlace_fields_get_type (void)
{
static GType deinterlace2_fields_type = 0;
static GType deinterlace_fields_type = 0;
static const GEnumValue fields_types[] = {
{GST_DEINTERLACE2_ALL, "All fields", "all"},
{GST_DEINTERLACE2_TF, "Top fields only", "top"},
{GST_DEINTERLACE2_BF, "Bottom fields only", "bottom"},
{GST_DEINTERLACE_ALL, "All fields", "all"},
{GST_DEINTERLACE_TF, "Top fields only", "top"},
{GST_DEINTERLACE_BF, "Bottom fields only", "bottom"},
{0, NULL, NULL},
};
if (!deinterlace2_fields_type) {
deinterlace2_fields_type =
g_enum_register_static ("GstDeinterlace2Fields", fields_types);
if (!deinterlace_fields_type) {
deinterlace_fields_type =
g_enum_register_static ("GstDeinterlaceFields", fields_types);
}
return deinterlace2_fields_type;
return deinterlace_fields_type;
}
#define GST_TYPE_DEINTERLACE2_FIELD_LAYOUT (gst_deinterlace2_field_layout_get_type ())
#define GST_TYPE_DEINTERLACE_FIELD_LAYOUT (gst_deinterlace_field_layout_get_type ())
static GType
gst_deinterlace2_field_layout_get_type (void)
gst_deinterlace_field_layout_get_type (void)
{
static GType deinterlace2_field_layout_type = 0;
static GType deinterlace_field_layout_type = 0;
static const GEnumValue field_layout_types[] = {
{GST_DEINTERLACE2_LAYOUT_AUTO, "Auto detection", "auto"},
{GST_DEINTERLACE2_LAYOUT_TFF, "Top field first", "tff"},
{GST_DEINTERLACE2_LAYOUT_BFF, "Bottom field first", "bff"},
{GST_DEINTERLACE_LAYOUT_AUTO, "Auto detection", "auto"},
{GST_DEINTERLACE_LAYOUT_TFF, "Top field first", "tff"},
{GST_DEINTERLACE_LAYOUT_BFF, "Bottom field first", "bff"},
{0, NULL, NULL},
};
if (!deinterlace2_field_layout_type) {
deinterlace2_field_layout_type =
g_enum_register_static ("GstDeinterlace2FieldLayout",
if (!deinterlace_field_layout_type) {
deinterlace_field_layout_type =
g_enum_register_static ("GstDeinterlaceFieldLayout",
field_layout_types);
}
return deinterlace2_field_layout_type;
return deinterlace_field_layout_type;
}
#define GST_TYPE_DEINTERLACE2_MODES (gst_deinterlace2_modes_get_type ())
#define GST_TYPE_DEINTERLACE_MODES (gst_deinterlace_modes_get_type ())
static GType
gst_deinterlace2_modes_get_type (void)
gst_deinterlace_modes_get_type (void)
{
static GType deinterlace2_modes_type = 0;
static GType deinterlace_modes_type = 0;
static const GEnumValue modes_types[] = {
{GST_DEINTERLACE2_MODE_AUTO, "Auto detection", "auto"},
{GST_DEINTERLACE2_MODE_INTERLACED, "Enfore deinterlacing", "interlaced"},
{GST_DEINTERLACE2_MODE_DISABLED, "Run in passthrough mode", "disabled"},
{GST_DEINTERLACE_MODE_AUTO, "Auto detection", "auto"},
{GST_DEINTERLACE_MODE_INTERLACED, "Enfore deinterlacing", "interlaced"},
{GST_DEINTERLACE_MODE_DISABLED, "Run in passthrough mode", "disabled"},
{0, NULL, NULL},
};
if (!deinterlace2_modes_type) {
deinterlace2_modes_type =
g_enum_register_static ("GstDeinterlace2Modes", modes_types);
if (!deinterlace_modes_type) {
deinterlace_modes_type =
g_enum_register_static ("GstDeinterlaceModes", modes_types);
}
return deinterlace2_modes_type;
return deinterlace_modes_type;
}
static GstStaticPadTemplate src_templ = GST_STATIC_PAD_TEMPLATE ("src",
......@@ -375,33 +375,33 @@ static GstStaticPadTemplate sink_templ = GST_STATIC_PAD_TEMPLATE ("sink",
GST_VIDEO_CAPS_YUV ("YVYU"))
);
static void gst_deinterlace2_finalize (GObject * self);
static void gst_deinterlace2_set_property (GObject * self, guint prop_id,
static void gst_deinterlace_finalize (GObject * self);
static void gst_deinterlace_set_property (GObject * self, guint prop_id,
const GValue * value, GParamSpec * pspec);
static void gst_deinterlace2_get_property (GObject * self, guint prop_id,
static void gst_deinterlace_get_property (GObject * self, guint prop_id,
GValue * value, GParamSpec * pspec);
static GstCaps *gst_deinterlace2_getcaps (GstPad * pad);
static gboolean gst_deinterlace2_setcaps (GstPad * pad, GstCaps * caps);
static gboolean gst_deinterlace2_sink_event (GstPad * pad, GstEvent * event);
static GstFlowReturn gst_deinterlace2_chain (GstPad * pad, GstBuffer * buffer);
static GstStateChangeReturn gst_deinterlace2_change_state (GstElement * element,
static GstCaps *gst_deinterlace_getcaps (GstPad * pad);
static gboolean gst_deinterlace_setcaps (GstPad * pad, GstCaps * caps);
static gboolean gst_deinterlace_sink_event (GstPad * pad, GstEvent * event);
static GstFlowReturn gst_deinterlace_chain (GstPad * pad, GstBuffer * buffer);
static GstStateChangeReturn gst_deinterlace_change_state (GstElement * element,
GstStateChange transition);
static gboolean gst_deinterlace2_src_event (GstPad * pad, GstEvent * event);
static gboolean gst_deinterlace2_src_query (GstPad * pad, GstQuery * query);
static const GstQueryType *gst_deinterlace2_src_query_types (GstPad * pad);
static gboolean gst_deinterlace_src_event (GstPad * pad, GstEvent * event);
static gboolean gst_deinterlace_src_query (GstPad * pad, GstQuery * query);
static const GstQueryType *gst_deinterlace_src_query_types (GstPad * pad);
static void gst_deinterlace2_reset (GstDeinterlace2 * self);
static void gst_deinterlace_reset (GstDeinterlace * self);
static void gst_deinterlace2_child_proxy_interface_init (gpointer g_iface,
static void gst_deinterlace_child_proxy_interface_init (gpointer g_iface,
gpointer iface_data);
static void
_do_init (GType object_type)
{
const GInterfaceInfo child_proxy_interface_info = {
(GInterfaceInitFunc) gst_deinterlace2_child_proxy_interface_init,
(GInterfaceInitFunc) gst_deinterlace_child_proxy_interface_init,
NULL, /* interface_finalize */
NULL /* interface_data */
};
......@@ -410,12 +410,11 @@ _do_init (GType object_type)
&child_proxy_interface_info);
}
GST_BOILERPLATE_FULL (GstDeinterlace2, gst_deinterlace2, GstElement,
GST_BOILERPLATE_FULL (GstDeinterlace, gst_deinterlace, GstElement,
GST_TYPE_ELEMENT, _do_init);
static void
gst_deinterlace2_set_method (GstDeinterlace2 * self,
GstDeinterlace2Methods method)
gst_deinterlace_set_method (GstDeinterlace * self, GstDeinterlaceMethods method)
{
if (self->method) {
......@@ -426,34 +425,34 @@ gst_deinterlace2_set_method (GstDeinterlace2 * self,
}
switch (method) {
case GST_DEINTERLACE2_TOMSMOCOMP:
case GST_DEINTERLACE_TOMSMOCOMP:
self->method = g_object_new (GST_TYPE_DEINTERLACE_TOMSMOCOMP, NULL);
break;
case GST_DEINTERLACE2_GREEDY_H:
case GST_DEINTERLACE_GREEDY_H:
self->method = g_object_new (GST_TYPE_DEINTERLACE_GREEDY_H, NULL);
break;
case GST_DEINTERLACE2_GREEDY_L:
case GST_DEINTERLACE_GREEDY_L:
self->method = g_object_new (GST_TYPE_DEINTERLACE_GREEDY_L, NULL);
break;
case GST_DEINTERLACE2_VFIR:
case GST_DEINTERLACE_VFIR:
self->method = g_object_new (GST_TYPE_DEINTERLACE_VFIR, NULL);
break;
case GST_DEINTERLACE2_LINEAR:
case GST_DEINTERLACE_LINEAR:
self->method = g_object_new (GST_TYPE_DEINTERLACE_LINEAR, NULL);
break;
case GST_DEINTERLACE2_LINEAR_BLEND:
case GST_DEINTERLACE_LINEAR_BLEND:
self->method = g_object_new (GST_TYPE_DEINTERLACE_LINEAR_BLEND, NULL);
break;
case GST_DEINTERLACE2_SCALER_BOB:
case GST_DEINTERLACE_SCALER_BOB:
self->method = g_object_new (GST_TYPE_DEINTERLACE_SCALER_BOB, NULL);
break;
case GST_DEINTERLACE2_WEAVE:
case GST_DEINTERLACE_WEAVE:
self->method = g_object_new (GST_TYPE_DEINTERLACE_WEAVE, NULL);
break;
case GST_DEINTERLACE2_WEAVE_TFF:
case GST_DEINTERLACE_WEAVE_TFF:
self->method = g_object_new (GST_TYPE_DEINTERLACE_WEAVE_TFF, NULL);
break;
case GST_DEINTERLACE2_WEAVE_BFF:
case GST_DEINTERLACE_WEAVE_BFF:
self->method = g_object_new (GST_TYPE_DEINTERLACE_WEAVE_BFF, NULL);
break;
default:
......@@ -469,7 +468,7 @@ gst_deinterlace2_set_method (GstDeinterlace2 * self,
}
static void
gst_deinterlace2_base_init (gpointer klass)
gst_deinterlace_base_init (gpointer klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
......@@ -487,18 +486,18 @@ gst_deinterlace2_base_init (gpointer klass)
}
static void
gst_deinterlace2_class_init (GstDeinterlace2Class * klass)
gst_deinterlace_class_init (GstDeinterlaceClass * klass)
{
GObjectClass *gobject_class = (GObjectClass *) klass;
GstElementClass *element_class = (GstElementClass *) klass;
gobject_class->set_property = gst_deinterlace2_set_property;
gobject_class->get_property = gst_deinterlace2_get_property;
gobject_class->finalize = gst_deinterlace2_finalize;
gobject_class->set_property = gst_deinterlace_set_property;
gobject_class->get_property = gst_deinterlace_get_property;
gobject_class->finalize = gst_deinterlace_finalize;
/**
* GstDeinterlace2:mode
* GstDeinterlace:mode
*
* This selects whether the deinterlacing methods should
* always be applied or if they should only be applied
......@@ -509,12 +508,12 @@ gst_deinterlace2_class_init (GstDeinterlace2Class * klass)
g_param_spec_enum ("mode",
"Mode",
"Deinterlace Mode",
GST_TYPE_DEINTERLACE2_MODES,
GST_TYPE_DEINTERLACE_MODES,
DEFAULT_MODE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
);
/**
* GstDeinterlace2:method
* GstDeinterlace:method
*
* Selects the different deinterlacing algorithms that can be used.
* These provide different quality and CPU usage.
......@@ -590,12 +589,12 @@ gst_deinterlace2_class_init (GstDeinterlace2Class * klass)
g_param_spec_enum ("method",
"Method",
"Deinterlace Method",
GST_TYPE_DEINTERLACE2_METHODS,
GST_TYPE_DEINTERLACE_METHODS,
DEFAULT_METHOD, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
);
/**
* GstDeinterlace2:fields
* GstDeinterlace:fields
*
* This selects which fields should be output. If "all" is selected
* the output framerate will be double.
......@@ -605,12 +604,12 @@ gst_deinterlace2_class_init (GstDeinterlace2Class * klass)
g_param_spec_enum ("fields",
"fields",
"Fields to use for deinterlacing",
GST_TYPE_DEINTERLACE2_FIELDS,
GST_TYPE_DEINTERLACE_FIELDS,
DEFAULT_FIELDS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
);
/**
* GstDeinterlace2:layout
* GstDeinterlace:layout
*
* This selects which fields is the first in time.
*
......@@ -619,19 +618,19 @@ gst_deinterlace2_class_init (GstDeinterlace2Class * klass)
g_param_spec_enum ("tff",
"tff",
"Deinterlace top field first",
GST_TYPE_DEINTERLACE2_FIELD_LAYOUT,
GST_TYPE_DEINTERLACE_FIELD_LAYOUT,
DEFAULT_FIELD_LAYOUT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
);
element_class->change_state =
GST_DEBUG_FUNCPTR (gst_deinterlace2_change_state);
GST_DEBUG_FUNCPTR (gst_deinterlace_change_state);
}
static GstObject *
gst_deinterlace2_child_proxy_get_child_by_index (GstChildProxy * child_proxy,
gst_deinterlace_child_proxy_get_child_by_index (GstChildProxy * child_proxy,
guint index)
{
GstDeinterlace2 *self = GST_DEINTERLACE2 (child_proxy);
GstDeinterlace *self = GST_DEINTERLACE (child_proxy);
g_return_val_if_fail (index == 0, NULL);
......@@ -639,60 +638,60 @@ gst_deinterlace2_child_proxy_get_child_by_index (GstChildProxy * child_proxy,
}
static guint
gst_deinterlace2_child_proxy_get_children_count (GstChildProxy * child_proxy)
gst_deinterlace_child_proxy_get_children_count (GstChildProxy * child_proxy)
{
return 1;
}
static void
gst_deinterlace2_child_proxy_interface_init (gpointer g_iface,
gst_deinterlace_child_proxy_interface_init (gpointer g_iface,
gpointer iface_data)
{
GstChildProxyInterface *iface = g_iface;
iface->get_child_by_index = gst_deinterlace2_child_proxy_get_child_by_index;
iface->get_children_count = gst_deinterlace2_child_proxy_get_children_count;
iface->get_child_by_index = gst_deinterlace_child_proxy_get_child_by_index;
iface->get_children_count = gst_deinterlace_child_proxy_get_children_count;
}
static void
gst_deinterlace2_init (GstDeinterlace2 * self, GstDeinterlace2Class * klass)
gst_deinterlace_init (GstDeinterlace * self, GstDeinterlaceClass * klass)
{
self->sinkpad = gst_pad_new_from_static_template (&sink_templ, "sink");
gst_pad_set_chain_function (self->sinkpad,
GST_DEBUG_FUNCPTR (gst_deinterlace2_chain));
GST_DEBUG_FUNCPTR (gst_deinterlace_chain));
gst_pad_set_event_function (self->sinkpad,
GST_DEBUG_FUNCPTR (gst_deinterlace2_sink_event));
GST_DEBUG_FUNCPTR (gst_deinterlace_sink_event));
gst_pad_set_setcaps_function (self->sinkpad,
GST_DEBUG_FUNCPTR (gst_deinterlace2_setcaps));
GST_DEBUG_FUNCPTR (gst_deinterlace_setcaps));
gst_pad_set_getcaps_function (self->sinkpad,
GST_DEBUG_FUNCPTR (gst_deinterlace2_getcaps));
GST_DEBUG_FUNCPTR (gst_deinterlace_getcaps));
gst_element_add_pad (GST_ELEMENT (self), self->sinkpad);
self->srcpad = gst_pad_new_from_static_template (&src_templ, "src");
gst_pad_set_event_function (self->srcpad,
GST_DEBUG_FUNCPTR (gst_deinterlace2_src_event));
GST_DEBUG_FUNCPTR (gst_deinterlace_src_event));
gst_pad_set_query_type_function (self->srcpad,
GST_DEBUG_FUNCPTR (gst_deinterlace2_src_query_types));
GST_DEBUG_FUNCPTR (gst_deinterlace_src_query_types));
gst_pad_set_query_function (self->srcpad,
GST_DEBUG_FUNCPTR (gst_deinterlace2_src_query));
GST_DEBUG_FUNCPTR (gst_deinterlace_src_query));
gst_pad_set_setcaps_function (self->srcpad,
GST_DEBUG_FUNCPTR (gst_deinterlace2_setcaps));
GST_DEBUG_FUNCPTR (gst_deinterlace_setcaps));
gst_pad_set_getcaps_function (self->srcpad,
GST_DEBUG_FUNCPTR (gst_deinterlace2_getcaps));
GST_DEBUG_FUNCPTR (gst_deinterlace_getcaps));
gst_element_add_pad (GST_ELEMENT (self), self->srcpad);
gst_element_no_more_pads (GST_ELEMENT (self));
self->mode = DEFAULT_MODE;
gst_deinterlace2_set_method (self, DEFAULT_METHOD);
gst_deinterlace_set_method (self, DEFAULT_METHOD);
self->fields = DEFAULT_FIELDS;
self->field_layout = DEFAULT_FIELD_LAYOUT;
gst_deinterlace2_reset (self);
gst_deinterlace_reset (self);
}
static void
gst_deinterlace2_reset_history (GstDeinterlace2 * self)
gst_deinterlace_reset_history (GstDeinterlace * self)
{
gint i;
......@@ -707,7 +706,7 @@ gst_deinterlace2_reset_history (GstDeinterlace2 * self)
}
static void
gst_deinterlace2_reset (GstDeinterlace2 * self)
gst_deinterlace_reset (GstDeinterlace * self)
{
self->row_stride = 0;
self->frame_width = 0;
......@@ -717,17 +716,17 @@ gst_deinterlace2_reset (GstDeinterlace2 * self)