| 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 |
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
- newtype VideoInfo = VideoInfo (ManagedPtr VideoInfo)
- newZeroVideoInfo :: MonadIO m => m VideoInfo
- videoInfoAlign :: (HasCallStack, MonadIO m) => VideoInfo -> VideoAlignment -> m Bool
- videoInfoAlignFull :: (HasCallStack, MonadIO m) => VideoInfo -> VideoAlignment -> m (Bool, CSize)
- videoInfoConvert :: (HasCallStack, MonadIO m) => VideoInfo -> Format -> Int64 -> Format -> m (Bool, Int64)
- videoInfoCopy :: (HasCallStack, MonadIO m) => VideoInfo -> m VideoInfo
- videoInfoFree :: (HasCallStack, MonadIO m) => VideoInfo -> m ()
- videoInfoFromCaps :: (HasCallStack, MonadIO m) => Caps -> m (Bool, VideoInfo)
- videoInfoInit :: (HasCallStack, MonadIO m) => m VideoInfo
- videoInfoIsEqual :: (HasCallStack, MonadIO m) => VideoInfo -> VideoInfo -> m Bool
- videoInfoNew :: (HasCallStack, MonadIO m) => m VideoInfo
- videoInfoNewFromCaps :: (HasCallStack, MonadIO m) => Caps -> m (Maybe VideoInfo)
- videoInfoSetFormat :: (HasCallStack, MonadIO m) => VideoInfo -> VideoFormat -> Word32 -> Word32 -> m Bool
- videoInfoSetInterlacedFormat :: (HasCallStack, MonadIO m) => VideoInfo -> VideoFormat -> VideoInterlaceMode -> Word32 -> Word32 -> m Bool
- videoInfoToCaps :: (HasCallStack, MonadIO m) => VideoInfo -> m Caps
- getVideoInfoChromaSite :: MonadIO m => VideoInfo -> m [VideoChromaSite]
- setVideoInfoChromaSite :: MonadIO m => VideoInfo -> [VideoChromaSite] -> m ()
- getVideoInfoColorimetry :: MonadIO m => VideoInfo -> m VideoColorimetry
- clearVideoInfoFinfo :: MonadIO m => VideoInfo -> m ()
- getVideoInfoFinfo :: MonadIO m => VideoInfo -> m (Maybe VideoFormatInfo)
- setVideoInfoFinfo :: MonadIO m => VideoInfo -> Ptr VideoFormatInfo -> m ()
- getVideoInfoFlags :: MonadIO m => VideoInfo -> m [VideoFlags]
- setVideoInfoFlags :: MonadIO m => VideoInfo -> [VideoFlags] -> m ()
- getVideoInfoFpsD :: MonadIO m => VideoInfo -> m Int32
- setVideoInfoFpsD :: MonadIO m => VideoInfo -> Int32 -> m ()
- getVideoInfoFpsN :: MonadIO m => VideoInfo -> m Int32
- setVideoInfoFpsN :: MonadIO m => VideoInfo -> Int32 -> m ()
- getVideoInfoHeight :: MonadIO m => VideoInfo -> m Int32
- setVideoInfoHeight :: MonadIO m => VideoInfo -> Int32 -> m ()
- getVideoInfoInterlaceMode :: MonadIO m => VideoInfo -> m VideoInterlaceMode
- setVideoInfoInterlaceMode :: MonadIO m => VideoInfo -> VideoInterlaceMode -> m ()
- getVideoInfoParD :: MonadIO m => VideoInfo -> m Int32
- setVideoInfoParD :: MonadIO m => VideoInfo -> Int32 -> m ()
- getVideoInfoParN :: MonadIO m => VideoInfo -> m Int32
- setVideoInfoParN :: MonadIO m => VideoInfo -> Int32 -> m ()
- getVideoInfoSize :: MonadIO m => VideoInfo -> m CSize
- setVideoInfoSize :: MonadIO m => VideoInfo -> CSize -> m ()
- getVideoInfoViews :: MonadIO m => VideoInfo -> m Int32
- setVideoInfoViews :: MonadIO m => VideoInfo -> Int32 -> m ()
- getVideoInfoWidth :: MonadIO m => VideoInfo -> m Int32
- setVideoInfoWidth :: MonadIO m => VideoInfo -> Int32 -> m ()
Exported types
Memory-managed wrapper type.
Instances
| Eq VideoInfo Source # | |
| GBoxed VideoInfo Source # | |
Defined in GI.GstVideo.Structs.VideoInfo | |
| ManagedPtrNewtype VideoInfo Source # | |
Defined in GI.GstVideo.Structs.VideoInfo Methods toManagedPtr :: VideoInfo -> ManagedPtr VideoInfo | |
| TypedObject VideoInfo Source # | |
Defined in GI.GstVideo.Structs.VideoInfo | |
| HasParentTypes VideoInfo Source # | |
Defined in GI.GstVideo.Structs.VideoInfo | |
| tag ~ 'AttrSet => Constructible VideoInfo tag Source # | |
| IsGValue (Maybe VideoInfo) Source # | Convert |
Defined in GI.GstVideo.Structs.VideoInfo Methods gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe VideoInfo -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe VideoInfo) | |
| type ParentTypes VideoInfo Source # | |
Defined in GI.GstVideo.Structs.VideoInfo | |
newZeroVideoInfo :: MonadIO m => m VideoInfo Source #
Construct a VideoInfo struct initialized to zero.
Methods
Click to display all available methods, including inherited ones
align
Arguments
| :: (HasCallStack, MonadIO m) | |
| => VideoInfo |
|
| -> VideoAlignment |
|
| -> m Bool | Returns: |
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.
alignFull
Arguments
| :: (HasCallStack, MonadIO m) | |
| => VideoInfo |
|
| -> VideoAlignment |
|
| -> m (Bool, CSize) | Returns: |
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.
This variant of videoInfoAlign provides the updated size, in bytes,
of each video plane after the alignment, including all horizontal and vertical
paddings.
In case of GST_VIDEO_INTERLACE_MODE_ALTERNATE info, the returned sizes are the ones used to hold a single field, not the full frame.
Since: 1.18
convert
Arguments
| :: (HasCallStack, MonadIO m) | |
| => VideoInfo |
|
| -> Format |
|
| -> Int64 |
|
| -> Format |
|
| -> 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
Arguments
| :: (HasCallStack, MonadIO m) | |
| => VideoInfo |
|
| -> m VideoInfo | Returns: a new |
Copy a GstVideoInfo structure.
Since: 1.6
free
Arguments
| :: (HasCallStack, MonadIO m) | |
| => VideoInfo |
|
| -> m () |
Free a GstVideoInfo structure previously allocated with videoInfoNew
or videoInfoCopy.
Since: 1.6
fromCaps
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Caps |
|
| -> m (Bool, VideoInfo) | Returns: TRUE if |
Parse caps and update info.
init
videoInfoInit :: (HasCallStack, MonadIO m) => m VideoInfo Source #
Initialize info with default values.
isEqual
Arguments
| :: (HasCallStack, MonadIO m) | |
| => VideoInfo |
|
| -> VideoInfo |
|
| -> m Bool |
Compares two VideoInfo and returns whether they are equal or not
new
Arguments
| :: (HasCallStack, MonadIO m) | |
| => m VideoInfo | Returns: a new |
Allocate a new VideoInfo that is also initialized with
videoInfoInit.
Since: 1.6
newFromCaps
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Caps |
|
| -> m (Maybe VideoInfo) |
Parse caps to generate a VideoInfo.
Since: 1.20
setFormat
Arguments
| :: (HasCallStack, MonadIO m) | |
| => VideoInfo |
|
| -> VideoFormat |
|
| -> Word32 |
|
| -> Word32 |
|
| -> m Bool | Returns: |
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 |
|
| -> VideoFormat |
|
| -> VideoInterlaceMode |
|
| -> Word32 |
|
| -> Word32 |
|
| -> m Bool | Returns: |
Same as gst_video_info_set_format but also allowing to set the interlaced
mode.
Since: 1.16
toCaps
Arguments
| :: (HasCallStack, MonadIO m) | |
| => VideoInfo |
|
| -> m Caps | Returns: a new |
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
setvideoInfo [ #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
setvideoInfo [ #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
setvideoInfo [ #flags:=value ]
fpsD
the framerate denominator
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
setvideoInfo [ #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
setvideoInfo [ #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
setvideoInfo [ #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
setvideoInfo [ #interlaceMode:=value ]
parD
the pixel-aspect-ratio denominator
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
setvideoInfo [ #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
setvideoInfo [ #parN:=value ]
size
the default size of one frame
getVideoInfoSize :: MonadIO m => VideoInfo -> m CSize Source #
Get the value of the “size” field.
When overloading is enabled, this is equivalent to
get videoInfo #size
setVideoInfoSize :: MonadIO m => VideoInfo -> CSize -> m () Source #
Set the value of the “size” field.
When overloading is enabled, this is equivalent to
setvideoInfo [ #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
setvideoInfo [ #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
setvideoInfo [ #width:=value ]