Package org.freedesktop.gstreamer.base
Class BaseSink.Builder<B extends BaseSink.Builder<B>>
java.lang.Object
org.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:
AppSink.Builder,AudioBaseSink.Builder,VideoSink.Builder
- Enclosing class:
BaseSink
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theBaseSinkobject.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, onPadRemovedMethods inherited from class org.freedesktop.gstreamer.gst.GstObject.Builder
onDeepNotify, setName, setParentMethods inherited from class org.gnome.gobject.GObject.Builder
onNotifyMethods inherited from class org.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theBaseSinkobject. 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:
buildin classElement.Builder<B extends BaseSink.Builder<B>>- Returns:
- a new instance of
BaseSinkwith 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 theasyncproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setBlocksize
The amount of bytes to pull when operating in pull mode.- Parameters:
blocksize- the value for theblocksizeproperty- Returns:
- the
Builderinstance 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-sampleproperty- Returns:
- the
Builderinstance 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-bitrateproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.2
-
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-deadlineproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.16
-
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-delayproperty- Returns:
- the
Builderinstance 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-timeproperty- Returns:
- the
Builderinstance 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-offsetproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-