gi-gstbase-1.0.13: GStreamerBase 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.GstBase.Structs.BitReader

Contents

Description

BitReader provides a bit reader that can read any number of bits from a memory buffer. It provides functions for reading any number of bits into 8, 16, 32 and 64 bit variables.

Synopsis

Exported types

newtype BitReader Source #

Instances

WrappedPtr BitReader Source # 
(~) AttrOpTag tag AttrSet => Constructible BitReader tag Source # 

Methods

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

((~) * info (ResolveBitReaderMethod t BitReader), MethodInfo * info BitReader p) => IsLabel t (BitReader -> p) Source # 

Methods

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

((~) * info (ResolveBitReaderMethod t BitReader), MethodInfo * info BitReader p) => IsLabelProxy t (BitReader -> p) Source # 

Methods

fromLabelProxy :: Proxy Symbol t -> BitReader -> p #

HasAttributeList * BitReader Source # 
((~) * signature (m Bool), MonadIO m) => MethodInfo * BitReaderSkipToByteMethodInfo BitReader signature Source # 
((~) * signature (Word32 -> m Bool), MonadIO m) => MethodInfo * BitReaderSkipMethodInfo BitReader signature Source # 
((~) * signature (Word32 -> m Bool), MonadIO m) => MethodInfo * BitReaderSetPosMethodInfo BitReader signature Source # 
((~) * signature (Word32 -> m (Bool, Word8)), MonadIO m) => MethodInfo * BitReaderPeekBitsUint8MethodInfo BitReader signature Source # 
((~) * signature (Word32 -> m (Bool, Word64)), MonadIO m) => MethodInfo * BitReaderPeekBitsUint64MethodInfo BitReader signature Source # 
((~) * signature (Word32 -> m (Bool, Word32)), MonadIO m) => MethodInfo * BitReaderPeekBitsUint32MethodInfo BitReader signature Source # 
((~) * signature (Word32 -> m (Bool, Word16)), MonadIO m) => MethodInfo * BitReaderPeekBitsUint16MethodInfo BitReader signature Source # 
((~) * signature (ByteString -> m ()), MonadIO m) => MethodInfo * BitReaderInitMethodInfo BitReader signature Source # 
((~) * signature (m Word32), MonadIO m) => MethodInfo * BitReaderGetSizeMethodInfo BitReader signature Source # 
((~) * signature (m Word32), MonadIO m) => MethodInfo * BitReaderGetRemainingMethodInfo BitReader signature Source # 
((~) * signature (m Word32), MonadIO m) => MethodInfo * BitReaderGetPosMethodInfo BitReader signature Source # 
((~) * signature (Word32 -> m (Bool, Word8)), MonadIO m) => MethodInfo * BitReaderGetBitsUint8MethodInfo BitReader signature Source # 
((~) * signature (Word32 -> m (Bool, Word64)), MonadIO m) => MethodInfo * BitReaderGetBitsUint64MethodInfo BitReader signature Source # 
((~) * signature (Word32 -> m (Bool, Word32)), MonadIO m) => MethodInfo * BitReaderGetBitsUint32MethodInfo BitReader signature Source # 
((~) * signature (Word32 -> m (Bool, Word16)), MonadIO m) => MethodInfo * BitReaderGetBitsUint16MethodInfo BitReader signature Source # 
((~) * signature (m ()), MonadIO m) => MethodInfo * BitReaderFreeMethodInfo BitReader signature Source # 
type AttributeList BitReader Source # 

newZeroBitReader :: MonadIO m => m BitReader Source #

Construct a BitReader struct initialized to zero.

Methods

free

bitReaderFree Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BitReader

reader: a BitReader instance

-> m () 

Frees a BitReader instance, which was previously allocated by gst_bit_reader_new().

getBitsUint16

bitReaderGetBitsUint16 Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BitReader

reader: a BitReader instance

-> Word32

nbits: number of bits to read

-> m (Bool, Word16)

Returns: True if successful, False otherwise.

Read nbits bits into val and update the current position.

getBitsUint32

bitReaderGetBitsUint32 Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BitReader

reader: a BitReader instance

-> Word32

nbits: number of bits to read

-> m (Bool, Word32)

Returns: True if successful, False otherwise.

Read nbits bits into val and update the current position.

getBitsUint64

bitReaderGetBitsUint64 Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BitReader

reader: a BitReader instance

-> Word32

nbits: number of bits to read

-> m (Bool, Word64)

Returns: True if successful, False otherwise.

Read nbits bits into val and update the current position.

getBitsUint8

bitReaderGetBitsUint8 Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BitReader

reader: a BitReader instance

-> Word32

nbits: number of bits to read

-> m (Bool, Word8)

Returns: True if successful, False otherwise.

Read nbits bits into val and update the current position.

getPos

bitReaderGetPos Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BitReader

reader: a BitReader instance

-> m Word32

Returns: The current position of reader in bits.

Returns the current position of a BitReader instance in bits.

getRemaining

bitReaderGetRemaining Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BitReader

reader: a BitReader instance

-> m Word32

Returns: The remaining number of bits of reader instance.

Returns the remaining number of bits of a BitReader instance.

getSize

bitReaderGetSize Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BitReader

reader: a BitReader instance

-> m Word32

Returns: The total number of bits of reader instance.

Returns the total number of bits of a BitReader instance.

init

bitReaderInit Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BitReader

reader: a BitReader instance

-> ByteString

data: data from which the bit reader should read

-> m () 

Initializes a BitReader instance to read from data. This function can be called on already initialized instances.

peekBitsUint16

bitReaderPeekBitsUint16 Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BitReader

reader: a BitReader instance

-> Word32

nbits: number of bits to read

-> m (Bool, Word16)

Returns: True if successful, False otherwise.

Read nbits bits into val but keep the current position.

peekBitsUint32

bitReaderPeekBitsUint32 Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BitReader

reader: a BitReader instance

-> Word32

nbits: number of bits to read

-> m (Bool, Word32)

Returns: True if successful, False otherwise.

Read nbits bits into val but keep the current position.

peekBitsUint64

bitReaderPeekBitsUint64 Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BitReader

reader: a BitReader instance

-> Word32

nbits: number of bits to read

-> m (Bool, Word64)

Returns: True if successful, False otherwise.

Read nbits bits into val but keep the current position.

peekBitsUint8

bitReaderPeekBitsUint8 Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BitReader

reader: a BitReader instance

-> Word32

nbits: number of bits to read

-> m (Bool, Word8)

Returns: True if successful, False otherwise.

Read nbits bits into val but keep the current position.

setPos

bitReaderSetPos Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BitReader

reader: a BitReader instance

-> Word32

pos: The new position in bits

-> m Bool

Returns: True if the position could be set successfully, False otherwise.

Sets the new position of a BitReader instance to pos in bits.

skip

bitReaderSkip Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BitReader

reader: a BitReader instance

-> Word32

nbits: the number of bits to skip

-> m Bool

Returns: True if nbits bits could be skipped, False otherwise.

Skips nbits bits of the BitReader instance.

skipToByte

bitReaderSkipToByte Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BitReader

reader: a BitReader instance

-> m Bool

Returns: True if successful, False otherwise.

Skips until the next byte.

Properties

bit

byte

size