diff --git a/sys/d3d11/gstd3d11memory.c b/sys/d3d11/gstd3d11memory.c index 0350d0f5e0..99a47227f7 100644 --- a/sys/d3d11/gstd3d11memory.c +++ b/sys/d3d11/gstd3d11memory.c @@ -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); +} diff --git a/sys/d3d11/gstd3d11memory.h b/sys/d3d11/gstd3d11memory.h index 406dd1ec44..4ebe8e449d 100644 --- a/sys/d3d11/gstd3d11memory.h +++ b/sys/d3d11/gstd3d11memory.h @@ -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__ */