gi-gst-1.0.30: GStreamer bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gst.Structs.ByteArrayInterface

Description

Interface for an array of bytes. It is expected to be subclassed to implement resize virtual method using language native array implementation, such as GLib's ByteArray, C++'s std::vector<uint8_t> or Rust's Vec<u8>.

resize implementation could allocate more than requested to avoid repeated reallocations. It can return False, or be set to Nothing, in the case the array cannot grow.

Since: 1.24

Synopsis

Exported types

newtype ByteArrayInterface Source #

Memory-managed wrapper type.

Constructors

ByteArrayInterface (ManagedPtr ByteArrayInterface) 

Instances

Instances details
Eq ByteArrayInterface Source # 
Instance details

Defined in GI.Gst.Structs.ByteArrayInterface

BoxedPtr ByteArrayInterface Source # 
Instance details

Defined in GI.Gst.Structs.ByteArrayInterface

CallocPtr ByteArrayInterface Source # 
Instance details

Defined in GI.Gst.Structs.ByteArrayInterface

ManagedPtrNewtype ByteArrayInterface Source # 
Instance details

Defined in GI.Gst.Structs.ByteArrayInterface

tag ~ 'AttrSet => Constructible ByteArrayInterface tag Source # 
Instance details

Defined in GI.Gst.Structs.ByteArrayInterface

Methods

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

newZeroByteArrayInterface :: MonadIO m => m ByteArrayInterface Source #

Construct a ByteArrayInterface struct initialized to zero.

Methods

Properties

data

A pointer to an array of bytes.

getByteArrayInterfaceData :: MonadIO m => ByteArrayInterface -> m Word8 Source #

Get the value of the “data” field. When overloading is enabled, this is equivalent to

get byteArrayInterface #data

setByteArrayInterfaceData :: MonadIO m => ByteArrayInterface -> Word8 -> m () Source #

Set the value of the “data” field. When overloading is enabled, this is equivalent to

set byteArrayInterface [ #data := value ]

len

Number of bytes in data.

getByteArrayInterfaceLen :: MonadIO m => ByteArrayInterface -> m CSize Source #

Get the value of the “len” field. When overloading is enabled, this is equivalent to

get byteArrayInterface #len

setByteArrayInterfaceLen :: MonadIO m => ByteArrayInterface -> CSize -> m () Source #

Set the value of the “len” field. When overloading is enabled, this is equivalent to

set byteArrayInterface [ #len := value ]

resize

Reallocate data.

clearByteArrayInterfaceResize :: MonadIO m => ByteArrayInterface -> m () Source #

Set the value of the “resize” field to Nothing. When overloading is enabled, this is equivalent to

clear #resize

getByteArrayInterfaceResize :: MonadIO m => ByteArrayInterface -> m (Maybe ByteArrayInterfaceResizeFieldCallback) Source #

Get the value of the “resize” field. When overloading is enabled, this is equivalent to

get byteArrayInterface #resize

setByteArrayInterfaceResize :: MonadIO m => ByteArrayInterface -> FunPtr C_ByteArrayInterfaceResizeFieldCallback -> m () Source #

Set the value of the “resize” field. When overloading is enabled, this is equivalent to

set byteArrayInterface [ #resize := value ]