static void
gst_discoverer_stream_info_init (GstDiscovererStreamInfo * info)
{
- /* Nothing needs initialization */
+ info->stream_number = -1;
}
static void
if (info->misc)
gst_structure_free (info->misc);
+
+ G_OBJECT_CLASS (gst_discoverer_stream_info_parent_class)->finalize (object);
}
static void
if (stream_map)
g_hash_table_insert (stream_map, info, ret);
+ ret->stream_number = info->stream_number;
+
return ret;
}
gst_discoverer_stream_info_list_free (info->streams);
- gst_discoverer_stream_info_finalize ((GObject *) info);
+ if (info->tags)
+ gst_tag_list_unref (info->tags);
+
+ G_OBJECT_CLASS (gst_discoverer_container_info_parent_class)->finalize
+ (object);
}
static void
g_hash_table_insert (stream_map, tmp->data, subtop);
}
+ if (ptr->tags)
+ ret->tags = gst_tag_list_copy (ptr->tags);
+
return ret;
}
g_free (info->cachefile);
g_ptr_array_unref (info->missing_elements_details);
+
+ G_OBJECT_CLASS (gst_discoverer_info_parent_class)->finalize (object);
}
static GstDiscovererInfo *
*
* Finds all the #GstDiscovererAudioInfo contained in @info
*
- * Returns: (transfer full) (element-type GstPbutils.DiscovererStreamInfo): A #GList of
+ * Returns: (transfer full) (element-type GstPbutils.DiscovererAudioInfo): A #GList of
* matching #GstDiscovererStreamInfo. The caller should free it with
* gst_discoverer_stream_info_list_free().
*/
*
* Finds all the #GstDiscovererVideoInfo contained in @info
*
- * Returns: (transfer full) (element-type GstPbutils.DiscovererStreamInfo): A #GList of
+ * Returns: (transfer full) (element-type GstPbutils.DiscovererVideoInfo): A #GList of
* matching #GstDiscovererStreamInfo. The caller should free it with
* gst_discoverer_stream_info_list_free().
*/
*
* Finds all the #GstDiscovererSubtitleInfo contained in @info
*
- * Returns: (transfer full) (element-type GstPbutils.DiscovererStreamInfo): A #GList of
+ * Returns: (transfer full) (element-type GstPbutils.DiscovererSubtitleInfo): A #GList of
* matching #GstDiscovererStreamInfo. The caller should free it with
* gst_discoverer_stream_info_list_free().
*/
*
* Finds all the #GstDiscovererContainerInfo contained in @info
*
- * Returns: (transfer full) (element-type GstPbutils.DiscovererStreamInfo): A #GList of
+ * Returns: (transfer full) (element-type GstPbutils.DiscovererContainerInfo): A #GList of
* matching #GstDiscovererStreamInfo. The caller should free it with
* gst_discoverer_stream_info_list_free().
*/
* gst_discoverer_stream_info_get_previous:
* @info: a #GstDiscovererStreamInfo
*
- * Returns: (transfer full): the previous #GstDiscovererStreamInfo in a chain.
+ * Returns: (transfer full) (nullable): the previous #GstDiscovererStreamInfo in a chain.
* %NULL for starting points. Unref with #gst_discoverer_stream_info_unref
* after usage.
*/
* gst_discoverer_stream_info_get_next:
* @info: a #GstDiscovererStreamInfo
*
- * Returns: (transfer full): the next #GstDiscovererStreamInfo in a chain. %NULL
+ * Returns: (transfer full) (nullable): the next #GstDiscovererStreamInfo in a chain. %NULL
* for final streams.
* Unref with #gst_discoverer_stream_info_unref after usage.
*/
* gst_discoverer_stream_info_get_caps:
* @info: a #GstDiscovererStreamInfo
*
- * Returns: (transfer full): the #GstCaps of the stream. Unref with
+ * Returns: (transfer full) (nullable): the #GstCaps of the stream. Unref with
* #gst_caps_unref after usage.
*/
GstCaps *
* gst_discoverer_stream_info_get_tags:
* @info: a #GstDiscovererStreamInfo
*
- * Returns: (transfer none): the tags contained in this stream. If you wish to
+ * Returns: (transfer none) (nullable): the tags contained in this stream. If you wish to
* use the tags after the life-time of @info you will need to copy them.
*/
const GstTagList *
* gst_discoverer_stream_info_get_toc:
* @info: a #GstDiscovererStreamInfo
*
- * Returns: (transfer none): the TOC contained in this stream. If you wish to
+ * Returns: (transfer none) (nullable): the TOC contained in this stream. If you wish to
* use the TOC after the life-time of @info you will need to copy it.
*/
const GstToc *
* Deprecated: This functions is deprecated since version 1.4, use
* #gst_discoverer_info_get_missing_elements_installer_details
*
- * Returns: (transfer none): additional information regarding the stream (for
+ * Returns: (transfer none) (nullable): additional information regarding the stream (for
* example codec version, profile, etc..). If you wish to use the #GstStructure
* after the life-time of @info you will need to copy it.
*/
}
#endif
+/**
+ * gst_discoverer_stream_info_get_stream_number:
+ * @info: a #GstDiscovererStreamInfo
+ *
+ * Returns: the stream number, -1 if no index could be determined. This property
+ * acts as a unique identifier as a 'int' for the stream.
+ *
+ * Since: 1.20
+ */
+gint
+gst_discoverer_stream_info_get_stream_number (GstDiscovererStreamInfo * info)
+{
+ g_return_val_if_fail (GST_IS_DISCOVERER_STREAM_INFO (info), -1);
+
+ return info->stream_number;
+}
+
/* GstDiscovererContainerInfo */
/**
return res;
}
+/**
+ * gst_discoverer_container_info_get_tags:
+ * @info: a #GstDiscovererStreamInfo
+ *
+ * Returns: (transfer none) (nullable): tags specific to the given container. If you wish to use
+ * the tags after the life-time of @info, you will need to copy them.
+ *
+ * Since: 1.20
+ */
+const GstTagList *
+gst_discoverer_container_info_get_tags (const GstDiscovererContainerInfo * info)
+{
+ g_return_val_if_fail (GST_IS_DISCOVERER_CONTAINER_INFO (info), NULL);
+
+ return info->tags;
+}
+
/* GstDiscovererAudioInfo */
#define AUDIO_INFO_ACCESSOR_CODE(fieldname, type, failval) \
* gst_discoverer_audio_info_get_language:
* @info: a #GstDiscovererAudioInfo
*
- * Returns: the language of the stream, or NULL if unknown.
+ * Returns: (nullable): the language of the stream, or NULL if unknown.
*/
AUDIO_INFO_ACCESSOR_CODE (language, const gchar *, NULL);
* gst_discoverer_subtitle_info_get_language:
* @info: a #GstDiscovererSubtitleInfo
*
- * Returns: the language of the stream, or NULL if unknown.
+ * Returns: (nullable): the language of the stream, or NULL if unknown.
*/
SUBTITLE_INFO_ACCESSOR_CODE (language, const gchar *, NULL);
* gst_discoverer_info_get_stream_info:
* @info: a #GstDiscovererInfo
*
- * Returns: (transfer full): the structure (or topology) of the URI as a
+ * Returns: (transfer full) (nullable): the structure (or topology) of the URI as a
* #GstDiscovererStreamInfo.
* This structure can be traversed to see the original hierarchy. Unref with
* gst_discoverer_stream_info_unref() after usage.
* Deprecated: This functions is deprecated since version 1.4, use
* #gst_discoverer_info_get_missing_elements_installer_details
*
- * Returns: (transfer none): Miscellaneous information stored as a #GstStructure
+ * Returns: (transfer none) (nullable): Miscellaneous information stored as a #GstStructure
* (for example: information about missing plugins). If you wish to use the
* #GstStructure after the life-time of @info, you will need to copy it.
*/
DISCOVERER_INFO_ACCESSOR_CODE (misc, const GstStructure *, NULL);
-#endif
/**
* gst_discoverer_info_get_tags:
* @info: a #GstDiscovererInfo
*
- * Returns: (transfer none): all tags contained in the URI. If you wish to use
+ * Returns: (transfer none) (nullable): all tags contained in the URI. If you wish to use
* the tags after the life-time of @info, you will need to copy them.
+ *
+ * Deprecated: 1.20: Use gst_discoverer_{container,stream}_info_get_tags() instead.
*/
DISCOVERER_INFO_ACCESSOR_CODE (tags, const GstTagList *, NULL);
+#endif
/**
* gst_discoverer_info_get_toc:
* @info: a #GstDiscovererInfo
*
- * Returns: (transfer none): TOC contained in the URI. If you wish to use
+ * Returns: (transfer none) (nullable): TOC contained in the URI. If you wish to use
* the TOC after the life-time of @info, you will need to copy it.
*/