diff options
author | Thibault Saunier <tsaunier@igalia.com> | 2023-02-07 17:01:11 -0300 |
---|---|---|
committer | Thibault Saunier <tsaunier@igalia.com> | 2023-04-29 06:54:10 -0400 |
commit | 98e5c5e8629120baddaf0a8390c76f9edaf66503 (patch) | |
tree | 77c7929e7b1c78b9ab7a6bb64c9ecf9437266dd1 /girs | |
parent | 9e994ea61619b2ad65cf5aa7208b4245d7c83ddb (diff) | |
download | gstreamer-98e5c5e8629120baddaf0a8390c76f9edaf66503.tar.gz |
ges: Implement a new GESDiscovererManager object
Allowing better control over the way discovery happens and allowing
us to expose a proper API.
This also adds the potential of implementing more multi-threaded
discovery in a clean way in the future.
This allows us to cleanly expose the new
GstDiscoverer::load-serialize-info signal.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3911>
Diffstat (limited to 'girs')
-rw-r--r-- | girs/GES-1.0.gir | 123 | ||||
-rw-r--r-- | girs/GstPbutils-1.0.gir | 55 |
2 files changed, 175 insertions, 3 deletions
diff --git a/girs/GES-1.0.gir b/girs/GES-1.0.gir index f39d227f51..1aef02d442 100644 --- a/girs/GES-1.0.gir +++ b/girs/GES-1.0.gir @@ -3126,6 +3126,124 @@ if no track elements are created or an error occurred.</doc> </parameter> </parameters> </function-macro> + <class name="DiscovererManager" c:symbol-prefix="discoverer_manager" c:type="GESDiscovererManager" version="1.24" parent="GObject.Object" glib:type-name="GESDiscovererManager" glib:get-type="ges_discoverer_manager_get_type" glib:type-struct="DiscovererManagerClass"> + <source-position filename="../subprojects/gst-editing-services/ges/ges-discoverer-manager.h"/> + <function name="get_default" c:identifier="ges_discoverer_manager_get_default" version="1.24"> + <source-position filename="../subprojects/gst-editing-services/ges/ges-discoverer-manager.h"/> + <return-value transfer-ownership="full"> + <doc xml:space="preserve" filename="../subprojects/gst-editing-services/ges/ges-discoverer-manager.c">The default #GESDiscovererManager</doc> + <type name="DiscovererManager" c:type="GESDiscovererManager*"/> + </return-value> + </function> + <method name="get_timeout" c:identifier="ges_discoverer_manager_get_timeout" version="1.24"> + <source-position filename="../subprojects/gst-editing-services/ges/ges-discoverer-manager.h"/> + <return-value transfer-ownership="none"> + <doc xml:space="preserve" filename="../subprojects/gst-editing-services/ges/ges-discoverer-manager.c">The timeout to use for the discoverer</doc> + <type name="Gst.ClockTime" c:type="GstClockTime"/> + </return-value> + <parameters> + <instance-parameter name="self" transfer-ownership="none"> + <doc xml:space="preserve" filename="../subprojects/gst-editing-services/ges/ges-discoverer-manager.c">The #GESDiscovererManager</doc> + <type name="DiscovererManager" c:type="GESDiscovererManager*"/> + </instance-parameter> + </parameters> + </method> + <method name="get_use_cache" c:identifier="ges_discoverer_manager_get_use_cache" version="1.24"> + <source-position filename="../subprojects/gst-editing-services/ges/ges-discoverer-manager.h"/> + <return-value transfer-ownership="none"> + <doc xml:space="preserve" filename="../subprojects/gst-editing-services/ges/ges-discoverer-manager.c">Whether to use the cache or not</doc> + <type name="gboolean" c:type="gboolean"/> + </return-value> + <parameters> + <instance-parameter name="self" transfer-ownership="none"> + <doc xml:space="preserve" filename="../subprojects/gst-editing-services/ges/ges-discoverer-manager.c">The #GESDiscovererManager</doc> + <type name="DiscovererManager" c:type="GESDiscovererManager*"/> + </instance-parameter> + </parameters> + </method> + <method name="set_timeout" c:identifier="ges_discoverer_manager_set_timeout" version="1.24"> + <doc xml:space="preserve" filename="../subprojects/gst-editing-services/ges/ges-discoverer-manager.c">Sets the timeout to use for the discoverer</doc> + <source-position filename="../subprojects/gst-editing-services/ges/ges-discoverer-manager.h"/> + <return-value transfer-ownership="none"> + <type name="none" c:type="void"/> + </return-value> + <parameters> + <instance-parameter name="self" transfer-ownership="none"> + <doc xml:space="preserve" filename="../subprojects/gst-editing-services/ges/ges-discoverer-manager.c">The #GESDiscovererManager</doc> + <type name="DiscovererManager" c:type="GESDiscovererManager*"/> + </instance-parameter> + <parameter name="timeout" transfer-ownership="none"> + <doc xml:space="preserve" filename="../subprojects/gst-editing-services/ges/ges-discoverer-manager.c">The timeout to set</doc> + <type name="Gst.ClockTime" c:type="GstClockTime"/> + </parameter> + </parameters> + </method> + <method name="set_use_cache" c:identifier="ges_discoverer_manager_set_use_cache" version="1.24"> + <doc xml:space="preserve" filename="../subprojects/gst-editing-services/ges/ges-discoverer-manager.c">Sets whether to use the cache or not</doc> + <source-position filename="../subprojects/gst-editing-services/ges/ges-discoverer-manager.h"/> + <return-value transfer-ownership="none"> + <type name="none" c:type="void"/> + </return-value> + <parameters> + <instance-parameter name="self" transfer-ownership="none"> + <doc xml:space="preserve" filename="../subprojects/gst-editing-services/ges/ges-discoverer-manager.c">The #GESDiscovererManager</doc> + <type name="DiscovererManager" c:type="GESDiscovererManager*"/> + </instance-parameter> + <parameter name="use_cache" transfer-ownership="none"> + <doc xml:space="preserve" filename="../subprojects/gst-editing-services/ges/ges-discoverer-manager.c">Whether to use the cache</doc> + <type name="gboolean" c:type="gboolean"/> + </parameter> + </parameters> + </method> + <property name="timeout" version="1.24" writable="1" construct="1" transfer-ownership="none"> + <doc xml:space="preserve" filename="../subprojects/gst-editing-services/ges/ges-discoverer-manager.c">The timeout (in milliseconds) for the #GstDiscoverer operations</doc> + <type name="guint64" c:type="guint64"/> + </property> + <property name="use-cache" writable="1" construct="1" transfer-ownership="none"> + <type name="gboolean" c:type="gboolean"/> + </property> + <glib:signal name="discovered" when="last" action="1" version="1.24"> + <attribute name="doc.skip" value="true"/> + <return-value transfer-ownership="none"> + <type name="none" c:type="void"/> + </return-value> + <parameters> + <parameter name="info" transfer-ownership="none"> + <doc xml:space="preserve" filename="../subprojects/gst-editing-services/ges/ges-discoverer-manager.c">The #GstDiscovererInfo representing the discovered URI</doc> + <type name="GstPbutils.DiscovererInfo"/> + </parameter> + <parameter name="error" transfer-ownership="none"> + <doc xml:space="preserve" filename="../subprojects/gst-editing-services/ges/ges-discoverer-manager.c">The #GError that occurred, or %NULL</doc> + <type name="GLib.Error"/> + </parameter> + </parameters> + </glib:signal> + <glib:signal name="load-serialized-info" when="last" action="1" version="1.24"> + <doc xml:space="preserve" filename="../subprojects/gst-editing-services/ges/ges-discoverer-manager.c">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.</doc> + <return-value transfer-ownership="full" nullable="1"> + <doc xml:space="preserve" filename="../subprojects/gst-editing-services/ges/ges-discoverer-manager.c">The #GstDiscovererInfo representing +@uri, or %NULL if no information</doc> + <type name="GstPbutils.DiscovererInfo"/> + </return-value> + <parameters> + <parameter name="uri" transfer-ownership="none"> + <doc xml:space="preserve" filename="../subprojects/gst-editing-services/ges/ges-discoverer-manager.c">The URI to load the serialized info for</doc> + <type name="utf8" c:type="gchar*"/> + </parameter> + </parameters> + </glib:signal> + </class> + <record name="DiscovererManagerClass" c:type="GESDiscovererManagerClass" glib:is-gtype-struct-for="DiscovererManager"> + <source-position filename="../subprojects/gst-editing-services/ges/ges-discoverer-manager.h"/> + <field name="parent_class"> + <type name="GObject.ObjectClass" c:type="GObjectClass"/> + </field> + </record> + <record name="DiscovererManagerPrivate" c:type="GESDiscovererManagerPrivate" disguised="1"> + <source-position filename="../subprojects/gst-editing-services/ges/ges-discoverer-manager.h"/> + </record> <function-macro name="EXTRACTABLE_GET_INTERFACE" c:identifier="GES_EXTRACTABLE_GET_INTERFACE" introspectable="0"> <source-position filename="../subprojects/gst-editing-services/ges/ges-extractable.h"/> <parameters> @@ -14965,7 +15083,7 @@ ges_uri_clip_asset_new (uri, (GAsyncReadyCallback) filesource_asset_loaded_cb, u </parameters> </function> <function name="request_sync" c:identifier="ges_uri_clip_asset_request_sync" throws="1"> - <doc xml:space="preserve" filename="../subprojects/gst-editing-services/ges/ges-uri-asset.c">Creates a #GESUriClipAsset for @uri syncronously. You should avoid + <doc xml:space="preserve" filename="../subprojects/gst-editing-services/ges/ges-uri-asset.c">Creates a #GESUriClipAsset for @uri synchonously. You should avoid to use it in application, and rather create #GESUriClipAsset asynchronously</doc> <source-position filename="../subprojects/gst-editing-services/ges/ges-uri-asset.h"/> <return-value transfer-ownership="full"> @@ -15115,8 +15233,9 @@ are different as those can be extended 'infinitely'.</doc> <type name="gpointer" c:type="gpointer"/> </array> </field> - <method name="set_timeout" c:identifier="ges_uri_clip_asset_class_set_timeout"> + <method name="set_timeout" c:identifier="ges_uri_clip_asset_class_set_timeout" deprecated="1" deprecated-version="1.24"> <doc xml:space="preserve" filename="../subprojects/gst-editing-services/ges/ges-uri-asset.c">Sets the timeout of #GESUriClipAsset loading</doc> + <doc-deprecated xml:space="preserve">ges_discoverer_manager_set_timeout() should be used instead</doc-deprecated> <source-position filename="../subprojects/gst-editing-services/ges/ges-uri-asset.h"/> <return-value transfer-ownership="none"> <type name="none" c:type="void"/> diff --git a/girs/GstPbutils-1.0.gir b/girs/GstPbutils-1.0.gir index d415a50b01..15d2e20cd8 100644 --- a/girs/GstPbutils-1.0.gir +++ b/girs/GstPbutils-1.0.gir @@ -369,6 +369,24 @@ free it when no longer needed using g_error_free().</doc> </instance-parameter> </parameters> </virtual-method> + <virtual-method name="load_serialize_info" version="1.24"> + <doc xml:space="preserve" filename="../subprojects/gst-plugins-base/gst-libs/gst/pbutils/gstdiscoverer.h">Loads the serialized info from the given uri.</doc> + <source-position filename="../subprojects/gst-plugins-base/gst-libs/gst/pbutils/gstdiscoverer.h"/> + <return-value transfer-ownership="full"> + <doc xml:space="preserve" filename="../subprojects/gst-plugins-base/gst-libs/gst/pbutils/gstdiscoverer.h">the #GstDiscovererInfo or %NULL if it could not be loaded</doc> + <type name="DiscovererInfo" c:type="GstDiscovererInfo*"/> + </return-value> + <parameters> + <instance-parameter name="dc" transfer-ownership="none"> + <doc xml:space="preserve" filename="../subprojects/gst-plugins-base/gst-libs/gst/pbutils/gstdiscoverer.h">the #GstDiscoverer</doc> + <type name="Discoverer" c:type="GstDiscoverer*"/> + </instance-parameter> + <parameter name="uri" transfer-ownership="none"> + <doc xml:space="preserve" filename="../subprojects/gst-plugins-base/gst-libs/gst/pbutils/gstdiscoverer.h">the uri to load the info from</doc> + <type name="utf8" c:type="gchar*"/> + </parameter> + </parameters> + </virtual-method> <virtual-method name="source_setup"> <source-position filename="../subprojects/gst-plugins-base/gst-libs/gst/pbutils/gstdiscoverer.h"/> <return-value transfer-ownership="none"> @@ -521,6 +539,22 @@ depending on the circumstances of the error.</doc> <type name="none" c:type="void"/> </return-value> </glib:signal> + <glib:signal name="load-serialized-info" when="last" version="1.24"> + <doc xml:space="preserve" filename="../subprojects/gst-plugins-base/gst-libs/gst/pbutils/gstdiscoverer.c">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.</doc> + <return-value transfer-ownership="full" nullable="1"> + <doc xml:space="preserve" filename="../subprojects/gst-plugins-base/gst-libs/gst/pbutils/gstdiscoverer.c">The #GstDiscovererInfo representing +@uri, or %NULL if no information</doc> + <type name="DiscovererInfo"/> + </return-value> + <parameters> + <parameter name="uri" transfer-ownership="none"> + <doc xml:space="preserve" filename="../subprojects/gst-plugins-base/gst-libs/gst/pbutils/gstdiscoverer.c">THe URI to load the serialized info for</doc> + <type name="utf8" c:type="gchar*"/> + </parameter> + </parameters> + </glib:signal> <glib:signal name="source-setup" when="last"> <doc xml:space="preserve" filename="../subprojects/gst-plugins-base/gst-libs/gst/pbutils/gstdiscoverer.c">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 @@ -708,8 +742,27 @@ information.</doc> </parameters> </callback> </field> + <field name="load_serialize_info"> + <callback name="load_serialize_info"> + <source-position filename="../subprojects/gst-plugins-base/gst-libs/gst/pbutils/gstdiscoverer.h"/> + <return-value transfer-ownership="full"> + <doc xml:space="preserve" filename="../subprojects/gst-plugins-base/gst-libs/gst/pbutils/gstdiscoverer.h">the #GstDiscovererInfo or %NULL if it could not be loaded</doc> + <type name="DiscovererInfo" c:type="GstDiscovererInfo*"/> + </return-value> + <parameters> + <parameter name="dc" transfer-ownership="none"> + <doc xml:space="preserve" filename="../subprojects/gst-plugins-base/gst-libs/gst/pbutils/gstdiscoverer.h">the #GstDiscoverer</doc> + <type name="Discoverer" c:type="GstDiscoverer*"/> + </parameter> + <parameter name="uri" transfer-ownership="none"> + <doc xml:space="preserve" filename="../subprojects/gst-plugins-base/gst-libs/gst/pbutils/gstdiscoverer.h">the uri to load the info from</doc> + <type name="utf8" c:type="gchar*"/> + </parameter> + </parameters> + </callback> + </field> <field name="_reserved"> - <array zero-terminated="0" fixed-size="4"> + <array zero-terminated="0" fixed-size="3"> <type name="gpointer" c:type="gpointer"/> </array> </field> |