Class VideoSink

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class VideoSink extends BaseSink

Provides useful functions and a base class for video sinks.

GstVideoSink will configure the default base sink to drop frames that arrive later than 20ms as this is considered the default threshold for observing out-of-sync frames.

  • Constructor Details

    • VideoSink

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

      public VideoSink()
      Create a new VideoSink.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the VideoSink class.
      Returns:
      the GType
    • getMemoryLayout

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

      protected VideoSink asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class BaseSink
      Returns:
      the instance as if it were its parent type
    • centerRect

      @Deprecated public static void centerRect(@Nullable VideoRectangle src, @Nullable VideoRectangle dst, VideoRectangle result, boolean scaling)
      Deprecated.
    • setInfo

      protected boolean setInfo(Caps caps, VideoInfo info)
      Notifies the subclass of changed GstVideoInfo.
      Parameters:
      caps - A GstCaps.
      info - A GstVideoInfo corresponding to caps.
      Since:
      1.20
    • showFrame

      protected FlowReturn showFrame(Buffer buf)
      render a video frame. Maps to GstBaseSinkClass.render() and GstBaseSinkClass.preroll() vfuncs. Rendering during preroll will be suppressed if the GstVideoSink:show-preroll-frame property is set to false.
    • builder

      public static VideoSink.Builder<? extends VideoSink.Builder> builder()
      A VideoSink.Builder object constructs a VideoSink with the specified properties. Use the various set...() methods to set properties, and finish construction with VideoSink.Builder.build().
      Returns:
      the builder object