mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-06-02 13:39:26 +00:00
libs: va: Add API to peek the va memory's display.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3322>
This commit is contained in:
parent
b1a98433f8
commit
464650a5d0
|
@ -1959,6 +1959,31 @@ gst_va_memory_get_surface (GstMemory * mem)
|
|||
return surface;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_va_memory_peek_display:
|
||||
* @mem: a #GstMemory
|
||||
*
|
||||
* Returns: (type #GstVaDisplay) (transfer none): the display which
|
||||
* this @mem belongs to. The reference of the display is unchanged.
|
||||
*
|
||||
* Since: 1.22
|
||||
*/
|
||||
GstVaDisplay *
|
||||
gst_va_memory_peek_display (GstMemory * mem)
|
||||
{
|
||||
GstAllocator *allocator;
|
||||
|
||||
if (!mem)
|
||||
return NULL;
|
||||
|
||||
allocator = GST_MEMORY_CAST (mem)->allocator;
|
||||
/* no allocator, not VA kind memory. */
|
||||
if (!allocator)
|
||||
return NULL;
|
||||
|
||||
return gst_va_allocator_peek_display (allocator);
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_va_buffer_get_surface:
|
||||
* @buffer: a #GstBuffer
|
||||
|
|
|
@ -124,6 +124,8 @@ GstVaDisplay * gst_va_allocator_peek_display (GstAllocator * alloca
|
|||
GST_VA_API
|
||||
VASurfaceID gst_va_memory_get_surface (GstMemory * mem);
|
||||
GST_VA_API
|
||||
GstVaDisplay * gst_va_memory_peek_display (GstMemory * mem);
|
||||
GST_VA_API
|
||||
VASurfaceID gst_va_buffer_get_surface (GstBuffer * buffer);
|
||||
|
||||
GST_VA_API
|
||||
|
|
Loading…
Reference in a new issue