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

GI.GstVideo.Structs.VideoMeta

Description

Extra buffer metadata describing image properties

This meta can also be used by downstream elements to specifiy their buffer layout requirements for upstream. Upstream should try to fit those requirements, if possible, in order to prevent buffer copies.

This is done by passing a custom Structure to queryAddAllocationMeta when handling the ALLOCATION query. This structure should be named 'video-meta' and can have the following fields:

  • padding-top (uint): extra pixels on the top
  • padding-bottom (uint): extra pixels on the bottom
  • padding-left (uint): extra pixels on the left side
  • padding-right (uint): extra pixels on the right side

The padding fields have the same semantic as VideoMeta.alignment and so represent the paddings requested on produced video buffers.

Synopsis

Exported types

newtype VideoMeta Source #

Memory-managed wrapper type.

Constructors

VideoMeta (ManagedPtr VideoMeta) 

Instances

Instances details
Eq VideoMeta Source # 
Instance details

Defined in GI.GstVideo.Structs.VideoMeta

BoxedPtr VideoMeta Source # 
Instance details

Defined in GI.GstVideo.Structs.VideoMeta

CallocPtr VideoMeta Source # 
Instance details

Defined in GI.GstVideo.Structs.VideoMeta

ManagedPtrNewtype VideoMeta Source # 
Instance details

Defined in GI.GstVideo.Structs.VideoMeta

Methods

toManagedPtr :: VideoMeta -> ManagedPtr VideoMeta

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

Defined in GI.GstVideo.Structs.VideoMeta

Methods

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

newZeroVideoMeta :: MonadIO m => m VideoMeta Source #

Construct a VideoMeta struct initialized to zero.

Methods

Click to display all available methods, including inherited ones

Expand

Methods

map, unmap.

Getters

None.

Setters

setAlignment.

getInfo

videoMetaGetInfo :: (HasCallStack, MonadIO m) => m MetaInfo Source #

No description available in the introspection data.

map

videoMetaMap Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> VideoMeta

meta: a VideoMeta

-> Word32

plane: a plane

-> MapInfo

info: a MapInfo

-> [MapFlags]

flags: gstMapFlags

-> m (Bool, Ptr (), Int32)

Returns: TRUE if the map operation was successful.

Map the video plane with index plane in meta and return a pointer to the first byte of the plane and the stride of the plane.

setAlignment

videoMetaSetAlignment Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> VideoMeta

meta: a VideoMeta

-> VideoAlignment

alignment: a VideoAlignment

-> m Bool

Returns: True if alignment's meta has been updated, False if not

Set the alignment of meta to alignment. This function checks that the paddings defined in alignment are compatible with the strides defined in meta and will fail to update if they are not.

Since: 1.18

unmap

videoMetaUnmap Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> VideoMeta

meta: a VideoMeta

-> Word32

plane: a plane

-> MapInfo

info: a MapInfo

-> m Bool

Returns: TRUE if the memory was successfully unmapped.

Unmap a previously mapped plane with videoMetaMap.

Properties

alignment

the paddings and alignment constraints of the video buffer. It is up to the caller of gst_buffer_add_video_meta_full() to set it using videoMetaSetAlignment, if they did not it defaults to no padding and no alignment. Since: 1.18

getVideoMetaAlignment :: MonadIO m => VideoMeta -> m VideoAlignment Source #

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

get videoMeta #alignment

buffer

the buffer this metadata belongs to

clearVideoMetaBuffer :: MonadIO m => VideoMeta -> m () Source #

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

clear #buffer

getVideoMetaBuffer :: MonadIO m => VideoMeta -> m (Maybe Buffer) Source #

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

get videoMeta #buffer

setVideoMetaBuffer :: MonadIO m => VideoMeta -> Ptr Buffer -> m () Source #

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

set videoMeta [ #buffer := value ]

flags

additional video flags

getVideoMetaFlags :: MonadIO m => VideoMeta -> m [VideoFrameFlags] Source #

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

get videoMeta #flags

setVideoMetaFlags :: MonadIO m => VideoMeta -> [VideoFrameFlags] -> m () Source #

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

set videoMeta [ #flags := value ]

format

the video format

getVideoMetaFormat :: MonadIO m => VideoMeta -> m VideoFormat Source #

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

get videoMeta #format

setVideoMetaFormat :: MonadIO m => VideoMeta -> VideoFormat -> m () Source #

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

set videoMeta [ #format := value ]

height

the video height

getVideoMetaHeight :: MonadIO m => VideoMeta -> m Word32 Source #

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

get videoMeta #height

setVideoMetaHeight :: MonadIO m => VideoMeta -> Word32 -> m () Source #

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

set videoMeta [ #height := value ]

id

identifier of the frame

getVideoMetaId :: MonadIO m => VideoMeta -> m Int32 Source #

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

get videoMeta #id

setVideoMetaId :: MonadIO m => VideoMeta -> Int32 -> m () Source #

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

set videoMeta [ #id := value ]

map

No description available in the introspection data.

clearVideoMetaMap :: MonadIO m => VideoMeta -> m () Source #

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

clear #map

getVideoMetaMap :: MonadIO m => VideoMeta -> m (Maybe VideoMetaMapFieldCallback) Source #

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

get videoMeta #map

setVideoMetaMap :: MonadIO m => VideoMeta -> FunPtr C_VideoMetaMapFieldCallback -> m () Source #

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

set videoMeta [ #map := value ]

meta

parent Meta

getVideoMetaMeta :: MonadIO m => VideoMeta -> m Meta Source #

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

get videoMeta #meta

nPlanes

the number of planes in the image

getVideoMetaNPlanes :: MonadIO m => VideoMeta -> m Word32 Source #

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

get videoMeta #nPlanes

setVideoMetaNPlanes :: MonadIO m => VideoMeta -> Word32 -> m () Source #

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

set videoMeta [ #nPlanes := value ]

unmap

No description available in the introspection data.

clearVideoMetaUnmap :: MonadIO m => VideoMeta -> m () Source #

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

clear #unmap

getVideoMetaUnmap :: MonadIO m => VideoMeta -> m (Maybe VideoMetaUnmapFieldCallback) Source #

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

get videoMeta #unmap

setVideoMetaUnmap :: MonadIO m => VideoMeta -> FunPtr C_VideoMetaUnmapFieldCallback -> m () Source #

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

set videoMeta [ #unmap := value ]

width

the video width

getVideoMetaWidth :: MonadIO m => VideoMeta -> m Word32 Source #

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

get videoMeta #width

setVideoMetaWidth :: MonadIO m => VideoMeta -> Word32 -> m () Source #

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

set videoMeta [ #width := value ]