Need to unref context after setting it in GstVideoOverlay ?
Guillermo Rodriguez Garcia
guille.rodriguez at gmail.com
Wed Jan 22 10:26:23 UTC 2020
Hi Guillaume,
Thank you for the clarification, this was my understanding too, but I was
confused because none of the examples I have found around (including
examples in the Gstreamer source tree itself) actually do this...
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/blob/master/tests/examples/waylandsink/main.c
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/blob/master/tests/examples/waylandsink/wayland-threads.c
BR,
Guillermo
El mié., 22 ene. 2020 a las 11:08, Guillaume Desmottes
(<guillaume.desmottes at collabora.com>) escribió:
>
> Hi Guillermo,
>
> The context argument of gst_element_set_context() is marked as
> "(transfer none)" in the documentation.
> This means the caller preserves ownership of it and so should unref it
> with gst_context_unref() once it's done with it.
>
>
> G.
>
> On 22/01/2020 15:33, Guillermo Rodriguez Garcia wrote:
> > Hi all,
> >
> > I am using gstwaylandsink with an external wayland surface.
> > In the bus sync handler I need to set the Wayland display context as
> > well as the surface handle. For the context I am doing the following:
> >
> > GstContext *context =
> > gst_context_new(GST_WAYLAND_DISPLAY_HANDLE_CONTEXT_TYPE, TRUE);
> > gst_structure_set(gst_context_writable_structure(context),
> > "handle", G_TYPE_POINTER, wayland_display, NULL);
> > gst_element_set_context(pipeline, context);
> >
> > Do I need to unref the context after gst_element_set_context ? Or will
> > it be automatically freed once the pipeline is released?
> >
> > Thanks,
> >
> > Guillermo Rodriguez Garcia
> > guille.rodriguez at gmail.com
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
--
Guillermo Rodriguez Garcia
guille.rodriguez at gmail.com
More information about the gstreamer-devel
mailing list