Class (GI Struct)

GstVideo-1.0GstVideoVideoInfo

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

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

Index

Constructors

  • Parameters

    • Optionalproperties: Partial<
          {
              chroma_site: GstVideo.VideoChromaSite;
              colorimetry: VideoColorimetry;
              flags: GstVideo.VideoFlags;
              fps_d: number;
              fps_n: number;
              height: number;
              interlace_mode: GstVideo.VideoInterlaceMode;
              offset: number[];
              par_d: number;
              par_n: number;
              size: number;
              stride: number[];
              views: number;
              width: number;
          },
      >

    Returns VideoInfo

Properties

fps_d: number
fps_n: number
height: number
offset: number[]
par_d: number
par_n: number
size: number
stride: number[]
views: number
width: number
$gtype: GType<VideoInfo>

Methods

  • 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.

    Parameters

    Returns boolean

    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)

  • 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 gst_video_info_align() 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.

    Parameters

    Returns [boolean, number]

    false if alignment could not be applied, e.g. because the size of a frame can't be represented as a 32 bit integer

  • Converts among various Gst.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.

    Parameters

    Returns [boolean, number]

    TRUE if the conversion was successful.

  • 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.

    Parameters

    Returns boolean

    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)