Package org.freedesktop.gstreamer.base
Class BaseSink.Builder<B extends BaseSink.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.base.BaseSink.Builder<B>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Direct Known Subclasses:
AudioBaseSink.Builder
,VideoSink.Builder
- Enclosing class:
BaseSink
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theBaseSink
object.setAsync
(boolean async) If set totrue
, the basesink will perform asynchronous state changes.setBlocksize
(int blocksize) The amount of bytes to pull when operating in pull mode.setEnableLastSample
(boolean enableLastSample) Enable the last-sample property.setMaxBitrate
(long maxBitrate) Control the maximum amount of bits that will be rendered per second.setMaxLateness
(long maxLateness) setProcessingDeadline
(long processingDeadline) Maximum amount of time (in nanoseconds) that the pipeline can take for processing the buffer.setQos
(boolean qos) setRenderDelay
(long renderDelay) The additional delay between synchronisation and actual rendering of the media.setSync
(boolean sync) setThrottleTime
(long throttleTime) The time to insert between buffers.setTsOffset
(long tsOffset) Controls the final synchronisation, a negative value will render the buffer earlier while a positive value delays playback.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 theBaseSink
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 toBaseSink
.- Overrides:
build
in classElement.Builder<B extends BaseSink.Builder<B>>
- Returns:
- a new instance of
BaseSink
with the properties that were set in the Builder object.
-
setAsync
If set totrue
, the basesink will perform asynchronous state changes. When set tofalse
, the sink will not signal the parent when it prerolls. Use this option when dealing with sparse streams or when synchronisation is not required.- Parameters:
async
- the value for theasync
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setBlocksize
The amount of bytes to pull when operating in pull mode.- Parameters:
blocksize
- the value for theblocksize
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setEnableLastSample
Enable the last-sample property. Iffalse
, basesink doesn't keep a reference to the last buffer arrived and the last-sample property is always set tonull
. This can be useful if you need buffers to be released as soon as possible, eg. if you're using a buffer pool.- Parameters:
enableLastSample
- the value for theenable-last-sample
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setMaxBitrate
Control the maximum amount of bits that will be rendered per second. Setting this property to a value bigger than 0 will make the sink delay rendering of the buffers when it would exceed to max-bitrate.- Parameters:
maxBitrate
- the value for themax-bitrate
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setMaxLateness
-
setProcessingDeadline
Maximum amount of time (in nanoseconds) that the pipeline can take for processing the buffer. This is added to the latency of live pipelines.- Parameters:
processingDeadline
- the value for theprocessing-deadline
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setQos
-
setRenderDelay
The additional delay between synchronisation and actual rendering of the media. This property will add additional latency to the device in order to make other sinks compensate for the delay.- Parameters:
renderDelay
- the value for therender-delay
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setSync
-
setThrottleTime
The time to insert between buffers. This property can be used to control the maximum amount of buffers per second to render. Setting this property to a value bigger than 0 will make the sink create THROTTLE QoS events.- Parameters:
throttleTime
- the value for thethrottle-time
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setTsOffset
Controls the final synchronisation, a negative value will render the buffer earlier while a positive value delays playback. This property can be used to fix synchronisation in bad files.- Parameters:
tsOffset
- the value for thets-offset
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-