mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
libs: va: Add API to peek the va buffer's display.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3322>
This commit is contained in:
parent
464650a5d0
commit
3875c420f7
2 changed files with 27 additions and 0 deletions
|
@ -2127,3 +2127,28 @@ gst_va_buffer_get_aux_surface (GstBuffer * buffer)
|
||||||
|
|
||||||
return surface_buffer->surface;
|
return surface_buffer->surface;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gst_va_buffer_peek_display:
|
||||||
|
* @buffer: a #GstBuffer
|
||||||
|
*
|
||||||
|
* Returns: (type #GstVaDisplay) (transfer none): the display which this
|
||||||
|
* @buffer belongs to. The reference of the display is unchanged.
|
||||||
|
*
|
||||||
|
* Since: 1.22
|
||||||
|
*/
|
||||||
|
GstVaDisplay *
|
||||||
|
gst_va_buffer_peek_display (GstBuffer * buffer)
|
||||||
|
{
|
||||||
|
GstMemory *mem;
|
||||||
|
|
||||||
|
if (!buffer)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
mem = gst_buffer_peek_memory (buffer, 0);
|
||||||
|
/* Buffer without mem, not VA kind memory. */
|
||||||
|
if (!mem)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return gst_va_memory_peek_display (mem);
|
||||||
|
}
|
||||||
|
|
|
@ -132,5 +132,7 @@ GST_VA_API
|
||||||
gboolean gst_va_buffer_create_aux_surface (GstBuffer * buffer);
|
gboolean gst_va_buffer_create_aux_surface (GstBuffer * buffer);
|
||||||
GST_VA_API
|
GST_VA_API
|
||||||
VASurfaceID gst_va_buffer_get_aux_surface (GstBuffer * buffer);
|
VASurfaceID gst_va_buffer_get_aux_surface (GstBuffer * buffer);
|
||||||
|
GST_VA_API
|
||||||
|
GstVaDisplay * gst_va_buffer_peek_display (GstBuffer * buffer);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
Loading…
Reference in a new issue