gi-gst-1.0.9: GStreamer bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gst.Structs.Memory

Contents

Description

GstMemory is a lightweight refcounted object that wraps a region of memory. They are typically used to manage the data of a #GstBuffer.

A GstMemory object has an allocated region of memory of maxsize. The maximum size does not change during the lifetime of the memory object. The memory also has an offset and size property that specifies the valid range of memory in the allocated region.

Memory is usually created by allocators with a gst_allocator_alloc() method call. When %NULL is used as the allocator, the default allocator will be used.

New allocators can be registered with gst_allocator_register(). Allocators are identified by name and can be retrieved with gst_allocator_find(). gst_allocator_set_default() can be used to change the default allocator.

New memory can be created with gst_memory_new_wrapped() that wraps the memory allocated elsewhere.

Refcounting of the memory block is performed with gst_memory_ref() and gst_memory_unref().

The size of the memory can be retrieved and changed with gst_memory_get_sizes() and gst_memory_resize() respectively.

Getting access to the data of the memory is performed with gst_memory_map(). The call will return a pointer to offset bytes into the region of memory. After the memory access is completed, gst_memory_unmap() should be called.

Memory can be copied with gst_memory_copy(), which will return a writable copy. gst_memory_share() will create a new memory block that shares the memory with an existing memory block at a custom offset and with a custom size.

Memory can be efficiently merged when gst_memory_is_span() returns %TRUE.

Synopsis

Exported types

newtype Memory Source #

Constructors

Memory (ManagedPtr Memory) 

Instances

BoxedObject Memory Source # 

Methods

boxedType :: Memory -> IO GType

(~) AttrOpTag tag AttrSet => Constructible Memory tag Source # 

Methods

new :: MonadIO m => (ManagedPtr Memory -> Memory) -> [AttrOp Memory tag] -> m Memory

((~) * info (ResolveMemoryMethod t Memory), MethodInfo * info Memory p) => IsLabel t (Memory -> p) Source # 

Methods

fromLabel :: Proxy# Symbol t -> Memory -> p #

((~) * info (ResolveMemoryMethod t Memory), MethodInfo * info Memory p) => IsLabelProxy t (Memory -> p) Source # 

Methods

fromLabelProxy :: Proxy Symbol t -> Memory -> p

HasAttributeList * Memory Source # 
((~) * signature (MapInfo -> m ()), MonadIO m) => MethodInfo * MemoryUnmapMethodInfo Memory signature Source # 

Methods

overloadedMethod :: MethodProxy MemoryUnmapMethodInfo Memory -> signature -> s

((~) * signature (Int64 -> Int64 -> m Memory), MonadIO m) => MethodInfo * MemoryShareMethodInfo Memory signature Source # 

Methods

overloadedMethod :: MethodProxy MemoryShareMethodInfo Memory -> signature -> s

((~) * signature (Int64 -> Word64 -> m ()), MonadIO m) => MethodInfo * MemoryResizeMethodInfo Memory signature Source # 

Methods

overloadedMethod :: MethodProxy MemoryResizeMethodInfo Memory -> signature -> s

((~) * signature ([MapFlags] -> m (Bool, MapInfo)), MonadIO m) => MethodInfo * MemoryMapMethodInfo Memory signature Source # 

Methods

overloadedMethod :: MethodProxy MemoryMapMethodInfo Memory -> signature -> s

((~) * signature ([MapFlags] -> m (Maybe Memory, MapInfo)), MonadIO m) => MethodInfo * MemoryMakeMappedMethodInfo Memory signature Source # 

Methods

overloadedMethod :: MethodProxy MemoryMakeMappedMethodInfo Memory -> signature -> s

((~) * signature (Text -> m Bool), MonadIO m) => MethodInfo * MemoryIsTypeMethodInfo Memory signature Source # 

Methods

overloadedMethod :: MethodProxy MemoryIsTypeMethodInfo Memory -> signature -> s

((~) * signature (Memory -> Word64 -> m Bool), MonadIO m) => MethodInfo * MemoryIsSpanMethodInfo Memory signature Source # 

Methods

overloadedMethod :: MethodProxy MemoryIsSpanMethodInfo Memory -> signature -> s

((~) * signature (Word64 -> Word64 -> m Word64), MonadIO m) => MethodInfo * MemoryGetSizesMethodInfo Memory signature Source # 

Methods

overloadedMethod :: MethodProxy MemoryGetSizesMethodInfo Memory -> signature -> s

((~) * signature (Int64 -> Int64 -> m Memory), MonadIO m) => MethodInfo * MemoryCopyMethodInfo Memory signature Source # 

Methods

overloadedMethod :: MethodProxy MemoryCopyMethodInfo Memory -> signature -> s

type AttributeList Memory Source # 
type AttributeList Memory

newZeroMemory :: MonadIO m => m Memory Source #

Construct a Memory struct initialized to zero.

Methods

copy

data MemoryCopyMethodInfo Source #

Instances

((~) * signature (Int64 -> Int64 -> m Memory), MonadIO m) => MethodInfo * MemoryCopyMethodInfo Memory signature Source # 

Methods

overloadedMethod :: MethodProxy MemoryCopyMethodInfo Memory -> signature -> s

getSizes

data MemoryGetSizesMethodInfo Source #

Instances

((~) * signature (Word64 -> Word64 -> m Word64), MonadIO m) => MethodInfo * MemoryGetSizesMethodInfo Memory signature Source # 

Methods

overloadedMethod :: MethodProxy MemoryGetSizesMethodInfo Memory -> signature -> s

isSpan

data MemoryIsSpanMethodInfo Source #

Instances

((~) * signature (Memory -> Word64 -> m Bool), MonadIO m) => MethodInfo * MemoryIsSpanMethodInfo Memory signature Source # 

Methods

overloadedMethod :: MethodProxy MemoryIsSpanMethodInfo Memory -> signature -> s

isType

data MemoryIsTypeMethodInfo Source #

Instances

((~) * signature (Text -> m Bool), MonadIO m) => MethodInfo * MemoryIsTypeMethodInfo Memory signature Source # 

Methods

overloadedMethod :: MethodProxy MemoryIsTypeMethodInfo Memory -> signature -> s

memoryIsType :: MonadIO m => Memory -> Text -> m Bool Source #

makeMapped

data MemoryMakeMappedMethodInfo Source #

Instances

((~) * signature ([MapFlags] -> m (Maybe Memory, MapInfo)), MonadIO m) => MethodInfo * MemoryMakeMappedMethodInfo Memory signature Source # 

Methods

overloadedMethod :: MethodProxy MemoryMakeMappedMethodInfo Memory -> signature -> s

map

data MemoryMapMethodInfo Source #

Instances

((~) * signature ([MapFlags] -> m (Bool, MapInfo)), MonadIO m) => MethodInfo * MemoryMapMethodInfo Memory signature Source # 

Methods

overloadedMethod :: MethodProxy MemoryMapMethodInfo Memory -> signature -> s

newWrapped

memoryNewWrapped :: MonadIO m => [MemoryFlags] -> ByteString -> Word64 -> Word64 -> Maybe DestroyNotify -> m Memory Source #

resize

data MemoryResizeMethodInfo Source #

Instances

((~) * signature (Int64 -> Word64 -> m ()), MonadIO m) => MethodInfo * MemoryResizeMethodInfo Memory signature Source # 

Methods

overloadedMethod :: MethodProxy MemoryResizeMethodInfo Memory -> signature -> s

share

data MemoryShareMethodInfo Source #

Instances

((~) * signature (Int64 -> Int64 -> m Memory), MonadIO m) => MethodInfo * MemoryShareMethodInfo Memory signature Source # 

Methods

overloadedMethod :: MethodProxy MemoryShareMethodInfo Memory -> signature -> s

unmap

data MemoryUnmapMethodInfo Source #

Instances

((~) * signature (MapInfo -> m ()), MonadIO m) => MethodInfo * MemoryUnmapMethodInfo Memory signature Source # 

Methods

overloadedMethod :: MethodProxy MemoryUnmapMethodInfo Memory -> signature -> s

Properties

align

memory_align :: AttrLabelProxy "align" Source #

allocator

memory_allocator :: AttrLabelProxy "allocator" Source #

maxsize

memory_maxsize :: AttrLabelProxy "maxsize" Source #

miniObject

memory_miniObject :: AttrLabelProxy "miniObject" Source #

offset

memory_offset :: AttrLabelProxy "offset" Source #

parent

memory_parent :: AttrLabelProxy "parent" Source #

size

memory_size :: AttrLabelProxy "size" Source #