mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
player: Add get track number media info API
https://bugzilla.gnome.org/show_bug.cgi?id=773570
This commit is contained in:
parent
9b5de05399
commit
9294dc4ac7
4 changed files with 78 additions and 0 deletions
|
@ -2070,6 +2070,10 @@ gst_player_media_info_is_live
|
|||
gst_player_media_info_get_image_sample
|
||||
gst_player_media_info_get_tags
|
||||
gst_player_media_info_get_stream_list
|
||||
gst_player_media_info_get_number_of_streams
|
||||
gst_player_media_info_get_number_of_video_streams
|
||||
gst_player_media_info_get_number_of_audio_streams
|
||||
gst_player_media_info_get_number_of_subtitle_streams
|
||||
|
||||
gst_player_stream_info_get_index
|
||||
gst_player_stream_info_get_caps
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -44,6 +44,10 @@ EXPORTS
|
|||
gst_player_media_info_get_container_format
|
||||
gst_player_media_info_get_duration
|
||||
gst_player_media_info_get_image_sample
|
||||
gst_player_media_info_get_number_of_audio_streams
|
||||
gst_player_media_info_get_number_of_streams
|
||||
gst_player_media_info_get_number_of_subtitle_streams
|
||||
gst_player_media_info_get_number_of_video_streams
|
||||
gst_player_media_info_get_stream_list
|
||||
gst_player_media_info_get_tags
|
||||
gst_player_media_info_get_title
|
||||
|
|
Loading…
Reference in a new issue