Class Discoverer.Builder<B extends Discoverer.Builder<B>>
java.lang.Object
io.github.jwharm.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.freedesktop.gstreamer.pbutils.Discoverer.Builder<B>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Enclosing class:
Discoverer
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theDiscoverer
object.Will be emitted in async mode when all information on a URI could be discovered, or an error occurred.onFinished
(Discoverer.FinishedCallback handler) Will be emitted in async mode when all pending URIs have been processed.Retrieves information about a URI from and external source of information, like a cache file.This signal is emitted after the source element has been created for, so the URI being discovered, so it can be configured by setting additional properties (e.g.onStarting
(Discoverer.StartingCallback handler) Will be emitted when the discover starts analyzing the pending URIssetTimeout
(long timeout) The duration (in nanoseconds) after which the discovery of an individual URI will timeout.setUseCache
(boolean useCache) 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 theDiscoverer
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 toDiscoverer
.- Overrides:
build
in classGObject.Builder<B extends Discoverer.Builder<B>>
- Returns:
- a new instance of
Discoverer
with the properties that were set in the Builder object.
-
setTimeout
The duration (in nanoseconds) after which the discovery of an individual URI will timeout.If the discovery of a URI times out, the
DiscovererResult.TIMEOUT
will be set on the result flags.- Parameters:
timeout
- the value for thetimeout
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setUseCache
-
onDiscovered
Will be emitted in async mode when all information on a URI could be discovered, or an error occurred.When an error occurs,
info
might still contain some partial information, depending on the circumstances of the error.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onFinished
Will be emitted in async mode when all pending URIs have been processed.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onLoadSerializedInfo
Retrieves information about a URI from and external source of information, like a cache file. This is used by the discoverer to speed up the discovery.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onSourceSetup
This signal is emitted after the source element has been created for, so the URI being discovered, so it can be configured by setting additional properties (e.g. set a proxy server for an http source, or set the device and read speed for an audio cd source).This signal is usually emitted from the context of a GStreamer streaming thread.
- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onStarting
Will be emitted when the discover starts analyzing the pending URIs- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-