Need to unref context after setting it in GstVideoOverlay ?

Guillaume Desmottes guillaume.desmottes at collabora.com
Wed Jan 22 10:09:42 UTC 2020


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


More information about the gstreamer-devel mailing list