Class VideoAffineTransformationMeta

java.lang.Object
org.javagi.base.ProxyInstance
org.freedesktop.gstreamer.video.VideoAffineTransformationMeta
All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class VideoAffineTransformationMeta extends ProxyInstance

Extra buffer metadata for performing an affine transformation using a 4x4 matrix. The transformation matrix can be composed with gst_video_affine_transformation_meta_apply_matrix().

The vertices operated on are all in the range 0 to 1, not in Normalized Device Coordinates (-1 to +1). Transforming points in this space are assumed to have an origin at (0.5, 0.5, 0.5) in a left-handed coordinate system with the x-axis moving horizontally (positive values to the right), the y-axis moving vertically (positive values up the screen) and the z-axis perpendicular to the screen (positive values into the screen).

Since:
1.8
  • Constructor Details

    • VideoAffineTransformationMeta

      public VideoAffineTransformationMeta(MemorySegment address)
      Create a VideoAffineTransformationMeta proxy instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • VideoAffineTransformationMeta

      public VideoAffineTransformationMeta(Arena arena)
      Allocate a new VideoAffineTransformationMeta.
      Parameters:
      arena - to control the memory allocation scope
    • VideoAffineTransformationMeta

      public VideoAffineTransformationMeta()
      Allocate a new VideoAffineTransformationMeta. The memory is allocated with Arena.ofAuto().
    • VideoAffineTransformationMeta

      public VideoAffineTransformationMeta(Meta meta, float[] matrix, Arena arena)
      Allocate a new VideoAffineTransformationMeta with the fields set to the provided values.
      Parameters:
      meta - value for the field meta
      matrix - value for the field matrix
      arena - to control the memory allocation scope
    • VideoAffineTransformationMeta

      public VideoAffineTransformationMeta(Meta meta, float[] matrix)
      Allocate a new VideoAffineTransformationMeta with the fields set to the provided values. The memory is allocated with Arena.ofAuto().
      Parameters:
      meta - value for the field meta
      matrix - value for the field matrix
  • Method Details

    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • readMeta

      public @Nullable Meta readMeta()
      Read the value of the field meta.
      Returns:
      The value of the field meta
    • writeMeta

      public void writeMeta(@Nullable Meta meta)
      Write a value in the field meta.
      Parameters:
      meta - The new value for the field meta
    • readMatrix

      public @Nullable float @Nullable [] readMatrix()
      Read the value of the field matrix.
      Returns:
      The value of the field matrix
    • writeMatrix

      public void writeMatrix(@Nullable float @Nullable [] matrix, Arena _arena)
      Write a value in the field matrix.
      Parameters:
      matrix - The new value for the field matrix
    • getInfo

      public static MetaInfo getInfo()
    • applyMatrix

      public void applyMatrix(@Nullable float @Nullable [] matrix)
      Apply a transformation using the given 4x4 transformation matrix. Performs the multiplication, meta->matrix X matrix.
      Parameters:
      matrix - a 4x4 transformation matrix to be applied
      Throws:
      IllegalArgumentException - when length of matrix is less than 16
      Since:
      1.8