alphacolor: Use GstVideoFilter as base class for automatic QoS support

This commit is contained in:
Sebastian Dröge 2010-03-15 18:09:55 +01:00
parent e46f0261c8
commit 751b293df8
3 changed files with 10 additions and 7 deletions

View file

@ -11,7 +11,9 @@ libgstalpha_la_LIBTOOLFLAGS = --tag=disable-static
libgstalphacolor_la_SOURCES = gstalphacolor.c
libgstalphacolor_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) \
$(GST_BASE_CFLAGS) $(GST_CFLAGS)
libgstalphacolor_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS)
libgstalphacolor_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) \
$(GST_BASE_LIBS) $(GST_LIBS) \
-lgstvideo-@GST_MAJORMINOR@
libgstalphacolor_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstalphacolor_la_LIBTOOLFLAGS = --tag=disable-static

View file

@ -52,8 +52,8 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
GST_STATIC_CAPS (GST_VIDEO_CAPS_YUV ("AYUV"))
);
GST_BOILERPLATE (GstAlphaColor, gst_alpha_color, GstBaseTransform,
GST_TYPE_BASE_TRANSFORM);
GST_BOILERPLATE (GstAlphaColor, gst_alpha_color, GstVideoFilter,
GST_TYPE_VIDEO_FILTER);
static GstCaps *gst_alpha_color_transform_caps (GstBaseTransform * btrans,
GstPadDirection direction, GstCaps * caps);

View file

@ -20,7 +20,8 @@
#ifndef _GST_ALPHA_COLOR_H_
#define _GST_ALPHA_COLOR_H_
#include <gst/base/gstbasetransform.h>
#include <gst/video/video.h>
#include <gst/video/gstvideofilter.h>
#define GST_TYPE_ALPHA_COLOR \
(gst_alpha_color_get_type())
@ -38,7 +39,7 @@ typedef struct _GstAlphaColorClass GstAlphaColorClass;
struct _GstAlphaColor
{
GstBaseTransform element;
GstVideoFilter parent;
/*< private >*/
/* caps */
@ -49,9 +50,9 @@ struct _GstAlphaColor
struct _GstAlphaColorClass
{
GstBaseTransformClass parent_class;
GstVideoFilterClass parent_class;
};
GType gst_alpha_color_get_type (void);
GType gst_alpha_color_get_type (void);
#endif /* _GST_ALPHA_COLOR_H_ */