Commit db0a2f51 authored by Wim Taymans's avatar Wim Taymans
Browse files

videoconvert: renamed from colorspace

parent b94f9793
...@@ -426,7 +426,7 @@ AG_GST_CHECK_PLUGIN(audiorate) ...@@ -426,7 +426,7 @@ AG_GST_CHECK_PLUGIN(audiorate)
AG_GST_CHECK_PLUGIN(audiotestsrc) AG_GST_CHECK_PLUGIN(audiotestsrc)
AG_GST_CHECK_PLUGIN(encoding) AG_GST_CHECK_PLUGIN(encoding)
AG_GST_CHECK_PLUGIN(ffmpegcolorspace) AG_GST_CHECK_PLUGIN(ffmpegcolorspace)
AG_GST_CHECK_PLUGIN(colorspace) AG_GST_CHECK_PLUGIN(videoconvert)
AG_GST_CHECK_PLUGIN(gdp) AG_GST_CHECK_PLUGIN(gdp)
AG_GST_CHECK_PLUGIN(playback) AG_GST_CHECK_PLUGIN(playback)
AG_GST_CHECK_PLUGIN(audioresample) AG_GST_CHECK_PLUGIN(audioresample)
...@@ -863,7 +863,7 @@ gst/audioconvert/Makefile ...@@ -863,7 +863,7 @@ gst/audioconvert/Makefile
gst/audiorate/Makefile gst/audiorate/Makefile
gst/audiotestsrc/Makefile gst/audiotestsrc/Makefile
gst/encoding/Makefile gst/encoding/Makefile
gst/colorspace/Makefile gst/videoconvert/Makefile
gst/ffmpegcolorspace/Makefile gst/ffmpegcolorspace/Makefile
gst/gdp/Makefile gst/gdp/Makefile
gst/playback/Makefile gst/playback/Makefile
......
plugin_LTLIBRARIES = libgstcolorspace.la plugin_LTLIBRARIES = libgstvideoconvert.la
ORC_SOURCE=gstcolorspaceorc ORC_SOURCE=gstvideoconvertorc
include $(top_srcdir)/common/orc.mak include $(top_srcdir)/common/orc.mak
libgstcolorspace_la_SOURCES = gstcolorspace.c colorspace.c libgstvideoconvert_la_SOURCES = gstvideoconvert.c videoconvert.c
nodist_libgstcolorspace_la_SOURCES = $(ORC_NODIST_SOURCES) nodist_libgstvideoconvert_la_SOURCES = $(ORC_NODIST_SOURCES)
libgstcolorspace_la_CFLAGS = \ libgstvideoconvert_la_CFLAGS = \
$(GST_PLUGINS_BASE_CFLAGS) \ $(GST_PLUGINS_BASE_CFLAGS) \
$(GST_CFLAGS) \ $(GST_CFLAGS) \
$(ORC_CFLAGS) $(ORC_CFLAGS)
libgstcolorspace_la_LIBADD = \ libgstvideoconvert_la_LIBADD = \
$(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) \ $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) \
$(GST_BASE_LIBS) \ $(GST_BASE_LIBS) \
$(GST_LIBS) \ $(GST_LIBS) \
$(ORC_LIBS) $(ORC_LIBS)
libgstcolorspace_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstvideoconvert_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstcolorspace_la_LIBTOOLFLAGS = --tag=disable-static libgstvideoconvert_la_LIBTOOLFLAGS = --tag=disable-static
noinst_HEADERS = gstcolorspace.h colorspace.h noinst_HEADERS = gstvideoconvert.h videoconvert.h
Android.mk: Makefile.am $(BUILT_SOURCES) Android.mk: Makefile.am $(BUILT_SOURCES)
androgenizer \ androgenizer \
-:PROJECT libgstcolorspace -:SHARED libgstcolorspace \ -:PROJECT libgstvideoconvert -:SHARED libgstvideoconvert \
-:TAGS eng debug \ -:TAGS eng debug \
-:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-:SOURCES $(libgstcolorspace_la_SOURCES) \ -:SOURCES $(libgstvideoconvert_la_SOURCES) \
$(nodist_libgstcolorspace_la_SOURCES) \ $(nodist_libgstvideoconvert_la_SOURCES) \
-:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstcolorspace_la_CFLAGS) \ -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideoconvert_la_CFLAGS) \
-:LDFLAGS $(libgstcolorspace_la_LDFLAGS) \ -:LDFLAGS $(libgstvideoconvert_la_LDFLAGS) \
$(libgstcolorspace_la_LIBADD) \ $(libgstvideoconvert_la_LIBADD) \
-ldl \ -ldl \
-:PASSTHROUGH LOCAL_ARM_MODE:=arm \ -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
......
...@@ -21,14 +21,14 @@ ...@@ -21,14 +21,14 @@
*/ */
/** /**
* SECTION:element-colorspace * SECTION:element-videoconvert
* *
* Convert video frames between a great variety of colorspace formats. * Convert video frames between a great variety of videoconvert formats.
* *
* <refsect2> * <refsect2>
* <title>Example launch line</title> * <title>Example launch line</title>
* |[ * |[
* gst-launch -v videotestsrc ! video/x-raw-yuv,format=\(fourcc\)YUY2 ! colorspace ! ximagesink * gst-launch -v videotestsrc ! video/x-raw-yuv,format=\(fourcc\)YUY2 ! videoconvert ! ximagesink
* ]| * ]|
* </refsect2> * </refsect2>
*/ */
...@@ -37,14 +37,14 @@ ...@@ -37,14 +37,14 @@
# include "config.h" # include "config.h"
#endif #endif
#include "gstcolorspace.h" #include "gstvideoconvert.h"
#include <gst/video/video.h> #include <gst/video/video.h>
#include <string.h> #include <string.h>
GST_DEBUG_CATEGORY (colorspace_debug); GST_DEBUG_CATEGORY (videoconvert_debug);
#define GST_CAT_DEFAULT colorspace_debug #define GST_CAT_DEFAULT videoconvert_debug
GST_DEBUG_CATEGORY (colorspace_performance); GST_DEBUG_CATEGORY (videoconvert_performance);
enum enum
{ {
...@@ -77,32 +77,32 @@ enum ...@@ -77,32 +77,32 @@ enum
GST_VIDEO_CAPS_r210";" \ GST_VIDEO_CAPS_r210";" \
GST_VIDEO_CAPS_ARGB_64 GST_VIDEO_CAPS_ARGB_64
static GstStaticPadTemplate gst_csp_src_template = static GstStaticPadTemplate gst_video_convert_src_template =
GST_STATIC_PAD_TEMPLATE ("src", GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC, GST_PAD_SRC,
GST_PAD_ALWAYS, GST_PAD_ALWAYS,
GST_STATIC_CAPS (CSP_VIDEO_CAPS) GST_STATIC_CAPS (CSP_VIDEO_CAPS)
); );
static GstStaticPadTemplate gst_csp_sink_template = static GstStaticPadTemplate gst_video_convert_sink_template =
GST_STATIC_PAD_TEMPLATE ("sink", GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK, GST_PAD_SINK,
GST_PAD_ALWAYS, GST_PAD_ALWAYS,
GST_STATIC_CAPS (CSP_VIDEO_CAPS) GST_STATIC_CAPS (CSP_VIDEO_CAPS)
); );
GType gst_csp_get_type (void); GType gst_video_convert_get_type (void);
static void gst_csp_set_property (GObject * object, static void gst_video_convert_set_property (GObject * object,
guint property_id, const GValue * value, GParamSpec * pspec); guint property_id, const GValue * value, GParamSpec * pspec);
static void gst_csp_get_property (GObject * object, static void gst_video_convert_get_property (GObject * object,
guint property_id, GValue * value, GParamSpec * pspec); guint property_id, GValue * value, GParamSpec * pspec);
static gboolean gst_csp_set_caps (GstBaseTransform * btrans, static gboolean gst_video_convert_set_caps (GstBaseTransform * btrans,
GstCaps * incaps, GstCaps * outcaps); GstCaps * incaps, GstCaps * outcaps);
static gboolean gst_csp_get_unit_size (GstBaseTransform * btrans, static gboolean gst_video_convert_get_unit_size (GstBaseTransform * btrans,
GstCaps * caps, gsize * size); GstCaps * caps, gsize * size);
static GstFlowReturn gst_csp_transform (GstBaseTransform * btrans, static GstFlowReturn gst_video_convert_transform (GstBaseTransform * btrans,
GstBuffer * inbuf, GstBuffer * outbuf); GstBuffer * inbuf, GstBuffer * outbuf);
static GQuark _QRAWRGB; /* "video/x-raw-rgb" */ static GQuark _QRAWRGB; /* "video/x-raw-rgb" */
...@@ -130,7 +130,7 @@ dither_method_get_type (void) ...@@ -130,7 +130,7 @@ dither_method_get_type (void)
/* copies the given caps */ /* copies the given caps */
static GstCaps * static GstCaps *
gst_csp_caps_remove_format_info (GstCaps * caps) gst_video_convert_caps_remove_format_info (GstCaps * caps)
{ {
GstStructure *yuvst, *rgbst, *grayst; GstStructure *yuvst, *rgbst, *grayst;
gint i, n; gint i, n;
...@@ -172,18 +172,18 @@ gst_csp_caps_remove_format_info (GstCaps * caps) ...@@ -172,18 +172,18 @@ gst_csp_caps_remove_format_info (GstCaps * caps)
* However, we should prefer passthrough, so if passthrough is possible, * However, we should prefer passthrough, so if passthrough is possible,
* put it first in the list. */ * put it first in the list. */
static GstCaps * static GstCaps *
gst_csp_transform_caps (GstBaseTransform * btrans, gst_video_convert_transform_caps (GstBaseTransform * btrans,
GstPadDirection direction, GstCaps * caps, GstCaps * filter) GstPadDirection direction, GstCaps * caps, GstCaps * filter)
{ {
GstCaps *template; GstCaps *template;
GstCaps *tmp, *tmp2; GstCaps *tmp, *tmp2;
GstCaps *result; GstCaps *result;
template = gst_static_pad_template_get_caps (&gst_csp_src_template); template = gst_static_pad_template_get_caps (&gst_video_convert_src_template);
result = gst_caps_copy (caps); result = gst_caps_copy (caps);
/* Get all possible caps that we can transform to */ /* Get all possible caps that we can transform to */
tmp = gst_csp_caps_remove_format_info (caps); tmp = gst_video_convert_caps_remove_format_info (caps);
if (filter) { if (filter) {
tmp2 = gst_caps_intersect_full (filter, tmp, GST_CAPS_INTERSECT_FIRST); tmp2 = gst_caps_intersect_full (filter, tmp, GST_CAPS_INTERSECT_FIRST);
...@@ -200,10 +200,10 @@ gst_csp_transform_caps (GstBaseTransform * btrans, ...@@ -200,10 +200,10 @@ gst_csp_transform_caps (GstBaseTransform * btrans,
} }
static gboolean static gboolean
gst_csp_set_caps (GstBaseTransform * btrans, GstCaps * incaps, gst_video_convert_set_caps (GstBaseTransform * btrans, GstCaps * incaps,
GstCaps * outcaps) GstCaps * outcaps)
{ {
GstCsp *space; GstVideoConvert *space;
GstVideoFormat in_format; GstVideoFormat in_format;
GstVideoFormat out_format; GstVideoFormat out_format;
gint in_height, in_width; gint in_height, in_width;
...@@ -216,10 +216,10 @@ gst_csp_set_caps (GstBaseTransform * btrans, GstCaps * incaps, ...@@ -216,10 +216,10 @@ gst_csp_set_caps (GstBaseTransform * btrans, GstCaps * incaps,
gboolean ret; gboolean ret;
ColorSpaceColorSpec in_spec, out_spec; ColorSpaceColorSpec in_spec, out_spec;
space = GST_CSP (btrans); space = GST_VIDEO_CONVERT_CAST (btrans);
if (space->convert) { if (space->convert) {
colorspace_convert_free (space->convert); videoconvert_convert_free (space->convert);
} }
/* input caps */ /* input caps */
...@@ -303,10 +303,10 @@ gst_csp_set_caps (GstBaseTransform * btrans, GstCaps * incaps, ...@@ -303,10 +303,10 @@ gst_csp_set_caps (GstBaseTransform * btrans, GstCaps * incaps,
space->height = in_height; space->height = in_height;
space->interlaced = in_interlaced; space->interlaced = in_interlaced;
space->convert = colorspace_convert_new (out_format, out_spec, in_format, space->convert = videoconvert_convert_new (out_format, out_spec, in_format,
in_spec, in_width, in_height); in_spec, in_width, in_height);
if (space->convert) { if (space->convert) {
colorspace_convert_set_interlaced (space->convert, in_interlaced); videoconvert_convert_set_interlaced (space->convert, in_interlaced);
} }
/* palette, only for from data */ /* palette, only for from data */
if (space->from_format == GST_VIDEO_FORMAT_RGB8_PALETTED && if (space->from_format == GST_VIDEO_FORMAT_RGB8_PALETTED &&
...@@ -325,7 +325,7 @@ gst_csp_set_caps (GstBaseTransform * btrans, GstCaps * incaps, ...@@ -325,7 +325,7 @@ gst_csp_set_caps (GstBaseTransform * btrans, GstCaps * incaps,
} }
data = gst_buffer_map (palette, NULL, NULL, GST_MAP_READ); data = gst_buffer_map (palette, NULL, NULL, GST_MAP_READ);
colorspace_convert_set_palette (space->convert, data); videoconvert_convert_set_palette (space->convert, data);
gst_buffer_unmap (palette, data, -1); gst_buffer_unmap (palette, data, -1);
gst_buffer_unref (palette); gst_buffer_unref (palette);
...@@ -333,7 +333,7 @@ gst_csp_set_caps (GstBaseTransform * btrans, GstCaps * incaps, ...@@ -333,7 +333,7 @@ gst_csp_set_caps (GstBaseTransform * btrans, GstCaps * incaps,
const guint32 *palette; const guint32 *palette;
GstBuffer *p_buf; GstBuffer *p_buf;
palette = colorspace_convert_get_palette (space->convert); palette = videoconvert_convert_get_palette (space->convert);
p_buf = gst_buffer_new_and_alloc (256 * 4); p_buf = gst_buffer_new_and_alloc (256 * 4);
gst_buffer_fill (p_buf, 0, palette, 256 * 4); gst_buffer_fill (p_buf, 0, palette, 256 * 4);
...@@ -376,37 +376,37 @@ invalid_palette: ...@@ -376,37 +376,37 @@ invalid_palette:
} }
} }
#define gst_csp_parent_class parent_class #define gst_video_convert_parent_class parent_class
G_DEFINE_TYPE (GstCsp, gst_csp, GST_TYPE_VIDEO_FILTER); G_DEFINE_TYPE (GstVideoConvert, gst_video_convert, GST_TYPE_VIDEO_FILTER);
static void static void
gst_csp_finalize (GObject * obj) gst_video_convert_finalize (GObject * obj)
{ {
GstCsp *space = GST_CSP (obj); GstVideoConvert *space = GST_VIDEO_CONVERT (obj);
if (space->convert) { if (space->convert) {
colorspace_convert_free (space->convert); videoconvert_convert_free (space->convert);
} }
G_OBJECT_CLASS (parent_class)->finalize (obj); G_OBJECT_CLASS (parent_class)->finalize (obj);
} }
static void static void
gst_csp_class_init (GstCspClass * klass) gst_video_convert_class_init (GstVideoConvertClass * klass)
{ {
GObjectClass *gobject_class = (GObjectClass *) klass; GObjectClass *gobject_class = (GObjectClass *) klass;
GstElementClass *gstelement_class = (GstElementClass *) klass; GstElementClass *gstelement_class = (GstElementClass *) klass;
GstBaseTransformClass *gstbasetransform_class = GstBaseTransformClass *gstbasetransform_class =
(GstBaseTransformClass *) klass; (GstBaseTransformClass *) klass;
gobject_class->set_property = gst_csp_set_property; gobject_class->set_property = gst_video_convert_set_property;
gobject_class->get_property = gst_csp_get_property; gobject_class->get_property = gst_video_convert_get_property;
gobject_class->finalize = gst_csp_finalize; gobject_class->finalize = gst_video_convert_finalize;
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_csp_src_template)); gst_static_pad_template_get (&gst_video_convert_src_template));
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_csp_sink_template)); gst_static_pad_template_get (&gst_video_convert_sink_template));
gst_element_class_set_details_simple (gstelement_class, gst_element_class_set_details_simple (gstelement_class,
" Colorspace converter", "Filter/Converter/Video", " Colorspace converter", "Filter/Converter/Video",
...@@ -418,11 +418,13 @@ gst_csp_class_init (GstCspClass * klass) ...@@ -418,11 +418,13 @@ gst_csp_class_init (GstCspClass * klass)
_QALPHAMASK = g_quark_from_string ("alpha_mask"); _QALPHAMASK = g_quark_from_string ("alpha_mask");
gstbasetransform_class->transform_caps = gstbasetransform_class->transform_caps =
GST_DEBUG_FUNCPTR (gst_csp_transform_caps); GST_DEBUG_FUNCPTR (gst_video_convert_transform_caps);
gstbasetransform_class->set_caps = GST_DEBUG_FUNCPTR (gst_csp_set_caps); gstbasetransform_class->set_caps =
GST_DEBUG_FUNCPTR (gst_video_convert_set_caps);
gstbasetransform_class->get_unit_size = gstbasetransform_class->get_unit_size =
GST_DEBUG_FUNCPTR (gst_csp_get_unit_size); GST_DEBUG_FUNCPTR (gst_video_convert_get_unit_size);
gstbasetransform_class->transform = GST_DEBUG_FUNCPTR (gst_csp_transform); gstbasetransform_class->transform =
GST_DEBUG_FUNCPTR (gst_video_convert_transform);
gstbasetransform_class->passthrough_on_same_caps = TRUE; gstbasetransform_class->passthrough_on_same_caps = TRUE;
...@@ -433,20 +435,19 @@ gst_csp_class_init (GstCspClass * klass) ...@@ -433,20 +435,19 @@ gst_csp_class_init (GstCspClass * klass)
} }
static void static void
gst_csp_init (GstCsp * space) gst_video_convert_init (GstVideoConvert * space)
{ {
space->from_format = GST_VIDEO_FORMAT_UNKNOWN; space->from_format = GST_VIDEO_FORMAT_UNKNOWN;
space->to_format = GST_VIDEO_FORMAT_UNKNOWN; space->to_format = GST_VIDEO_FORMAT_UNKNOWN;
} }
void void
gst_csp_set_property (GObject * object, guint property_id, gst_video_convert_set_property (GObject * object, guint property_id,
const GValue * value, GParamSpec * pspec) const GValue * value, GParamSpec * pspec)
{ {
GstCsp *csp; GstVideoConvert *csp;
g_return_if_fail (GST_IS_CSP (object)); csp = GST_VIDEO_CONVERT (object);
csp = GST_CSP (object);
switch (property_id) { switch (property_id) {
case PROP_DITHER: case PROP_DITHER:
...@@ -459,13 +460,12 @@ gst_csp_set_property (GObject * object, guint property_id, ...@@ -459,13 +460,12 @@ gst_csp_set_property (GObject * object, guint property_id,
} }
void void
gst_csp_get_property (GObject * object, guint property_id, gst_video_convert_get_property (GObject * object, guint property_id,
GValue * value, GParamSpec * pspec) GValue * value, GParamSpec * pspec)
{ {
GstCsp *csp; GstVideoConvert *csp;
g_return_if_fail (GST_IS_CSP (object)); csp = GST_VIDEO_CONVERT (object);
csp = GST_CSP (object);
switch (property_id) { switch (property_id) {
case PROP_DITHER: case PROP_DITHER:
...@@ -478,7 +478,8 @@ gst_csp_get_property (GObject * object, guint property_id, ...@@ -478,7 +478,8 @@ gst_csp_get_property (GObject * object, guint property_id,
} }
static gboolean static gboolean
gst_csp_get_unit_size (GstBaseTransform * btrans, GstCaps * caps, gsize * size) gst_video_convert_get_unit_size (GstBaseTransform * btrans, GstCaps * caps,
gsize * size)
{ {
gboolean ret = TRUE; gboolean ret = TRUE;
GstVideoFormat format; GstVideoFormat format;
...@@ -495,14 +496,14 @@ gst_csp_get_unit_size (GstBaseTransform * btrans, GstCaps * caps, gsize * size) ...@@ -495,14 +496,14 @@ gst_csp_get_unit_size (GstBaseTransform * btrans, GstCaps * caps, gsize * size)
} }
static GstFlowReturn static GstFlowReturn
gst_csp_transform (GstBaseTransform * btrans, GstBuffer * inbuf, gst_video_convert_transform (GstBaseTransform * btrans, GstBuffer * inbuf,
GstBuffer * outbuf) GstBuffer * outbuf)
{ {
GstCsp *space; GstVideoConvert *space;
guint8 *indata, *outdata; guint8 *indata, *outdata;
gsize insize, outsize; gsize insize, outsize;
space = GST_CSP (btrans); space = GST_VIDEO_CONVERT_CAST (btrans);
GST_DEBUG ("from %d -> to %d", space->from_format, space->to_format); GST_DEBUG ("from %d -> to %d", space->from_format, space->to_format);
...@@ -510,12 +511,12 @@ gst_csp_transform (GstBaseTransform * btrans, GstBuffer * inbuf, ...@@ -510,12 +511,12 @@ gst_csp_transform (GstBaseTransform * btrans, GstBuffer * inbuf,
space->to_format == GST_VIDEO_FORMAT_UNKNOWN)) space->to_format == GST_VIDEO_FORMAT_UNKNOWN))
goto unknown_format; goto unknown_format;
colorspace_convert_set_dither (space->convert, space->dither); videoconvert_convert_set_dither (space->convert, space->dither);
indata = gst_buffer_map (inbuf, &insize, NULL, GST_MAP_READ); indata = gst_buffer_map (inbuf, &insize, NULL, GST_MAP_READ);
outdata = gst_buffer_map (outbuf, &outsize, NULL, GST_MAP_WRITE); outdata = gst_buffer_map (outbuf, &outsize, NULL, GST_MAP_WRITE);
colorspace_convert_convert (space->convert, outdata, indata); videoconvert_convert_convert (space->convert, outdata, indata);
gst_buffer_unmap (outbuf, outdata, outsize); gst_buffer_unmap (outbuf, outdata, outsize);
gst_buffer_unmap (inbuf, indata, insize); gst_buffer_unmap (inbuf, indata, insize);
...@@ -545,14 +546,15 @@ not_supported: ...@@ -545,14 +546,15 @@ not_supported:
static gboolean static gboolean
plugin_init (GstPlugin * plugin) plugin_init (GstPlugin * plugin)
{ {
GST_DEBUG_CATEGORY_INIT (colorspace_debug, "colorspace", 0, GST_DEBUG_CATEGORY_INIT (videoconvert_debug, "videoconvert", 0,
"Colorspace Converter"); "Colorspace Converter");
GST_DEBUG_CATEGORY_GET (colorspace_performance, "GST_PERFORMANCE"); GST_DEBUG_CATEGORY_GET (videoconvert_performance, "GST_PERFORMANCE");
return gst_element_register (plugin, "colorspace", return gst_element_register (plugin, "videoconvert",
GST_RANK_NONE, GST_TYPE_CSP); GST_RANK_NONE, GST_TYPE_VIDEO_CONVERT);
} }
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
GST_VERSION_MINOR, GST_VERSION_MINOR,
"colorspace", "Colorspace conversion", plugin_init, VERSION, "LGPL", "", "") "videoconvert", "Colorspace conversion", plugin_init, VERSION, "LGPL", "",
"")
...@@ -19,31 +19,32 @@ ...@@ -19,31 +19,32 @@
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
#ifndef __GST_COLORSPACE_H__ #ifndef __GST_VIDEOCONVERT_H__
#define __GST_COLORSPACE_H__ #define __GST_VIDEOCONVERT_H__
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/video/video.h> #include <gst/video/video.h>
#include <gst/video/gstvideofilter.h> #include <gst/video/gstvideofilter.h>
#include "colorspace.h" #include "videoconvert.h"
G_BEGIN_DECLS G_BEGIN_DECLS
#define GST_TYPE_CSP (gst_csp_get_type()) #define GST_TYPE_VIDEO_CONVERT (gst_video_convert_get_type())
#define GST_CSP(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_CSP,GstCsp)) #define GST_VIDEO_CONVERT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VIDEO_CONVERT,GstVideoConvert))
#define GST_CSP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_CSP,GstCspClass)) #define GST_VIDEO_CONVERT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VIDEO_CONVERT,GstVideoConvertClass))
#define GST_IS_CSP(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CSP)) #define GST_IS_VIDEO_CONVERT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VIDEO_CONVERT))
#define GST_IS_CSP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CSP)) #define GST_IS_VIDEO_CONVERT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VIDEO_CONVERT))
#define GST_VIDEO_CONVERT_CAST(obj) ((GstVideoConvert *)(obj))
typedef struct _GstCsp GstCsp; typedef struct _GstVideoConvert GstVideoConvert;
typedef struct _GstCspClass GstCspClass; typedef struct _GstVideoConvertClass GstVideoConvertClass;
/** /**
* GstCsp: * GstVideoConvert:
* *
* Opaque object data structure. * Opaque object data structure.
*/ */
struct _GstCsp { struct _GstVideoConvert {
GstVideoFilter element; GstVideoFilter element;