summaryrefslogtreecommitdiffstats
path: root/src/gsttools/qgstvideorenderersink.cpp
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@theqtcompany.com>2015-03-23 12:07:47 +0100
committerYoann Lopes <yoann.lopes@theqtcompany.com>2015-04-07 11:34:22 +0000
commitf3ee857564934332da67cc51265841bd76d62b29 (patch)
tree2164ca5a505e80e0f0c3118bf04acce4259c0c69 /src/gsttools/qgstvideorenderersink.cpp
parent6e7a3657dd622d6dd1be6d3ea829ffb8ec69f1fa (diff)
GStreamer 1.0: show preroll frames.
We need to implement the show_frame() function from GstVideoSink, which handles both preroll and normal frames, instead of just GstBaseSink.render(), which is called only for normal frames. This was changed for GStreamer 0.10 by 3b20608f. Change-Id: I4823a575d499cd0d6f9f4cb62e0420e070a05214 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
Diffstat (limited to 'src/gsttools/qgstvideorenderersink.cpp')
-rw-r--r--src/gsttools/qgstvideorenderersink.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gsttools/qgstvideorenderersink.cpp b/src/gsttools/qgstvideorenderersink.cpp
index ff489b778..c09d683a1 100644
--- a/src/gsttools/qgstvideorenderersink.cpp
+++ b/src/gsttools/qgstvideorenderersink.cpp
@@ -415,12 +415,14 @@ void QGstVideoRendererSink::class_init(gpointer g_class, gpointer class_data)
sink_parent_class = reinterpret_cast<GstVideoSinkClass *>(g_type_class_peek_parent(g_class));
+ GstVideoSinkClass *video_sink_class = reinterpret_cast<GstVideoSinkClass *>(g_class);
+ video_sink_class->show_frame = QGstVideoRendererSink::show_frame;
+
GstBaseSinkClass *base_sink_class = reinterpret_cast<GstBaseSinkClass *>(g_class);
base_sink_class->get_caps = QGstVideoRendererSink::get_caps;
base_sink_class->set_caps = QGstVideoRendererSink::set_caps;
base_sink_class->propose_allocation = QGstVideoRendererSink::propose_allocation;
base_sink_class->stop = QGstVideoRendererSink::stop;
- base_sink_class->render = QGstVideoRendererSink::render;
GstElementClass *element_class = reinterpret_cast<GstElementClass *>(g_class);
element_class->change_state = QGstVideoRendererSink::change_state;
@@ -517,7 +519,7 @@ gboolean QGstVideoRendererSink::stop(GstBaseSink *base)
return TRUE;
}
-GstFlowReturn QGstVideoRendererSink::render(GstBaseSink *base, GstBuffer *buffer)
+GstFlowReturn QGstVideoRendererSink::show_frame(GstVideoSink *base, GstBuffer *buffer)
{
VO_SINK(base);
return sink->delegate->render(buffer);