summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2009-09-08 17:43:26 +0100
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2009-09-08 18:20:11 +0100
commit78b0413c5f3dfc2923b51829830de7daa7a2a250 (patch)
tree394122b63e6ffa149c5925637623eee4dc34d3d0 /sys
parente2b4187fe3a87fba63fd34dc4ecc7eb9471beabe (diff)
ximagesink, xvimagesink: use new GstVideoSink::show_frame() vfunc
Diffstat (limited to 'sys')
-rw-r--r--sys/ximage/ximagesink.c12
-rw-r--r--sys/xvimage/xvimagesink.c10
2 files changed, 13 insertions, 9 deletions
diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c
index 3f1714c6..1d726ab4 100644
--- a/sys/ximage/ximagesink.c
+++ b/sys/ximage/ximagesink.c
@@ -1622,13 +1622,13 @@ gst_ximagesink_get_times (GstBaseSink * bsink, GstBuffer * buf,
}
static GstFlowReturn
-gst_ximagesink_show_frame (GstBaseSink * bsink, GstBuffer * buf)
+gst_ximagesink_show_frame (GstVideoSink * vsink, GstBuffer * buf)
{
GstXImageSink *ximagesink;
g_return_val_if_fail (buf != NULL, GST_FLOW_ERROR);
- ximagesink = GST_XIMAGESINK (bsink);
+ ximagesink = GST_XIMAGESINK (vsink);
/* If this buffer has been allocated using our buffer management we simply
put the ximage which is in the PRIVATE pointer */
@@ -1671,7 +1671,7 @@ gst_ximagesink_show_frame (GstBaseSink * bsink, GstBuffer * buf)
no_ximage:
{
/* No image available. That's very bad ! */
- GST_DEBUG ("could not create image");
+ GST_WARNING_OBJECT (ximagesink, "could not create image");
return GST_FLOW_ERROR;
}
no_window:
@@ -2295,10 +2295,12 @@ gst_ximagesink_class_init (GstXImageSinkClass * klass)
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
GstBaseSinkClass *gstbasesink_class;
+ GstVideoSinkClass *videosink_class;
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
gstbasesink_class = (GstBaseSinkClass *) klass;
+ videosink_class = (GstVideoSinkClass *) klass;
parent_class = g_type_class_peek_parent (klass);
@@ -2339,9 +2341,9 @@ gst_ximagesink_class_init (GstXImageSinkClass * klass)
gstbasesink_class->buffer_alloc =
GST_DEBUG_FUNCPTR (gst_ximagesink_buffer_alloc);
gstbasesink_class->get_times = GST_DEBUG_FUNCPTR (gst_ximagesink_get_times);
- gstbasesink_class->preroll = GST_DEBUG_FUNCPTR (gst_ximagesink_show_frame);
- gstbasesink_class->render = GST_DEBUG_FUNCPTR (gst_ximagesink_show_frame);
gstbasesink_class->event = GST_DEBUG_FUNCPTR (gst_ximagesink_event);
+
+ videosink_class->show_frame = GST_DEBUG_FUNCPTR (gst_ximagesink_show_frame);
}
/* ============================================================= */
diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c
index 456371e7..ec4eb4b2 100644
--- a/sys/xvimage/xvimagesink.c
+++ b/sys/xvimage/xvimagesink.c
@@ -2313,11 +2313,11 @@ gst_xvimagesink_get_times (GstBaseSink * bsink, GstBuffer * buf,
}
static GstFlowReturn
-gst_xvimagesink_show_frame (GstBaseSink * bsink, GstBuffer * buf)
+gst_xvimagesink_show_frame (GstVideoSink * vsink, GstBuffer * buf)
{
GstXvImageSink *xvimagesink;
- xvimagesink = GST_XVIMAGESINK (bsink);
+ xvimagesink = GST_XVIMAGESINK (vsink);
/* If this buffer has been allocated using our buffer management we simply
put the ximage which is in the PRIVATE pointer */
@@ -3368,10 +3368,12 @@ gst_xvimagesink_class_init (GstXvImageSinkClass * klass)
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
GstBaseSinkClass *gstbasesink_class;
+ GstVideoSinkClass *videosink_class;
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
gstbasesink_class = (GstBaseSinkClass *) klass;
+ videosink_class = (GstVideoSinkClass *) klass;
parent_class = g_type_class_peek_parent (klass);
@@ -3490,9 +3492,9 @@ gst_xvimagesink_class_init (GstXvImageSinkClass * klass)
gstbasesink_class->buffer_alloc =
GST_DEBUG_FUNCPTR (gst_xvimagesink_buffer_alloc);
gstbasesink_class->get_times = GST_DEBUG_FUNCPTR (gst_xvimagesink_get_times);
- gstbasesink_class->preroll = GST_DEBUG_FUNCPTR (gst_xvimagesink_show_frame);
- gstbasesink_class->render = GST_DEBUG_FUNCPTR (gst_xvimagesink_show_frame);
gstbasesink_class->event = GST_DEBUG_FUNCPTR (gst_xvimagesink_event);
+
+ videosink_class->show_frame = GST_DEBUG_FUNCPTR (gst_xvimagesink_show_frame);
}
/* ============================================================= */