Blame gst-libs/gst/allocators/gstphysmemory.h

Packit 971217
/* GStreamer
Packit 971217
 * Copyright (C) 2017 Sebastian Dröge <sebastian@centricular.com>
Packit 971217
 *
Packit 971217
 * This library is free software; you can redistribute it and/or
Packit 971217
 * modify it under the terms of the GNU Library General Public
Packit 971217
 * License as published by the Free Software Foundation; either
Packit 971217
 * version 2 of the License, or (at your option) any later version.
Packit 971217
 *
Packit 971217
 * This library is distributed in the hope that it will be useful,
Packit 971217
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 971217
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 971217
 * Library General Public License for more details.
Packit 971217
 *
Packit 971217
 * You should have received a copy of the GNU Library General Public
Packit 971217
 * License along with this library; if not, write to the
Packit 971217
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Packit 971217
 * Boston, MA 02111-1307, USA.
Packit 971217
 */
Packit 971217
Packit 971217
#ifndef __GST_PHYS_MEMORY_H__
Packit 971217
#define __GST_PHYS_MEMORY_H__
Packit 971217
Packit 971217
#include <gst/gst.h>
Packit 971217
#include <gst/allocators/allocators-prelude.h>
Packit 971217
Packit 971217
G_BEGIN_DECLS
Packit 971217
Packit 971217
typedef struct _GstPhysMemoryAllocator GstPhysMemoryAllocator;
Packit 971217
typedef struct _GstPhysMemoryAllocatorInterface GstPhysMemoryAllocatorInterface;
Packit 971217
Packit 971217
#define GST_TYPE_PHYS_MEMORY_ALLOCATOR                  (gst_phys_memory_allocator_get_type())
Packit 971217
#define GST_IS_PHYS_MEMORY_ALLOCATOR(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PHYS_MEMORY_ALLOCATOR))
Packit 971217
#define GST_IS_PHYS_MEMORY_ALLOCATOR_INTERFACE(iface)   (G_TYPE_CHECK_INTERFACE_TYPE ((iface), GST_TYPE_PHYS_MEMORY_ALLOCATOR))
Packit 971217
#define GST_PHYS_MEMORY_ALLOCATOR_GET_INTERFACE(obj)    (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GST_TYPE_PHYS_MEMORY_ALLOCATOR, GstPhysMemoryAllocatorInterface))
Packit 971217
#define GST_PHYS_MEMORY_ALLOCATOR(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PHYS_MEMORY_ALLOCATOR, GstPhysMemoryAllocator))
Packit 971217
#define GST_PHYS_MEMORY_ALLOCATOR_INTERFACE(iface)      (G_TYPE_CHECK_INTERFACE_CAST ((iface), GST_TYPE_PHYS_MEMORY_ALLOCATOR, GstPhysMemoryAllocatorInterface))
Packit 971217
#define GST_PHYS_MEMORY_ALLOCATOR_CAST(obj)             ((GstPhysMemoryAllocator *)(obj))
Packit 971217
Packit 971217
/**
Packit 971217
 * GstPhysMemoryAllocatorInterface:
Packit 971217
 *
Packit 971217
 * Marker interface for allocators with physical address backed memory
Packit 971217
 *
Packit 971217
 * Since: 1.14
Packit 971217
 */
Packit 971217
struct _GstPhysMemoryAllocatorInterface
Packit 971217
{
Packit 971217
  GTypeInterface parent_iface;
Packit 971217
Packit 971217
  guintptr (*get_phys_addr) (GstPhysMemoryAllocator * allocator, GstMemory * mem);
Packit 971217
};
Packit 971217
Packit 971217
GST_ALLOCATORS_API
Packit 971217
GType gst_phys_memory_allocator_get_type (void);
Packit 971217
Packit 971217
GST_ALLOCATORS_API
Packit 971217
gboolean gst_is_phys_memory (GstMemory *mem);
Packit 971217
Packit 971217
GST_ALLOCATORS_API
Packit 971217
guintptr gst_phys_memory_get_phys_addr (GstMemory * mem);
Packit 971217
Packit 971217
G_END_DECLS
Packit 971217
Packit 971217
#endif /* __GST_PHYS_MEMORY_H__ */