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

GI.GstVideo.Structs.VideoInfo

Description

Information describing image properties. This information can be filled in from GstCaps with videoInfoFromCaps. The information is also used to store the specific video info when mapping a video frame with videoFrameMap.

Use the provided macros to access the info in this structure.

Synopsis

Exported types

newtype VideoInfo Source #

Memory-managed wrapper type.

Instances

Instances details
Eq VideoInfo Source # 
Instance details

Defined in GI.GstVideo.Structs.VideoInfo

BoxedObject VideoInfo Source # 
Instance details

Defined in GI.GstVideo.Structs.VideoInfo

IsGValue VideoInfo Source #

Convert VideoInfo to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.GstVideo.Structs.VideoInfo

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

Defined in GI.GstVideo.Structs.VideoInfo

Methods

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

newZeroVideoInfo :: MonadIO m => m VideoInfo Source #

Construct a VideoInfo struct initialized to zero.

noVideoInfo :: Maybe VideoInfo Source #

A convenience alias for Nothing :: Maybe VideoInfo.

Methods

Overloaded methods

align

videoInfoAlign Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> VideoInfo

info: a VideoInfo

-> VideoAlignment

align: alignment parameters

-> m Bool

Returns: False if alignment could not be applied, e.g. because the size of a frame can't be represented as a 32 bit integer (Since: 1.12)

Adjust the offset and stride fields in info so that the padding and stride alignment in align is respected.

Extra padding will be added to the right side when stride alignment padding is required and align will be updated with the new padding values.

convert

videoInfoConvert Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> VideoInfo

info: a VideoInfo

-> Format

srcFormat: Format of the srcValue

-> Int64

srcValue: value to convert

-> Format

destFormat: Format of the destValue

-> m (Bool, Int64)

Returns: TRUE if the conversion was successful.

Converts among various Format types. This function handles GST_FORMAT_BYTES, GST_FORMAT_TIME, and GST_FORMAT_DEFAULT. For raw video, GST_FORMAT_DEFAULT corresponds to video frames. This function can be used to handle pad queries of the type GST_QUERY_CONVERT.

copy

videoInfoCopy Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> VideoInfo

info: a VideoInfo

-> m VideoInfo

Returns: a new VideoInfo. free with gst_video_info_free.

Copy a GstVideoInfo structure.

Since: 1.6

free

videoInfoFree Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> VideoInfo

info: a VideoInfo

-> m () 

Free a GstVideoInfo structure previously allocated with videoInfoNew or videoInfoCopy.

Since: 1.6

fromCaps

videoInfoFromCaps Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> VideoInfo

info: a VideoInfo

-> Caps

caps: a Caps

-> m Bool

Returns: TRUE if caps could be parsed

Parse caps and update info.

init

videoInfoInit Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> VideoInfo

info: a VideoInfo

-> m () 

Initialize info with default values.

isEqual

videoInfoIsEqual Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> VideoInfo

info: a VideoInfo

-> VideoInfo

other: a VideoInfo

-> m Bool

Returns: True if info and other are equal, else False.

Compares two VideoInfo and returns whether they are equal or not

new

videoInfoNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m VideoInfo

Returns: a new VideoInfo. free with videoInfoFree.

Allocate a new VideoInfo that is also initialized with videoInfoInit.

Since: 1.6

setFormat

videoInfoSetFormat Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> VideoInfo

info: a VideoInfo

-> VideoFormat

format: the format

-> Word32

width: a width

-> Word32

height: a height

-> m Bool

Returns: False if the returned video info is invalid, e.g. because the size of a frame can't be represented as a 32 bit integer (Since: 1.12)

Set the default info for a video frame of format and width and height.

Note: This initializes info first, no values are preserved. This function does not set the offsets correctly for interlaced vertically subsampled formats.

setInterlacedFormat

videoInfoSetInterlacedFormat Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> VideoInfo

info: a VideoInfo

-> VideoFormat

format: the format

-> VideoInterlaceMode

mode: a VideoInterlaceMode

-> Word32

width: a width

-> Word32

height: a height

-> m Bool

Returns: False if the returned video info is invalid, e.g. because the size of a frame can't be represented as a 32 bit integer.

Same as gst_video_info_set_format but also allowing to set the interlaced mode.

Since: 1.16

toCaps

videoInfoToCaps Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> VideoInfo

info: a VideoInfo

-> m Caps

Returns: a new Caps containing the info of info.

Convert the values of info into a Caps.

Properties

chromaSite

getVideoInfoChromaSite :: MonadIO m => VideoInfo -> m [VideoChromaSite] Source #

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

get videoInfo #chromaSite

setVideoInfoChromaSite :: MonadIO m => VideoInfo -> [VideoChromaSite] -> m () Source #

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

set videoInfo [ #chromaSite := value ]

colorimetry

the colorimetry info

getVideoInfoColorimetry :: MonadIO m => VideoInfo -> m VideoColorimetry Source #

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

get videoInfo #colorimetry

finfo

the format info of the video

clearVideoInfoFinfo :: MonadIO m => VideoInfo -> m () Source #

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

clear #finfo

getVideoInfoFinfo :: MonadIO m => VideoInfo -> m (Maybe VideoFormatInfo) Source #

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

get videoInfo #finfo

setVideoInfoFinfo :: MonadIO m => VideoInfo -> Ptr VideoFormatInfo -> m () Source #

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

set videoInfo [ #finfo := value ]

flags

additional video flags

getVideoInfoFlags :: MonadIO m => VideoInfo -> m [VideoFlags] Source #

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

get videoInfo #flags

setVideoInfoFlags :: MonadIO m => VideoInfo -> [VideoFlags] -> m () Source #

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

set videoInfo [ #flags := value ]

fpsD

the framerate demnominator

getVideoInfoFpsD :: MonadIO m => VideoInfo -> m Int32 Source #

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

get videoInfo #fpsD

setVideoInfoFpsD :: MonadIO m => VideoInfo -> Int32 -> m () Source #

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

set videoInfo [ #fpsD := value ]

fpsN

the framerate numerator

getVideoInfoFpsN :: MonadIO m => VideoInfo -> m Int32 Source #

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

get videoInfo #fpsN

setVideoInfoFpsN :: MonadIO m => VideoInfo -> Int32 -> m () Source #

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

set videoInfo [ #fpsN := value ]

height

the height of the video

getVideoInfoHeight :: MonadIO m => VideoInfo -> m Int32 Source #

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

get videoInfo #height

setVideoInfoHeight :: MonadIO m => VideoInfo -> Int32 -> m () Source #

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

set videoInfo [ #height := value ]

interlaceMode

the interlace mode

getVideoInfoInterlaceMode :: MonadIO m => VideoInfo -> m VideoInterlaceMode Source #

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

get videoInfo #interlaceMode

setVideoInfoInterlaceMode :: MonadIO m => VideoInfo -> VideoInterlaceMode -> m () Source #

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

set videoInfo [ #interlaceMode := value ]

parD

the pixel-aspect-ratio demnominator

getVideoInfoParD :: MonadIO m => VideoInfo -> m Int32 Source #

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

get videoInfo #parD

setVideoInfoParD :: MonadIO m => VideoInfo -> Int32 -> m () Source #

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

set videoInfo [ #parD := value ]

parN

the pixel-aspect-ratio numerator

getVideoInfoParN :: MonadIO m => VideoInfo -> m Int32 Source #

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

get videoInfo #parN

setVideoInfoParN :: MonadIO m => VideoInfo -> Int32 -> m () Source #

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

set videoInfo [ #parN := value ]

size

the default size of one frame

getVideoInfoSize :: MonadIO m => VideoInfo -> m Word64 Source #

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

get videoInfo #size

setVideoInfoSize :: MonadIO m => VideoInfo -> Word64 -> m () Source #

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

set videoInfo [ #size := value ]

views

the number of views for multiview video

getVideoInfoViews :: MonadIO m => VideoInfo -> m Int32 Source #

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

get videoInfo #views

setVideoInfoViews :: MonadIO m => VideoInfo -> Int32 -> m () Source #

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

set videoInfo [ #views := value ]

width

the width of the video

getVideoInfoWidth :: MonadIO m => VideoInfo -> m Int32 Source #

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

get videoInfo #width

setVideoInfoWidth :: MonadIO m => VideoInfo -> Int32 -> m () Source #

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

set videoInfo [ #width := value ]