mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
libs: va: Add API to peek the allocator's display.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3322>
This commit is contained in:
parent
028920cfc4
commit
b1a98433f8
2 changed files with 26 additions and 0 deletions
|
@ -1902,6 +1902,30 @@ gst_va_allocator_set_hacks (GstAllocator * allocator, guint32 hacks)
|
|||
self->hacks = hacks;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_va_allocator_peek_display:
|
||||
* @allocator: a #GstAllocator
|
||||
*
|
||||
* Returns: (type #GstVaDisplay) (transfer none): the display which this
|
||||
* @allocator belongs to. The reference of the display is unchanged.
|
||||
*
|
||||
* Since: 1.22
|
||||
*/
|
||||
GstVaDisplay *
|
||||
gst_va_allocator_peek_display (GstAllocator * allocator)
|
||||
{
|
||||
if (!allocator)
|
||||
return NULL;
|
||||
|
||||
if (GST_IS_VA_DMABUF_ALLOCATOR (allocator)) {
|
||||
return GST_VA_DMABUF_ALLOCATOR (allocator)->display;
|
||||
} else if (GST_IS_VA_ALLOCATOR (allocator)) {
|
||||
return GST_VA_ALLOCATOR (allocator)->display;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*============ Utilities =====================================================*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -118,6 +118,8 @@ gboolean gst_va_allocator_get_format (GstAllocator * alloca
|
|||
GST_VA_API
|
||||
void gst_va_allocator_set_hacks (GstAllocator * allocator,
|
||||
guint32 hacks);
|
||||
GST_VA_API
|
||||
GstVaDisplay * gst_va_allocator_peek_display (GstAllocator * allocator);
|
||||
|
||||
GST_VA_API
|
||||
VASurfaceID gst_va_memory_get_surface (GstMemory * mem);
|
||||
|
|
Loading…
Reference in a new issue