Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- newtype VideoMeta = VideoMeta (ManagedPtr VideoMeta)
- newZeroVideoMeta :: MonadIO m => m VideoMeta
- videoMetaGetInfo :: (HasCallStack, MonadIO m) => m MetaInfo
- videoMetaMap :: (HasCallStack, MonadIO m) => VideoMeta -> Word32 -> MapInfo -> [MapFlags] -> m (Bool, Ptr (), Int32)
- videoMetaSetAlignment :: (HasCallStack, MonadIO m) => VideoMeta -> VideoAlignment -> m Bool
- videoMetaUnmap :: (HasCallStack, MonadIO m) => VideoMeta -> Word32 -> MapInfo -> m Bool
- getVideoMetaAlignment :: MonadIO m => VideoMeta -> m VideoAlignment
- clearVideoMetaBuffer :: MonadIO m => VideoMeta -> m ()
- getVideoMetaBuffer :: MonadIO m => VideoMeta -> m (Maybe Buffer)
- setVideoMetaBuffer :: MonadIO m => VideoMeta -> Ptr Buffer -> m ()
- getVideoMetaFlags :: MonadIO m => VideoMeta -> m [VideoFrameFlags]
- setVideoMetaFlags :: MonadIO m => VideoMeta -> [VideoFrameFlags] -> m ()
- getVideoMetaFormat :: MonadIO m => VideoMeta -> m VideoFormat
- setVideoMetaFormat :: MonadIO m => VideoMeta -> VideoFormat -> m ()
- getVideoMetaHeight :: MonadIO m => VideoMeta -> m Word32
- setVideoMetaHeight :: MonadIO m => VideoMeta -> Word32 -> m ()
- getVideoMetaId :: MonadIO m => VideoMeta -> m Int32
- setVideoMetaId :: MonadIO m => VideoMeta -> Int32 -> m ()
- clearVideoMetaMap :: MonadIO m => VideoMeta -> m ()
- getVideoMetaMap :: MonadIO m => VideoMeta -> m (Maybe VideoMetaMapFieldCallback)
- setVideoMetaMap :: MonadIO m => VideoMeta -> FunPtr C_VideoMetaMapFieldCallback -> m ()
- getVideoMetaMeta :: MonadIO m => VideoMeta -> m Meta
- getVideoMetaNPlanes :: MonadIO m => VideoMeta -> m Word32
- setVideoMetaNPlanes :: MonadIO m => VideoMeta -> Word32 -> m ()
- clearVideoMetaUnmap :: MonadIO m => VideoMeta -> m ()
- getVideoMetaUnmap :: MonadIO m => VideoMeta -> m (Maybe VideoMetaUnmapFieldCallback)
- setVideoMetaUnmap :: MonadIO m => VideoMeta -> FunPtr C_VideoMetaUnmapFieldCallback -> m ()
- getVideoMetaWidth :: MonadIO m => VideoMeta -> m Word32
- setVideoMetaWidth :: MonadIO m => VideoMeta -> Word32 -> m ()
Exported types
Memory-managed wrapper type.
Instances
Eq VideoMeta Source # | |
BoxedPtr VideoMeta Source # | |
Defined in GI.GstVideo.Structs.VideoMeta boxedPtrCopy :: VideoMeta -> IO VideoMeta boxedPtrFree :: VideoMeta -> IO () | |
CallocPtr VideoMeta Source # | |
Defined in GI.GstVideo.Structs.VideoMeta boxedPtrCalloc :: IO (Ptr VideoMeta) | |
ManagedPtrNewtype VideoMeta Source # | |
Defined in GI.GstVideo.Structs.VideoMeta toManagedPtr :: VideoMeta -> ManagedPtr VideoMeta | |
tag ~ 'AttrSet => Constructible VideoMeta tag Source # | |
newZeroVideoMeta :: MonadIO m => m VideoMeta Source #
Construct a VideoMeta
struct initialized to zero.
Methods
Click to display all available methods, including inherited ones
getInfo
videoMetaGetInfo :: (HasCallStack, MonadIO m) => m MetaInfo Source #
No description available in the introspection data.
map
:: (HasCallStack, MonadIO m) | |
=> VideoMeta |
|
-> Word32 |
|
-> MapInfo |
|
-> [MapFlags] |
|
-> 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 #
:: (HasCallStack, MonadIO m) | |
=> VideoMeta |
|
-> VideoAlignment |
|
-> m Bool | Returns: |
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
:: (HasCallStack, MonadIO m) | |
=> VideoMeta |
|
-> Word32 |
|
-> 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 ]