diff options
author | Lionel Landwerlin <llandwerlin@gmail.com> | 2014-06-09 12:41:27 +0100 |
---|---|---|
committer | Lionel Landwerlin <llandwerlin@gmail.com> | 2014-06-09 12:41:27 +0100 |
commit | 5c6ff85f14c681571482883971792e30031d9c95 (patch) | |
tree | 527089b47b266e08f6534d0b5de65076011a6bb0 | |
parent | 962b7fd589e53bd7b10e9d9071bab13d4ce0df78 (diff) | |
download | clutter-gst-5c6ff85f14c681571482883971792e30031d9c95.tar.gz |
video-sink: subclass GstVideoSink rather than GstBaseSink
-rw-r--r-- | clutter-gst/clutter-gst-video-sink.c | 12 | ||||
-rw-r--r-- | clutter-gst/clutter-gst-video-sink.h | 6 |
2 files changed, 14 insertions, 4 deletions
diff --git a/clutter-gst/clutter-gst-video-sink.c b/clutter-gst/clutter-gst-video-sink.c index db69028..3bdacce 100644 --- a/clutter-gst/clutter-gst-video-sink.c +++ b/clutter-gst/clutter-gst-video-sink.c @@ -116,7 +116,7 @@ static void color_balance_iface_init (GstColorBalanceInterface *iface); G_DEFINE_TYPE_WITH_CODE (ClutterGstVideoSink, clutter_gst_video_sink, - GST_TYPE_BASE_SINK, + GST_TYPE_VIDEO_SINK, G_IMPLEMENT_INTERFACE (GST_TYPE_COLOR_BALANCE, color_balance_iface_init)) enum @@ -2059,6 +2059,13 @@ _clutter_gst_video_sink_render (GstBaseSink *bsink, } } +static GstFlowReturn +_clutter_gst_video_sink_show_frame (GstVideoSink *vsink, + GstBuffer *buffer) +{ + return _clutter_gst_video_sink_render (GST_BASE_SINK (vsink), buffer); +} + static void clutter_gst_video_sink_dispose (GObject *object) { @@ -2210,6 +2217,7 @@ static void clutter_gst_video_sink_class_init (ClutterGstVideoSinkClass *klass) { GObjectClass *go_class = G_OBJECT_CLASS (klass); + GstVideoSinkClass *gv_class = GST_VIDEO_SINK_CLASS (klass); GstBaseSinkClass *gb_class = GST_BASE_SINK_CLASS (klass); GstElementClass *ge_class = GST_ELEMENT_CLASS (klass); GstPadTemplate *pad_template; @@ -2242,6 +2250,8 @@ clutter_gst_video_sink_class_init (ClutterGstVideoSinkClass *klass) gb_class->get_caps = clutter_gst_video_sink_get_caps; gb_class->propose_allocation = clutter_gst_video_sink_propose_allocation; + gv_class->show_frame = _clutter_gst_video_sink_show_frame; + pspec = g_param_spec_int ("update-priority", "Update Priority", "Priority of video updates in the thread", diff --git a/clutter-gst/clutter-gst-video-sink.h b/clutter-gst/clutter-gst-video-sink.h index 692d3ad..ce2c7fe 100644 --- a/clutter-gst/clutter-gst-video-sink.h +++ b/clutter-gst/clutter-gst-video-sink.h @@ -36,7 +36,7 @@ #define __CLUTTER_GST_VIDEO_SINK_H__ #include <cogl/cogl.h> -#include <gst/base/gstbasesink.h> +#include <gst/video/gstvideosink.h> #include <clutter-gst/clutter-gst-types.h> G_BEGIN_DECLS @@ -78,7 +78,7 @@ typedef struct _ClutterGstVideoSinkPrivate ClutterGstVideoSinkPrivate; struct _ClutterGstVideoSink { /*< private >*/ - GstBaseSink parent; + GstVideoSink parent; ClutterGstVideoSinkPrivate *priv; }; @@ -92,7 +92,7 @@ struct _ClutterGstVideoSink struct _ClutterGstVideoSinkClass { /*< private >*/ - GstBaseSinkClass parent_class; + GstVideoSinkClass parent_class; /*< public >*/ void (* new_frame) (ClutterGstVideoSink *sink); |