From 19ddd9efd2fea2a2ac3a428f5341c1f60a6066ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 21 Dec 2016 11:38:11 +0200 Subject: [PATCH] player: Add deprecated compatibility functions for the audio/video/subtitle stream getters --- gst-libs/gst/player/gstplayer-media-info.c | 27 ++++++++++++++++++++++ gst-libs/gst/player/gstplayer-media-info.h | 10 ++++++++ win32/common/libgstplayer.def | 3 +++ 3 files changed, 40 insertions(+) diff --git a/gst-libs/gst/player/gstplayer-media-info.c b/gst-libs/gst/player/gstplayer-media-info.c index 74dec7cc0a..90b6dc3377 100644 --- a/gst-libs/gst/player/gstplayer-media-info.c +++ b/gst-libs/gst/player/gstplayer-media-info.c @@ -853,3 +853,30 @@ guint gst_player_media_info_get_number_of_subtitle_streams return g_list_length (info->subtitle_stream_list); } + +#ifndef GST_REMOVE_DEPRECATED +#ifdef GST_DISABLE_DEPRECATED +/* Forward declarations */ +GList *gst_player_get_video_streams (const GstPlayerMediaInfo * info); +GList *gst_player_get_audio_streams (const GstPlayerMediaInfo * info); +GList *gst_player_get_subtitle_streams (const GstPlayerMediaInfo * info); +#endif + +GList * +gst_player_get_video_streams (const GstPlayerMediaInfo * info) +{ + return gst_player_media_info_get_video_streams (info); +} + +GList * +gst_player_get_audio_streams (const GstPlayerMediaInfo * info) +{ + return gst_player_media_info_get_audio_streams (info); +} + +GList * +gst_player_get_subtitle_streams (const GstPlayerMediaInfo * info) +{ + return gst_player_media_info_get_subtitle_streams (info); +} +#endif diff --git a/gst-libs/gst/player/gstplayer-media-info.h b/gst-libs/gst/player/gstplayer-media-info.h index 063028d1ef..4bc3dd625f 100644 --- a/gst-libs/gst/player/gstplayer-media-info.h +++ b/gst-libs/gst/player/gstplayer-media-info.h @@ -197,6 +197,16 @@ const gchar* gst_player_media_info_get_container_format (const GstPlayerMediaInfo *info); GstSample* gst_player_media_info_get_image_sample (const GstPlayerMediaInfo *info); + +#ifndef GST_DISABLE_DEPRECATED +GList* gst_player_get_video_streams + (const GstPlayerMediaInfo *info); +GList* gst_player_get_audio_streams + (const GstPlayerMediaInfo *info); +GList* gst_player_get_subtitle_streams + (const GstPlayerMediaInfo *info); +#endif + G_END_DECLS #endif /* __GST_PLAYER_MEDIA_INFO_H */ diff --git a/win32/common/libgstplayer.def b/win32/common/libgstplayer.def index ad952e9257..210c74b09d 100644 --- a/win32/common/libgstplayer.def +++ b/win32/common/libgstplayer.def @@ -18,6 +18,7 @@ EXPORTS gst_player_error_quark gst_player_g_main_context_signal_dispatcher_get_type gst_player_g_main_context_signal_dispatcher_new + gst_player_get_audio_streams gst_player_get_audio_video_offset gst_player_get_color_balance gst_player_get_config @@ -33,9 +34,11 @@ EXPORTS gst_player_get_pipeline gst_player_get_position gst_player_get_rate + gst_player_get_subtitle_streams gst_player_get_subtitle_uri gst_player_get_type gst_player_get_uri + gst_player_get_video_streams gst_player_get_volume gst_player_has_color_balance gst_player_media_info_get_audio_streams