v4l2src -> qmlglsink not possible / transform problem

realBohd2 realsfg at gmx.de
Thu Jun 20 07:01:12 UTC 2019


Nicolas Dufresne-5 wrote
> Not sure why yuy2 is accepted downstream of videoconvert, but it's likely
> a
> good idea to add a glcolorconvert element in your pipeline. Normally we
> wrap qmlglsink into glsinkbin to ensure there is a proper GL accelerated
> display pipeline setup.

Thanks for your answer.

I tried the glsinkbin in the terminal and got something running:
/gst-launch-1.0 v4l2src device=/dev/video0 ! videoconvert ! glupload !
glsinkbin sink=glimagesink/

But when doing this in code with a qmlglview, it somehow does nothing. The
previous error is gone, but I can't see something.
Also the LED on the webcam isn't active which is a sign of something isn't
running properly.

The code:

/pipeline = gst_pipeline_new (nullptr);

GstElement *src = gst_element_factory_make ("v4l2src", NULL); 
g_object_set(src, "device", "/dev/video0", NULL);

GstElement *conv = gst_element_factory_make ("videoconvert", nullptr);
GstElement *glupload= gst_element_factory_make ("glupload", nullptr);

sinkQml = gst_element_factory_make ("qmlglsink", nullptr);
sinkBin = gst_element_factory_make("glsinkbin", nullptr);

g_object_set (sinkBin, "sink", sinkQml, nullptr);

gst_bin_add_many (GST_BIN (pipeline), src, conv, glupload, sinkBin,
nullptr);
gst_element_link_many (src, conv, glupload, sinkBin, nullptr);/

Something that is different from the terminal version is that I'm in need of
an qmlglsink element to attach the videoItem widget to. This is done after
this code section. The qmlsink it self is not added to the pipeline or
linked explicitly. Not sure if this is the correct handling.

>From a first crawling through the gst debug output (level debug) I can't
find any obvious errors or problems. It seems like everything is setup and
deconstructed afterwards.

And from what is shown there is seems some glcolorconvert is involved
automatically (maybe handled / created by the glsinkbin?)

Thanks + Best,
Bodo



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list