gi-gstvideo-1.0.28: GStreamerVideo bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.GstVideo.Callbacks

Description

 
Synopsis

Signals

VideoAffineTransformationGetMatrix

type C_VideoAffineTransformationGetMatrix = Ptr VideoAffineTransformationMeta -> CFloat -> IO CInt Source #

Type for the callback on the (unwrapped) C side.

type VideoAffineTransformationGetMatrix = VideoAffineTransformationMeta -> Float -> IO Bool Source #

No description available in the introspection data.

dynamic_VideoAffineTransformationGetMatrix :: (HasCallStack, MonadIO m) => FunPtr C_VideoAffineTransformationGetMatrix -> VideoAffineTransformationMeta -> Float -> m Bool Source #

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

VideoConvertSampleCallback

type C_VideoConvertSampleCallback = Ptr Sample -> Ptr GError -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type VideoConvertSampleCallback = Sample -> GError -> IO () Source #

No description available in the introspection data.

type VideoConvertSampleCallback_WithClosures = Sample -> GError -> Ptr () -> IO () Source #

No description available in the introspection data.

dynamic_VideoConvertSampleCallback :: (HasCallStack, MonadIO m) => FunPtr C_VideoConvertSampleCallback -> Sample -> GError -> Ptr () -> m () Source #

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

VideoFormatPack

type C_VideoFormatPack = Ptr VideoFormatInfo -> CUInt -> Ptr () -> Int32 -> Ptr () -> Int32 -> CUInt -> Int32 -> Int32 -> IO () Source #

Type for the callback on the (unwrapped) C side.

type VideoFormatPack Source #

Arguments

 = VideoFormatInfo

info: a VideoFormatInfo

-> [VideoPackFlags]

flags: flags to control the packing

-> Ptr ()

src: a source array

-> Int32

sstride: the source array stride

-> Ptr ()

data: pointers to the destination data planes

-> Int32

stride: strides of the destination planes

-> [VideoChromaSite]

chromaSite: the chroma siting of the target when subsampled (not used)

-> Int32

y: the y position in the image to pack to

-> Int32

width: the amount of pixels to pack.

-> IO () 

Packs width pixels from src to the given planes and strides in the format info. The pixels from source have each component interleaved and will be packed into the planes in data.

This function operates on pack_lines lines, meaning that src should contain at least pack_lines lines with a stride of sstride and y should be a multiple of pack_lines.

Subsampled formats will use the horizontally and vertically cosited component from the source. Subsampling should be performed before packing.

Because this function does not have a x coordinate, it is not possible to pack pixels starting from an unaligned position. For tiled images this means that packing should start from a tile coordinate. For subsampled formats this means that a complete pixel needs to be packed.

dynamic_VideoFormatPack Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_VideoFormatPack 
-> VideoFormatInfo

info: a VideoFormatInfo

-> [VideoPackFlags]

flags: flags to control the packing

-> Ptr ()

src: a source array

-> Int32

sstride: the source array stride

-> Ptr ()

data: pointers to the destination data planes

-> Int32

stride: strides of the destination planes

-> [VideoChromaSite]

chromaSite: the chroma siting of the target when subsampled (not used)

-> Int32

y: the y position in the image to pack to

-> Int32

width: the amount of pixels to pack.

-> m () 

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_VideoFormatPack :: MonadIO m => VideoFormatPack -> m (GClosure C_VideoFormatPack) Source #

Wrap the callback into a GClosure.

mk_VideoFormatPack :: C_VideoFormatPack -> IO (FunPtr C_VideoFormatPack) Source #

Generate a function pointer callable from C code, from a C_VideoFormatPack.

VideoFormatUnpack

type C_VideoFormatUnpack = Ptr VideoFormatInfo -> CUInt -> Ptr () -> Ptr () -> Int32 -> Int32 -> Int32 -> Int32 -> IO () Source #

Type for the callback on the (unwrapped) C side.

type VideoFormatUnpack Source #

Arguments

 = VideoFormatInfo

info: a VideoFormatInfo

-> [VideoPackFlags]

flags: flags to control the unpacking

-> Ptr ()

dest: a destination array

-> Ptr ()

data: pointers to the data planes

-> Int32

stride: strides of the planes

-> Int32

x: the x position in the image to start from

-> Int32

y: the y position in the image to start from

-> Int32

width: the amount of pixels to unpack.

-> IO () 

Unpacks width pixels from the given planes and strides containing data of format info. The pixels will be unpacked into dest with each component interleaved as per info's unpack_format, which will usually be one of GST_VIDEO_FORMAT_ARGB, GST_VIDEO_FORMAT_AYUV, GST_VIDEO_FORMAT_ARGB64 or GST_VIDEO_FORMAT_AYUV64 depending on the format to unpack. dest should at least be big enough to hold width * bytes_per_pixel bytes where bytes_per_pixel relates to the unpack format and will usually be either 4 or 8 depending on the unpack format. bytes_per_pixel will be the same as the pixel stride for plane 0 for the above formats.

For subsampled formats, the components will be duplicated in the destination array. Reconstruction of the missing components can be performed in a separate step after unpacking.

dynamic_VideoFormatUnpack Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_VideoFormatUnpack 
-> VideoFormatInfo

info: a VideoFormatInfo

-> [VideoPackFlags]

flags: flags to control the unpacking

-> Ptr ()

dest: a destination array

-> Ptr ()

data: pointers to the data planes

-> Int32

stride: strides of the planes

-> Int32

x: the x position in the image to start from

-> Int32

y: the y position in the image to start from

-> Int32

width: the amount of pixels to unpack.

-> m () 

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_VideoFormatUnpack :: MonadIO m => VideoFormatUnpack -> m (GClosure C_VideoFormatUnpack) Source #

Wrap the callback into a GClosure.

mk_VideoFormatUnpack :: C_VideoFormatUnpack -> IO (FunPtr C_VideoFormatUnpack) Source #

Generate a function pointer callable from C code, from a C_VideoFormatUnpack.

VideoGLTextureUpload

type C_VideoGLTextureUpload = Ptr VideoGLTextureUploadMeta -> Word32 -> IO CInt Source #

Type for the callback on the (unwrapped) C side.

type VideoGLTextureUpload = VideoGLTextureUploadMeta -> Word32 -> IO Bool Source #

No description available in the introspection data.

dynamic_VideoGLTextureUpload :: (HasCallStack, MonadIO m) => FunPtr C_VideoGLTextureUpload -> VideoGLTextureUploadMeta -> Word32 -> m Bool Source #

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_VideoGLTextureUpload :: MonadIO m => VideoGLTextureUpload -> m (GClosure C_VideoGLTextureUpload) Source #

Wrap the callback into a GClosure.

mk_VideoGLTextureUpload :: C_VideoGLTextureUpload -> IO (FunPtr C_VideoGLTextureUpload) Source #

Generate a function pointer callable from C code, from a C_VideoGLTextureUpload.

VideoMetaMapFieldCallback

type C_VideoMetaMapFieldCallback = Ptr VideoMeta -> Word32 -> Ptr MapInfo -> Ptr () -> Int32 -> CUInt -> IO CInt Source #

Type for the callback on the (unwrapped) C side.

type VideoMetaMapFieldCallback = VideoMeta -> Word32 -> MapInfo -> Ptr () -> Int32 -> [MapFlags] -> IO Bool Source #

No description available in the introspection data.

dynamic_VideoMetaMapFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_VideoMetaMapFieldCallback -> VideoMeta -> Word32 -> MapInfo -> Ptr () -> Int32 -> [MapFlags] -> m Bool Source #

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

VideoMetaUnmapFieldCallback

type C_VideoMetaUnmapFieldCallback = Ptr VideoMeta -> Word32 -> Ptr MapInfo -> IO CInt Source #

Type for the callback on the (unwrapped) C side.

type VideoMetaUnmapFieldCallback = VideoMeta -> Word32 -> MapInfo -> IO Bool Source #

No description available in the introspection data.

dynamic_VideoMetaUnmapFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_VideoMetaUnmapFieldCallback -> VideoMeta -> Word32 -> MapInfo -> m Bool Source #

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.