d3d11: Add method for querying d3d11 memory type

... and fix misreading "private" annotation.
This commit is contained in:
Seungha Yang 2019-08-24 17:14:09 +09:00 committed by GStreamer Merge Bot
parent 8da5237e22
commit d4c75f32dd
2 changed files with 11 additions and 1 deletions

View file

@ -403,3 +403,10 @@ error:
gst_d3d11_device_release_texture (device, staging);
return NULL;
}
gboolean
gst_is_d3d11_memory (GstMemory * mem)
{
return mem != NULL && mem->allocator != NULL &&
GST_IS_D3D11_ALLOCATOR (mem->allocator);
}

View file

@ -87,9 +87,9 @@ struct _GstD3D11Allocator
{
GstAllocator parent;
/*< private >*/
GstD3D11Device *device;
/*< private >*/
gpointer _gst_reserved[GST_PADDING];
};
@ -118,6 +118,9 @@ GstD3D11Allocator * gst_d3d11_allocator_new (GstD3D11Device *device);
GstMemory * gst_d3d11_allocator_alloc (GstD3D11Allocator * allocator,
GstD3D11AllocationParams * params);
gboolean gst_is_d3d11_memory (GstMemory * mem);
G_END_DECLS
#endif /* __GST_D3D11_MEMORY_H__ */