Class GstObject.Builder<B extends GstObject.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Direct Known Subclasses:
Allocator.Builder, AudioRingBuffer.Builder, BufferPool.Builder, Bus.Builder, Clock.Builder, CollectPads.Builder, ControlBinding.Builder, ControlSource.Builder, Device.Builder, DeviceMonitor.Builder, DeviceProvider.Builder, Element.Builder, Pad.Builder, PadTemplate.Builder, Plugin.Builder, PluginFeature.Builder, Registry.Builder, Stream.Builder, StreamCollection.Builder, Task.Builder, TaskPool.Builder, Tracer.Builder, TracerRecord.Builder
Enclosing class:
GstObject

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

      public B setName(String name)
    • setParent

      public B setParent(GstObject parent)
      The parent of the object. Please note, that when changing the 'parent' property, we don't emit GObject::notify and GstObject::deep-notify signals due to locking issues. In some cases one can use GstBin::element-added or GstBin::element-removed signals on the parent to achieve a similar effect.
      Parameters:
      parent - the value for the parent property
      Returns:
      the Builder instance is returned, to allow method chaining
    • onDeepNotify

      public B onDeepNotify(@Nullable String detail, GstObject.DeepNotifyCallback handler)
      The deep notify signal is used to be notified of property changes. It is typically attached to the toplevel bin to receive notifications from all the elements contained in that bin.
      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also: