mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 03:00:35 +00:00
gstphysmemory: Use G_DECLARE_INTERFACE
This commit is contained in:
parent
a6c4e92cb4
commit
eae9d3fbd5
2 changed files with 7 additions and 13 deletions
|
@ -70,7 +70,7 @@ gst_phys_memory_get_phys_addr (GstMemory * mem)
|
|||
|
||||
g_return_val_if_fail (gst_is_phys_memory (mem), 0);
|
||||
|
||||
iface = GST_PHYS_MEMORY_ALLOCATOR_GET_INTERFACE (mem->allocator);
|
||||
iface = GST_PHYS_MEMORY_ALLOCATOR_GET_IFACE (mem->allocator);
|
||||
g_return_val_if_fail (iface->get_phys_addr != NULL, 0);
|
||||
|
||||
return iface->get_phys_addr ((GstPhysMemoryAllocator *) mem->allocator, mem);
|
||||
|
|
|
@ -25,16 +25,13 @@
|
|||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GstPhysMemoryAllocator GstPhysMemoryAllocator;
|
||||
typedef struct _GstPhysMemoryAllocatorInterface GstPhysMemoryAllocatorInterface;
|
||||
#define GST_TYPE_PHYS_MEMORY_ALLOCATOR (gst_phys_memory_allocator_get_type())
|
||||
GST_ALLOCATORS_API
|
||||
G_DECLARE_INTERFACE (GstPhysMemoryAllocator, gst_phys_memory_allocator,
|
||||
GST, PHYS_MEMORY_ALLOCATOR, GstAllocator)
|
||||
|
||||
#define GST_TYPE_PHYS_MEMORY_ALLOCATOR (gst_phys_memory_allocator_get_type())
|
||||
#define GST_IS_PHYS_MEMORY_ALLOCATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PHYS_MEMORY_ALLOCATOR))
|
||||
#define GST_IS_PHYS_MEMORY_ALLOCATOR_INTERFACE(iface) (G_TYPE_CHECK_INTERFACE_TYPE ((iface), GST_TYPE_PHYS_MEMORY_ALLOCATOR))
|
||||
#define GST_PHYS_MEMORY_ALLOCATOR_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GST_TYPE_PHYS_MEMORY_ALLOCATOR, GstPhysMemoryAllocatorInterface))
|
||||
#define GST_PHYS_MEMORY_ALLOCATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PHYS_MEMORY_ALLOCATOR, GstPhysMemoryAllocator))
|
||||
#define GST_PHYS_MEMORY_ALLOCATOR_INTERFACE(iface) (G_TYPE_CHECK_INTERFACE_CAST ((iface), GST_TYPE_PHYS_MEMORY_ALLOCATOR, GstPhysMemoryAllocatorInterface))
|
||||
#define GST_PHYS_MEMORY_ALLOCATOR_CAST(obj) ((GstPhysMemoryAllocator *)(obj))
|
||||
#define GST_PHYS_MEMORY_ALLOCATOR_GET_INTERFACE(obj) (GST_PHYS_MEMORY_ALLOCATOR_GET_IFACE(obj))
|
||||
#define GST_PHYS_MEMORY_ALLOCATOR_CAST(obj) ((GstPhysMemoryAllocator *)(obj))
|
||||
|
||||
/**
|
||||
* GstPhysMemoryAllocatorInterface:
|
||||
|
@ -54,9 +51,6 @@ struct _GstPhysMemoryAllocatorInterface
|
|||
guintptr (*get_phys_addr) (GstPhysMemoryAllocator * allocator, GstMemory * mem);
|
||||
};
|
||||
|
||||
GST_ALLOCATORS_API
|
||||
GType gst_phys_memory_allocator_get_type (void);
|
||||
|
||||
GST_ALLOCATORS_API
|
||||
gboolean gst_is_phys_memory (GstMemory *mem);
|
||||
|
||||
|
|
Loading…
Reference in a new issue