wayland: Add API to ref/unref current GstBuffer inside a GstWlBuffer

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6133>
This commit is contained in:
Damian Hobson-Garcia 2024-02-15 16:41:52 -05:00
parent 1b3bb334eb
commit 612ee3b591
2 changed files with 20 additions and 0 deletions

View file

@ -282,6 +282,20 @@ gst_wl_buffer_attach (GstWlBuffer * self, struct wl_surface *surface)
priv->used_by_compositor = TRUE;
}
void
gst_wl_buffer_ref_gst_buffer (GstWlBuffer * self)
{
GstWlBufferPrivate *priv = gst_wl_buffer_get_instance_private (self);
gst_buffer_ref (priv->current_gstbuffer);
}
void
gst_wl_buffer_unref_buffer (GstWlBuffer * self)
{
GstWlBufferPrivate *priv = gst_wl_buffer_get_instance_private (self);
gst_buffer_unref (priv->current_gstbuffer);
}
GstWlDisplay *
gst_wl_buffer_get_display (GstWlBuffer * self)
{

View file

@ -47,6 +47,12 @@ void gst_wl_buffer_force_release_and_unref (GstBuffer *buf, GstWlBuffer * self);
GST_WL_API
void gst_wl_buffer_attach (GstWlBuffer * self, struct wl_surface *surface);
GST_WL_API
void gst_wl_buffer_ref_gst_buffer(GstWlBuffer * self);
GST_WL_API
void gst_wl_buffer_unref_buffer(GstWlBuffer * self);
GST_WL_API
GstWlDisplay *gst_wl_buffer_get_display (GstWlBuffer * self);