17 #include "allocator.h"
26 m_object = g_slice_new0(GstMapInfo);
31 g_slice_free(GstMapInfo, m_object);
34 MapFlags MapInfo::flags()
const
36 return static_cast<MapFlag
>(
static_cast<GstMapInfo*
>(m_object)->flags);
39 quint8 *MapInfo::data()
const
41 return static_cast<GstMapInfo*
>(m_object)->data;
44 size_t MapInfo::size()
const
46 return static_cast<GstMapInfo*
>(m_object)->size;
49 size_t MapInfo::maxSize()
const
51 return static_cast<GstMapInfo*
>(m_object)->maxsize;
56 AllocatorPtr Memory::allocator()
const
61 size_t Memory::size()
const
63 return object<GstMemory>()->size;
66 size_t Memory::offset()
const
68 return object<GstMemory>()->offset;
71 size_t Memory::maxSize()
const
73 return object<GstMemory>()->maxsize;
76 bool Memory::isType(
const char *type)
const
78 return gst_memory_is_type(object<GstMemory>(), type);
81 bool Memory::map(MapInfo &info, MapFlags flags)
83 return gst_memory_map(object<GstMemory>(), static_cast<GstMapInfo*>(info.m_object),
84 static_cast<GstMapFlags>(static_cast<int>(flags)));
87 void Memory::unmap(MapInfo &info)
89 gst_memory_unmap(object<GstMemory>(), static_cast<GstMapInfo*>(info.m_object));
static RefPointer< T > wrap(typename T::CType *nativePtr, bool increaseRef=true)