Hi all,
I’m currently struggling with getting a GStreamer stream displayed in an Qt application on the Jetson.
The app is pretty basic and my pipeline is like:
videotestsrc ! glupload ! qmlglsink
The problem occurs as soon as I’m trying to load the qml file.
Code:
int main(int argc, char *argv[])
{
int ret;
// Init gstreamer + debug level.
gst_init (&argc, &argv);
gst_debug_set_active(TRUE);
gst_debug_set_default_threshold(GST_LEVEL_DEBUG);
// Preload qmlglsink to have it properly available as module in qml.
GstElement *sink = gst_element_factory_make ("qmlglsink", nullptr);
gst_object_unref(sink);
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); // -> this creates an error that the current context could not be retrieved
The error:
WARN glcontext gstglcontext.c:495:gst_gl_context_get_current_gl_context: Could not retrieve current context
ERROR qtglutility gstqtglutility.cc:158:gst_qt_get_gl_wrapcontext: cannot wrap qt OpenGL context (NULL)
Did anyone encounter such problems?
The code is running fine on a x86 (with NV card) based LUbunutu 19.xx, but not on the Jetson.
As EGL is playing a role here, I’m pretty sure this is a cause of the problem but I cannot figure out what exactly.
Any help is appreciated.
Thanks,
Bodo