Class AudioBaseSrc

All Implemented Interfaces:
Proxy
Direct Known Subclasses:
AudioSrc

@Generated("org.javagi.JavaGI") public class AudioBaseSrc extends PushSrc
This is the base class for audio sources. Subclasses need to implement the ::create_ringbuffer vmethod. This base class will then take care of reading samples from the ringbuffer, synchronisation and flushing.
  • Constructor Details

    • AudioBaseSrc

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

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

    • getType

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

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

      protected AudioBaseSrc 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 PushSrc
      Returns:
      the instance as if it were its parent type
    • createRingbuffer

      public @Nullable AudioRingBuffer createRingbuffer()
      Create and return the GstAudioRingBuffer for src. This function will call the ::create_ringbuffer vmethod and will set this AudioBaseSrc as the parent of the returned buffer (see gst_object_set_parent()).
      Returns:
      The new ringbuffer of src.
    • getProvideClock

      public boolean getProvideClock()
      Queries whether this AudioBaseSrc will provide a clock or not. See also gst_audio_base_src_set_provide_clock.
      Returns:
      true if this AudioBaseSrc will provide a clock.
    • getSlaveMethod

      public AudioBaseSrcSlaveMethod getSlaveMethod()
      Get the current slave method used by src.
      Returns:
      The current slave method used by src.
    • setProvideClock

      public void setProvideClock(boolean provide)
      Controls whether this AudioBaseSrc will provide a clock or not. If provide is true, gst_element_provide_clock() will return a clock that reflects the datarate of src. If provide is false, gst_element_provide_clock() will return NULL.
      Parameters:
      provide - new state
    • setSlaveMethod

      public void setSlaveMethod(AudioBaseSrcSlaveMethod method)
      Controls how clock slaving will be performed in src.
      Parameters:
      method - the new slave method
    • builder

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