Class Element.Builder<B extends Element.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Direct Known Subclasses:
Aggregator.Builder, AudioDecoder.Builder, AudioEncoder.Builder, AudioVisualizer.Builder, BaseParse.Builder, BaseSink.Builder, BaseSrc.Builder, BaseTransform.Builder, Bin.Builder, VideoDecoder.Builder, VideoEncoder.Builder
Enclosing class:
Element

public static class Element.Builder<B extends Element.Builder<B>> extends GstObject.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor for a Builder object.
  • Method Details

    • build

      public Element build()
      Finish building the Element object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to Element.
      Overrides:
      build in class GstObject.Builder<B extends Element.Builder<B>>
      Returns:
      a new instance of Element with the properties that were set in the Builder object.
    • onNoMorePads

      public B onNoMorePads(Element.NoMorePadsCallback handler)
      This signals that the element will not generate more dynamic pads. Note that this signal will usually be emitted from the context of the streaming thread.
      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also:
    • onPadAdded

      public B onPadAdded(Element.PadAddedCallback handler)
      a new GstPad has been added to the element. Note that this signal will usually be emitted from the context of the streaming thread. Also keep in mind that if you add new elements to the pipeline in the signal handler you will need to set them to the desired target state with gst_element_set_state() or gst_element_sync_state_with_parent().
      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also:
    • onPadRemoved

      public B onPadRemoved(Element.PadRemovedCallback handler)
      a GstPad has been removed from the element
      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also: