gstpbutils.discoverer

Module for [Discoverer] class

Types 3

The #GstDiscoverer is a utility object which allows to get as much information as possible from one or many URIs.

It provides two APIs, allowing usage in blocking or non-blocking mode.

The blocking mode just requires calling gstpbutils.discoverer.Discoverer.discoverUri with the URI one wishes to discover.

The non-blocking mode requires a running #GMainLoop iterating a #GMainContext, where one connects to the various signals, appends the URIs to be processed (through gstpbutils.discoverer.Discoverer.discoverUriAsync) and then asks for the discovery to begin (through gstpbutils.discoverer.Discoverer.start). By default this will use the GLib default main context unless you have set a custom context using glib.main_context.MainContext.pushThreadDefault.

All the information is returned in a #GstDiscovererInfo structure.

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
Discoverer self() nothrowReturns `this`, for use in `with` statements.
DiscovererGidBuilder builder() static nothrowGet builder for [gstpbutils.discoverer.Discoverer] Returns: New builder object
ulong timeout() @property nothrowGet `timeout` property. Returns: The duration (in nanoseconds) after which the discovery of an individual URI will timeout.
void timeout(ulong propval) @property nothrowSet `timeout` property. Params: propval = The duration (in nanoseconds) after which the discovery of an individual URI will timeout.
bool useCache() @property nothrow
void useCache(bool propval) @property nothrow
gstpbutils.discoverer_info.DiscovererInfo discoverUri(string uri)Synchronously discovers the given uri.
bool discoverUriAsync(string uri) nothrowAppends the given uri to the list of URIs to discoverer. The actual discovery of the uri will only take place if [gstpbutils.discoverer.Discoverer.start] has been called.
void start() nothrowAllow asynchronous discovering of URIs to take place. A #GMainLoop must be available for #GstDiscoverer to properly work in asynchronous mode.
void stop() nothrowStop the discovery of any pending URIs and clears the list of pending URIS (if any).
gulong connectDiscovered(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gstpbutils.discoverer_info.DiscovererInfo))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] == glib.error.ErrorWrap))) && (Parameters!T.length < 3 || (ParameterStorageClassTuple!T[2] == ParameterStorageClass.none && is(Parameters!T[2] : gstpbutils.discoverer.Discoverer))) && Parameters!T.length < 4) nothrowConnect to `Discovered` signal.
gulong connectFinished(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gstpbutils.discoverer.Discoverer))) && Parameters!T.length < 2) nothrowConnect to `Finished` signal.
gulong connectLoadSerializedInfo(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T : gstpbutils.discoverer_info.DiscovererInfo) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == string))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gstpbutils.discoverer.Discoverer))) && Parameters!T.length < 3) nothrowConnect to `LoadSerializedInfo` signal.
gulong connectSourceSetup(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gst.element.Element))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gstpbutils.discoverer.Discoverer))) && Parameters!T.length < 3) nothrowConnect to `SourceSetup` signal.
gulong connectStarting(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gstpbutils.discoverer.Discoverer))) && Parameters!T.length < 2) nothrowConnect to `Starting` signal.
Constructors
this(void * ptr, Flag!"Take" take)
this(gst.types.ClockTime timeout)Creates a new #GstDiscoverer with the provided timeout.

Fluent builder implementation template for gstpbutils.discoverer.Discoverer

Methods
T timeout(ulong propval) nothrowSet `timeout` property. Params: propval = The duration (in nanoseconds) after which the discovery of an individual URI will timeout.
T useCache(bool propval) nothrow
Methods
Discoverer build() nothrowCreate object from builder. Returns: New object