Class VideoDecoder.Builder<B extends VideoDecoder.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Enclosing class:
VideoDecoder

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

      public B setAutomaticRequestSyncPointFlags(Set<VideoDecoderRequestSyncPointFlags> automaticRequestSyncPointFlags)
      GstVideoDecoderRequestSyncPointFlags to use for the automatically requested sync points if automatic-request-sync-points is enabled.
      Parameters:
      automaticRequestSyncPointFlags - the value for the automatic-request-sync-point-flags property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.20
    • setAutomaticRequestSyncPoints

      public B setAutomaticRequestSyncPoints(boolean automaticRequestSyncPoints)
      If set to true the decoder will automatically request sync points when it seems like a good idea, e.g. if the first frames are not key frames or if packet loss was reported by upstream.
      Parameters:
      automaticRequestSyncPoints - the value for the automatic-request-sync-points property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.20
    • setDiscardCorruptedFrames

      public B setDiscardCorruptedFrames(boolean discardCorruptedFrames)
      If set to true the decoder will discard frames that are marked as corrupted instead of outputting them.
      Parameters:
      discardCorruptedFrames - the value for the discard-corrupted-frames property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.20
    • setMaxErrors

      public B setMaxErrors(int maxErrors)
      Maximum number of tolerated consecutive decode errors. See gst_video_decoder_set_max_errors() for more details.
      Parameters:
      maxErrors - the value for the max-errors property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.18
    • setMinForceKeyUnitInterval

      public B setMinForceKeyUnitInterval(long minForceKeyUnitInterval)

      Minimum interval between force-key-unit events sent upstream by the decoder. Setting this to 0 will cause every event to be handled, setting this to GST_CLOCK_TIME_NONE will cause every event to be ignored.

      See gst_video_event_new_upstream_force_key_unit() for more details about force-key-unit events.

      Parameters:
      minForceKeyUnitInterval - the value for the min-force-key-unit-interval property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.20
    • setQos

      public B setQos(boolean qos)
      If set to true the decoder will handle QoS events received from downstream elements. This includes dropping output frames which are detected as late using the metrics reported by those events.
      Parameters:
      qos - the value for the qos property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.18
    • setAutomaticRequestSyncPointFlags

      public B setAutomaticRequestSyncPointFlags(VideoDecoderRequestSyncPointFlags... automaticRequestSyncPointFlags)
      GstVideoDecoderRequestSyncPointFlags to use for the automatically requested sync points if automatic-request-sync-points is enabled.
      Parameters:
      automaticRequestSyncPointFlags - the value for the automatic-request-sync-point-flags property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.20