summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/player/gstplayer-media-info.c62
-rw-r--r--gst-libs/gst/player/gstplayer-media-info.h8
2 files changed, 70 insertions, 0 deletions
diff --git a/gst-libs/gst/player/gstplayer-media-info.c b/gst-libs/gst/player/gstplayer-media-info.c
index bba8ea69d..a6c17c465 100644
--- a/gst-libs/gst/player/gstplayer-media-info.c
+++ b/gst-libs/gst/player/gstplayer-media-info.c
@@ -791,3 +791,65 @@ gst_player_media_info_get_image_sample (const GstPlayerMediaInfo * info)
return info->image_sample;
}
+
+/**
+ * gst_player_media_info_get_number_of_streams:
+ * @info: a #GstPlayerMediaInfo
+ *
+ * Returns: number of total streams.
+ * Since: 1.12
+ */
+guint
+gst_player_media_info_get_number_of_streams (const GstPlayerMediaInfo * info)
+{
+ g_return_val_if_fail (GST_IS_PLAYER_MEDIA_INFO (info), 0);
+
+ return g_list_length (info->stream_list);
+}
+
+/**
+ * gst_player_media_info_get_number_of_video_streams:
+ * @info: a #GstPlayerMediaInfo
+ *
+ * Returns: number of video streams.
+ * Since: 1.12
+ */
+guint
+gst_player_media_info_get_number_of_video_streams (const GstPlayerMediaInfo *
+ info)
+{
+ g_return_val_if_fail (GST_IS_PLAYER_MEDIA_INFO (info), 0);
+
+ return g_list_length (info->video_stream_list);
+}
+
+/**
+ * gst_player_media_info_get_number_of_audio_streams:
+ * @info: a #GstPlayerMediaInfo
+ *
+ * Returns: number of audio streams.
+ * Since: 1.12
+ */
+guint
+gst_player_media_info_get_number_of_audio_streams (const GstPlayerMediaInfo *
+ info)
+{
+ g_return_val_if_fail (GST_IS_PLAYER_MEDIA_INFO (info), 0);
+
+ return g_list_length (info->audio_stream_list);
+}
+
+/**
+ * gst_player_media_info_get_number_of_subtitle_streams:
+ * @info: a #GstPlayerMediaInfo
+ *
+ * Returns: number of subtitle streams.
+ * Since: 1.12
+ */
+guint gst_player_media_info_get_number_of_subtitle_streams
+ (const GstPlayerMediaInfo * info)
+{
+ g_return_val_if_fail (GST_IS_PLAYER_MEDIA_INFO (info), 0);
+
+ return g_list_length (info->subtitle_stream_list);
+}
diff --git a/gst-libs/gst/player/gstplayer-media-info.h b/gst-libs/gst/player/gstplayer-media-info.h
index 7ffd6b493..6866ff6a8 100644
--- a/gst-libs/gst/player/gstplayer-media-info.h
+++ b/gst-libs/gst/player/gstplayer-media-info.h
@@ -175,12 +175,20 @@ GstClockTime gst_player_media_info_get_duration
(const GstPlayerMediaInfo *info);
GList* gst_player_media_info_get_stream_list
(const GstPlayerMediaInfo *info);
+guint gst_player_media_info_get_number_of_streams
+ (const GstPlayerMediaInfo *info);
GList* gst_player_get_video_streams
(const GstPlayerMediaInfo *info);
+guint gst_player_media_info_get_number_of_video_streams
+ (const GstPlayerMediaInfo *info);
GList* gst_player_get_audio_streams
(const GstPlayerMediaInfo *info);
+guint gst_player_media_info_get_number_of_audio_streams
+ (const GstPlayerMediaInfo *info);
GList* gst_player_get_subtitle_streams
(const GstPlayerMediaInfo *info);
+guint gst_player_media_info_get_number_of_subtitle_streams
+ (const GstPlayerMediaInfo *info);
GstTagList* gst_player_media_info_get_tags
(const GstPlayerMediaInfo *info);
const gchar* gst_player_media_info_get_title