Package org.freedesktop.gstreamer.video
Class VideoDecoder.Builder<B extends VideoDecoder.Builder<B>>
java.lang.Object
io.github.jwharm.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.gobject.InitiallyUnowned.Builder<B>
org.freedesktop.gstreamer.gst.GstObject.Builder<B>
org.freedesktop.gstreamer.gst.Element.Builder<B>
org.freedesktop.gstreamer.video.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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theVideoDecoder
object.setAutomaticRequestSyncPointFlags
(Set<VideoDecoderRequestSyncPointFlags> automaticRequestSyncPointFlags) GstVideoDecoderRequestSyncPointFlags to use for the automatically requested sync points ifautomatic-request-sync-points
is enabled.setAutomaticRequestSyncPointFlags
(VideoDecoderRequestSyncPointFlags... automaticRequestSyncPointFlags) GstVideoDecoderRequestSyncPointFlags to use for the automatically requested sync points ifautomatic-request-sync-points
is enabled.setAutomaticRequestSyncPoints
(boolean automaticRequestSyncPoints) If set totrue
the decoder will automatically request sync points when it seems like a good idea, e.g.setDiscardCorruptedFrames
(boolean discardCorruptedFrames) If set totrue
the decoder will discard frames that are marked as corrupted instead of outputting them.setMaxErrors
(int maxErrors) Maximum number of tolerated consecutive decode errors.setMinForceKeyUnitInterval
(long minForceKeyUnitInterval) Minimum interval between force-key-unit events sent upstream by the decoder.setQos
(boolean qos) If set totrue
the decoder will handle QoS events received from downstream elements.Methods inherited from class org.freedesktop.gstreamer.gst.Element.Builder
onNoMorePads, onPadAdded, onPadRemoved
Methods inherited from class org.freedesktop.gstreamer.gst.GstObject.Builder
onDeepNotify, setName, setParent
Methods inherited from class org.gnome.gobject.GObject.Builder
onNotify
Methods inherited from class io.github.jwharm.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building theVideoDecoder
object. This will callGObject.withProperties(org.gnome.glib.Type, java.lang.String[], org.gnome.gobject.Value[])
to create a new GObject instance, which is then cast toVideoDecoder
.- Overrides:
build
in classElement.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 ifautomatic-request-sync-points
is enabled.- Parameters:
automaticRequestSyncPointFlags
- the value for theautomatic-request-sync-point-flags
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setAutomaticRequestSyncPoints
If set totrue
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 theautomatic-request-sync-points
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setDiscardCorruptedFrames
If set totrue
the decoder will discard frames that are marked as corrupted instead of outputting them.- Parameters:
discardCorruptedFrames
- the value for thediscard-corrupted-frames
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setMaxErrors
Maximum number of tolerated consecutive decode errors. See gst_video_decoder_set_max_errors() for more details.- Parameters:
maxErrors
- the value for themax-errors
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setMinForceKeyUnitInterval
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 toGST_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 themin-force-key-unit-interval
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setQos
If set totrue
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 theqos
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setAutomaticRequestSyncPointFlags
public B setAutomaticRequestSyncPointFlags(VideoDecoderRequestSyncPointFlags... automaticRequestSyncPointFlags) GstVideoDecoderRequestSyncPointFlags to use for the automatically requested sync points ifautomatic-request-sync-points
is enabled.- Parameters:
automaticRequestSyncPointFlags
- the value for theautomatic-request-sync-point-flags
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-