Class (GI Struct)

GstVideo-1.0GstVideoVideoMetaTransformMatrixSince 1.28

Extra data passed to a video transform Gst.MetaTransformFunction such as: "gst-video-matrix".

The matrix represents a transformation that is applied to the content of in_rectangle, and its output is put inside out_rectangle. The coordinate system has it's (0, 0) in the top-left corner of the rectangles and goes down and right from there..

It's a programming error to have a singular matrix.

1.28

Index
in_rectangle: VideoRectangle
matrix: number[]
out_rectangle: VideoRectangle
  • Transforms the (x, y) point from the input coordinates to the output ones. The point's coordinates are transformed by first applying the transform.matrix to it using the top left (x, y) of transform.in_rectangle as the origin, then translate it to use the top-left of transform.out_rectangle as new origin.

    Parameters

    • x: number

      a non-NULL pointer to the X value of the coordinate

    • y: number

      a non-NULL pointer to the Y value of the coordinate

    Returns [boolean, number, number]

    false if the point is outside of transform.out_rectangle after the transformation has been applied

    1.28

  • Transforms the (x, y) point from the input coordinates to the output ones. The point's coordinates are transformed by first applying the transform.matrix to it using the top left (x, y) of transform.in_rectangle as the origin, then translate it to use the top-left of transform.out_rectangle as new origin.

    Parameters

    • x: number

      a non-NULL pointer to the X value of the coordinate

    • y: number

      a non-NULL pointer to the Y value of the coordinate

    Returns [boolean, number, number]

    false if the point is outside of transform.out_rectangle after the transformation has been applied

    1.28

  • Transforms rect from the input coordinates to the output ones. The point's coordinates are transformed by first applying the transform.matrix to it using the top left (x, y) of transform.in_rectangle as the origin, then translate it to use the top-left of transform.out_rectangle as new origin.

    rect is always axis aligned at input and this function only returns axis aligned rectangles as output, otherwise it returns FALSE.

    Output rectangle could be in partially or totally outside of transform.out_rectangle.

    Parameters

    • rect: VideoRectangle

      a rectangle in the coordinate of the original image

    Returns [boolean, VideoRectangle]

    false is the output rectangle is not axis aligned

    1.28

  • Transforms rect from the input coordinates to the output ones. The point's coordinates are transformed by first applying the transform.matrix to it using the top left (x, y) of transform.in_rectangle as the origin, then translate it to use the top-left of transform.out_rectangle as new origin.

    rect is always axis aligned at input and this function only returns axis aligned rectangles as output, otherwise it returns FALSE.

    Output rectangle will be clipped to fit inside transform.out_rectangle.

    Parameters

    • rect: VideoRectangle

      a rectangle in the coordinate of the original image

    Returns [boolean, VideoRectangle]

    false if the output rectangle is not axis aligned or if the rectangle is entirely outside of the out_rectangle.

    1.28