Class Clock.Builder<B extends Clock.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Direct Known Subclasses:
SystemClock.Builder
Enclosing class:
Clock

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

      public B setTimeout(long timeout)
    • setWindowSize

      public B setWindowSize(int windowSize)
    • setWindowThreshold

      public B setWindowThreshold(int windowThreshold)
    • onSynced

      public B onSynced(Clock.SyncedCallback handler)

      Signaled on clocks with ClockFlags.NEEDS_STARTUP_SYNC set once the clock is synchronized, or when it completely lost synchronization. This signal will not be emitted on clocks without the flag.

      This signal will be emitted from an arbitrary thread, most likely not the application's main thread.

      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.6
      See Also: