summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2016-07-22 16:57:45 +0300
committerSebastian Dröge <sebastian@centricular.com>2016-07-22 16:57:45 +0300
commitb10ab99e02b7ce8ed59b7c376a1856411a072543 (patch)
treedbc88b6d03b8fc74d26411a4bb9294c18a7606ea /tests
parent9f2dfaaa7a97d3eac298f5d09ea1e0f29be5a848 (diff)
qml: Use glsinkbin instead of glupload directly
Diffstat (limited to 'tests')
-rw-r--r--tests/examples/qt/qml/main.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/examples/qt/qml/main.cpp b/tests/examples/qt/qml/main.cpp
index 2317b0541..801468b03 100644
--- a/tests/examples/qt/qml/main.cpp
+++ b/tests/examples/qt/qml/main.cpp
@@ -44,15 +44,17 @@ int main(int argc, char *argv[])
GstElement *pipeline = gst_pipeline_new (NULL);
GstElement *src = gst_element_factory_make ("videotestsrc", NULL);
- GstElement *glupload = gst_element_factory_make ("glupload", NULL);
/* the plugin must be loaded before loading the qml file to register the
* GstGLVideoItem qml item */
GstElement *sink = gst_element_factory_make ("qmlglsink", NULL);
+ GstElement *sinkbin = gst_element_factory_make ("glsinkbin", NULL);
- g_assert (src && glupload && sink);
+ g_assert (src && sink && sinkbin);
- gst_bin_add_many (GST_BIN (pipeline), src, glupload, sink, NULL);
- gst_element_link_many (src, glupload, sink, NULL);
+ g_object_set (sinkbin, "sink", sink, NULL);
+
+ gst_bin_add_many (GST_BIN (pipeline), src, sinkbin, NULL);
+ gst_element_link_many (src, sinkbin, NULL);
QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));