mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-01 13:08:49 +00:00
discoverer: Move stream counter from GstDiscovererInfo into GstDiscoverer
It's only used temporarily during discovery and makes no sense as part of the resulting info. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7969>
This commit is contained in:
parent
dc3f2c6721
commit
9e4c173c3c
2 changed files with 6 additions and 4 deletions
|
@ -94,6 +94,7 @@ struct _GstDiscovererPrivate
|
|||
|
||||
/* current items */
|
||||
GstDiscovererInfo *current_info;
|
||||
gint current_info_stream_count;
|
||||
GError *current_error;
|
||||
GstStructure *current_topology;
|
||||
|
||||
|
@ -1277,7 +1278,7 @@ parse_stream_topology (GstDiscoverer * dc, const GstStructure * topology,
|
|||
}
|
||||
|
||||
if (add_to_list) {
|
||||
res->stream_number = dc->priv->current_info->stream_count++;
|
||||
res->stream_number = dc->priv->current_info_stream_count++;
|
||||
dc->priv->current_info->stream_list =
|
||||
g_list_append (dc->priv->current_info->stream_list, res);
|
||||
} else {
|
||||
|
@ -1390,6 +1391,7 @@ emit_discovered (GstDiscoverer * dc)
|
|||
/* Clients get a copy of current_info since it is a boxed type */
|
||||
gst_discoverer_info_unref (dc->priv->current_info);
|
||||
dc->priv->current_info = NULL;
|
||||
dc->priv->current_info_stream_count = 0;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -1487,7 +1489,7 @@ discoverer_collect (GstDiscoverer * dc)
|
|||
dc->priv->current_info->live = TRUE;
|
||||
|
||||
if (dc->priv->current_topology) {
|
||||
dc->priv->current_info->stream_count = 1;
|
||||
dc->priv->current_info_stream_count = 1;
|
||||
dc->priv->current_info->stream_info = parse_stream_topology (dc,
|
||||
dc->priv->current_topology, NULL);
|
||||
if (dc->priv->current_info->stream_info)
|
||||
|
@ -1911,6 +1913,7 @@ _setup_locked (GstDiscoverer * dc)
|
|||
/* Pop URI off the pending URI list */
|
||||
dc->priv->current_info =
|
||||
(GstDiscovererInfo *) g_object_new (GST_TYPE_DISCOVERER_INFO, NULL);
|
||||
dc->priv->current_info_stream_count = 0;
|
||||
if (dc->priv->use_cache)
|
||||
dc->priv->current_info->cachefile = _serialized_info_get_path (dc, uri);
|
||||
dc->priv->current_info->uri = uri;
|
||||
|
@ -1979,6 +1982,7 @@ discoverer_cleanup (GstDiscoverer * dc)
|
|||
}
|
||||
|
||||
dc->priv->current_info = NULL;
|
||||
dc->priv->current_info_stream_count = 0;
|
||||
|
||||
if (dc->priv->all_tags) {
|
||||
gst_tag_list_unref (dc->priv->all_tags);
|
||||
|
|
|
@ -98,8 +98,6 @@ struct _GstDiscovererInfo {
|
|||
gboolean seekable;
|
||||
GPtrArray *missing_elements_details;
|
||||
|
||||
gint stream_count;
|
||||
|
||||
gchar *cachefile;
|
||||
gpointer from_cache;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue