mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
libs: surface: add gst_vaapi_surface_{set,peek}_buffer_proxy()
These functions are useful when a dmabuf-based memory is instantiated in order to relate the generated buffer @proxy with the processed @surface. https://bugzilla.gnome.org/show_bug.cgi?id=755072
This commit is contained in:
parent
7fc1b70ff6
commit
4f037a036b
2 changed files with 40 additions and 0 deletions
|
@ -1039,3 +1039,36 @@ gst_vaapi_surface_set_subpictures_from_composition (GstVaapiSurface * surface,
|
|||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_vaapi_surface_set_buffer_proxy:
|
||||
* @surface: a #GstVaapiSurface
|
||||
* @proxy: an external #GstVaapiBufferProxy
|
||||
*
|
||||
* Replaces the external buffer proxy in @surface with @proxy.
|
||||
*
|
||||
* This is useful when a dmabuf-based memory is instantiated in order
|
||||
* to relate the generated buffer @proxy with the processed @surface.
|
||||
**/
|
||||
void
|
||||
gst_vaapi_surface_set_buffer_proxy (GstVaapiSurface * surface,
|
||||
GstVaapiBufferProxy * proxy)
|
||||
{
|
||||
gst_vaapi_buffer_proxy_replace (&surface->extbuf_proxy, proxy);
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_vaapi_surface_peek_buffer_proxy:
|
||||
* @surface: a #GstVaapiSurface
|
||||
*
|
||||
* This is useful when a dmabuf-based memory is instantiated in order
|
||||
* to relate the generated buffer @proxy with the processed @surface.
|
||||
*
|
||||
* Returns: (transfer none): the associated external
|
||||
* #GstVaapiBufferProxy
|
||||
**/
|
||||
GstVaapiBufferProxy *
|
||||
gst_vaapi_surface_peek_buffer_proxy (GstVaapiSurface * surface)
|
||||
{
|
||||
return surface->extbuf_proxy;
|
||||
}
|
||||
|
|
|
@ -233,6 +233,13 @@ gboolean
|
|||
gst_vaapi_surface_set_subpictures_from_composition (GstVaapiSurface * surface,
|
||||
GstVideoOverlayComposition * composition, gboolean propagate_context);
|
||||
|
||||
void
|
||||
gst_vaapi_surface_set_buffer_proxy (GstVaapiSurface * surface,
|
||||
GstVaapiBufferProxy * proxy);
|
||||
|
||||
GstVaapiBufferProxy *
|
||||
gst_vaapi_surface_peek_buffer_proxy (GstVaapiSurface * surface);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* GST_VAAPI_SURFACE_H */
|
||||
|
|
Loading…
Reference in a new issue