Class VideoConverter

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

@Generated("org.javagi.JavaGI") public class VideoConverter extends ProxyInstance
  • Constructor Details

    • VideoConverter

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

    • getMemoryLayout

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

      public static VideoConverter new_(VideoInfo inInfo, VideoInfo outInfo, Structure config)

      Create a new converter object to convert between inInfo and outInfo with config.

      Returns (nullable): a GstVideoConverter or null if conversion is not possible.

      Parameters:
      inInfo - a GstVideoInfo
      outInfo - a GstVideoInfo
      config - a GstStructure with configuration options
      Since:
      1.6
    • newWithPool

      public static VideoConverter newWithPool(VideoInfo inInfo, VideoInfo outInfo, Structure config, @Nullable TaskPool pool)

      Create a new converter object to convert between inInfo and outInfo with config.

      The optional pool can be used to spawn threads, this is useful when creating new converters rapidly, for example when updating cropping.

      Returns (nullable): a GstVideoConverter or null if conversion is not possible.

      Parameters:
      inInfo - a GstVideoInfo
      outInfo - a GstVideoInfo
      config - a GstStructure with configuration options
      pool - a GstTaskPool to spawn threads from
      Since:
      1.20
    • frame

      public void frame(VideoFrame src, VideoFrame dest)

      Convert the pixels of src into dest using convert.

      If GST_VIDEO_CONVERTER_OPT_ASYNC_TASKS is true then this function will return immediately and needs to be followed by a call to gst_video_converter_frame_finish().

      Parameters:
      src - a GstVideoFrame
      dest - a GstVideoFrame
      Since:
      1.6
    • frameFinish

      public void frameFinish()
      Wait for a previous async conversion performed using gst_video_converter_frame() to complete.
      Since:
      1.20
    • free

      public void free()
      Free this VideoConverter
      Since:
      1.6
    • getConfig

      public Structure getConfig()
      Get the current configuration of convert.
      Returns:
      a GstStructure that remains valid for as long as this VideoConverter is valid or until gst_video_converter_set_config() is called.
    • getInInfo

      public VideoInfo getInInfo()
      Retrieve the input format of convert.
      Returns:
      a GstVideoInfo
      Since:
      1.22
    • getOutInfo

      public VideoInfo getOutInfo()
      Retrieve the output format of convert.
      Returns:
      a GstVideoInfo
      Since:
      1.22
    • setConfig

      public boolean setConfig(Structure config)

      Set config as extra configuration for convert.

      If the parameters in config can not be set exactly, this function returns false and will try to update as much state as possible. The new state can then be retrieved and refined with gst_video_converter_get_config().

      Look at the GST_VIDEO_CONVERTER_OPT_* fields to check valid configuration option and values.

      Parameters:
      config - a GstStructure
      Returns:
      true when config could be set.
      Since:
      1.6