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 |
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, Word64)
- 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
- 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 Word64
- setVideoInfoSize :: MonadIO m => VideoInfo -> Word64 -> 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 | |
TypedObject VideoInfo Source # | |
Defined in GI.GstVideo.Structs.VideoInfo | |
HasParentTypes VideoInfo Source # | |
Defined in GI.GstVideo.Structs.VideoInfo | |
tag ~ 'AttrSet => Constructible VideoInfo tag Source # | |
Defined in GI.GstVideo.Structs.VideoInfo | |
IsGValue (Maybe VideoInfo) Source # | Convert |
Defined in GI.GstVideo.Structs.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
:: (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
:: (HasCallStack, MonadIO m) | |
=> VideoInfo |
|
-> VideoAlignment |
|
-> m (Bool, Word64) | 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
:: (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
:: (HasCallStack, MonadIO m) | |
=> VideoInfo |
|
-> m VideoInfo | Returns: a new |
Copy a GstVideoInfo structure.
Since: 1.6
free
:: (HasCallStack, MonadIO m) | |
=> VideoInfo |
|
-> m () |
Free a GstVideoInfo structure previously allocated with videoInfoNew
or videoInfoCopy
.
Since: 1.6
fromCaps
:: (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
Compares two VideoInfo
and returns whether they are equal or not
new
:: (HasCallStack, MonadIO m) | |
=> m VideoInfo | Returns: a new |
Allocate a new VideoInfo
that is also initialized with
videoInfoInit
.
Since: 1.6
setFormat
:: (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 #
:: (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
:: (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
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 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
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 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
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 ]