Explaining Gstreamer plugin example

horai ivo.hora at seznam.cz
Tue Oct 1 19:48:50 UTC 2019


Dear all,

would anyone be so kind to explain me for what purpose this example exactly
is?
https://github.com/GStreamer/gst-plugins-bad/blob/master/tests/examples/waylandsink/wayland-threads.c

>From the code, I would kind of assume that it is meant to show how the code
should be written in order to run two pipelines simultaneously on Wayland.
Simple, just creating pipeline and assigning waylandsink to multiple
pipelines is not enough to run them properly on top of Wayland actually it's
compositor Weston.

I have an application with 4 rendering wayland surfaces and all pipelines
run fine (without usage of code of the above mentioned example), but I am
experiencing problems with disposing rendering areas and also reloading
pipelines whenever I stop them and want to run them once more.
Whenever I want to restart all my 4 pipelines, I experience segmentation
fault in method:
wl_list_insert() resizing in wayland-client.c.
It randomly crashes on several spots in my code for example this method
which assigns context to waylandsink:
gst_element_set_context(GST_ELEMENT(GST_MESSAGE_SRC(message)), context);
(none of these variables are NULL).
On start of the application, this method runs fine for all 4 video
renderings, but when I stop all renderings and start them once more, it
crashes even though GST_ELEMENT(GST_MESSAGE_SRC(message)) is really 
reference to one of 4 waylandsinks I am creating for each of pipeline and
context is a variable created by method:
GstContext *context =
gst_wayland_display_handle_context_new(display_handle);
I have asked several times about my problem if not being able to clear
rendering surface with set_render_rectangle method, therefore I made a
workaround with stopping all pipelines and unreferencing all of them. It
clears the rendering surfaces properly, but the downside is that I cannot
reuse the already created pipeline and unref forces me to create 4 pipelines
once more.
But it seems problems are not yet finished and this workaround has some
deeper issues.
Could this example be utilized in order to fix my problem?
If anyone has some more examples how to write gstreamer code on Wayland,
please share it with me.

Thank you very much
Best regards,
Ivo





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


More information about the gstreamer-devel mailing list