3 * Copyright (C) 2015 Brijesh Singh <brijesh.ksingh@gmail.com>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
21 #ifndef __GST_PLAYER_MEDIA_INFO_H__
22 #define __GST_PLAYER_MEDIA_INFO_H__
25 #include <gst/player/player-prelude.h>
29 #define GST_TYPE_PLAYER_STREAM_INFO \
30 (gst_player_stream_info_get_type ())
31 #define GST_PLAYER_STREAM_INFO(obj) \
32 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PLAYER_STREAM_INFO,GstPlayerStreamInfo))
33 #define GST_PLAYER_STREAM_INFO_CLASS(klass) \
34 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PLAYER_STREAM_INFO,GstPlayerStreamInfo))
35 #define GST_IS_PLAYER_STREAM_INFO(obj) \
36 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PLAYER_STREAM_INFO))
37 #define GST_IS_PLAYER_STREAM_INFO_CLASS(klass) \
38 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PLAYER_STREAM_INFO))
41 * GstPlayerStreamInfo:
43 * Base structure for information concering a media stream. Depending on
44 * the stream type, one can find more media-specific information in
45 * #GstPlayerVideoInfo, #GstPlayerAudioInfo, #GstPlayerSubtitleInfo.
47 typedef struct _GstPlayerStreamInfo GstPlayerStreamInfo;
48 typedef struct _GstPlayerStreamInfoClass GstPlayerStreamInfoClass;
51 GType gst_player_stream_info_get_type (void);
54 gint gst_player_stream_info_get_index (const GstPlayerStreamInfo *info);
57 const gchar* gst_player_stream_info_get_stream_type (const GstPlayerStreamInfo *info);
60 GstTagList* gst_player_stream_info_get_tags (const GstPlayerStreamInfo *info);
63 GstCaps* gst_player_stream_info_get_caps (const GstPlayerStreamInfo *info);
66 const gchar* gst_player_stream_info_get_codec (const GstPlayerStreamInfo *info);
68 #define GST_TYPE_PLAYER_VIDEO_INFO \
69 (gst_player_video_info_get_type ())
70 #define GST_PLAYER_VIDEO_INFO(obj) \
71 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PLAYER_VIDEO_INFO, GstPlayerVideoInfo))
72 #define GST_PLAYER_VIDEO_INFO_CLASS(klass) \
73 (G_TYPE_CHECK_CLASS_CAST((obj),GST_TYPE_PLAYER_VIDEO_INFO, GstPlayerVideoInfoClass))
74 #define GST_IS_PLAYER_VIDEO_INFO(obj) \
75 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PLAYER_VIDEO_INFO))
76 #define GST_IS_PLAYER_VIDEO_INFO_CLASS(klass) \
77 (G_TYPE_CHECK_CLASS_TYPE((obj),GST_TYPE_PLAYER_VIDEO_INFO))
82 * #GstPlayerStreamInfo specific to video streams.
84 typedef struct _GstPlayerVideoInfo GstPlayerVideoInfo;
85 typedef struct _GstPlayerVideoInfoClass GstPlayerVideoInfoClass;
88 GType gst_player_video_info_get_type (void);
91 gint gst_player_video_info_get_bitrate (const GstPlayerVideoInfo * info);
94 gint gst_player_video_info_get_max_bitrate (const GstPlayerVideoInfo * info);
97 gint gst_player_video_info_get_width (const GstPlayerVideoInfo * info);
100 gint gst_player_video_info_get_height (const GstPlayerVideoInfo * info);
103 void gst_player_video_info_get_framerate (const GstPlayerVideoInfo * info,
108 void gst_player_video_info_get_pixel_aspect_ratio (const GstPlayerVideoInfo * info,
112 #define GST_TYPE_PLAYER_AUDIO_INFO \
113 (gst_player_audio_info_get_type ())
114 #define GST_PLAYER_AUDIO_INFO(obj) \
115 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PLAYER_AUDIO_INFO, GstPlayerAudioInfo))
116 #define GST_PLAYER_AUDIO_INFO_CLASS(klass) \
117 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PLAYER_AUDIO_INFO, GstPlayerAudioInfoClass))
118 #define GST_IS_PLAYER_AUDIO_INFO(obj) \
119 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PLAYER_AUDIO_INFO))
120 #define GST_IS_PLAYER_AUDIO_INFO_CLASS(klass) \
121 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PLAYER_AUDIO_INFO))
124 * GstPlayerAudioInfo:
126 * #GstPlayerStreamInfo specific to audio streams.
128 typedef struct _GstPlayerAudioInfo GstPlayerAudioInfo;
129 typedef struct _GstPlayerAudioInfoClass GstPlayerAudioInfoClass;
132 GType gst_player_audio_info_get_type (void);
135 gint gst_player_audio_info_get_channels (const GstPlayerAudioInfo* info);
138 gint gst_player_audio_info_get_sample_rate (const GstPlayerAudioInfo* info);
141 gint gst_player_audio_info_get_bitrate (const GstPlayerAudioInfo* info);
144 gint gst_player_audio_info_get_max_bitrate (const GstPlayerAudioInfo* info);
147 const gchar* gst_player_audio_info_get_language (const GstPlayerAudioInfo* info);
149 #define GST_TYPE_PLAYER_SUBTITLE_INFO \
150 (gst_player_subtitle_info_get_type ())
151 #define GST_PLAYER_SUBTITLE_INFO(obj) \
152 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PLAYER_SUBTITLE_INFO, GstPlayerSubtitleInfo))
153 #define GST_PLAYER_SUBTITLE_INFO_CLASS(klass) \
154 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PLAYER_SUBTITLE_INFO,GstPlayerSubtitleInfoClass))
155 #define GST_IS_PLAYER_SUBTITLE_INFO(obj) \
156 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PLAYER_SUBTITLE_INFO))
157 #define GST_IS_PLAYER_SUBTITLE_INFO_CLASS(klass) \
158 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PLAYER_SUBTITLE_INFO))
161 * GstPlayerSubtitleInfo:
163 * #GstPlayerStreamInfo specific to subtitle streams.
165 typedef struct _GstPlayerSubtitleInfo GstPlayerSubtitleInfo;
166 typedef struct _GstPlayerSubtitleInfoClass GstPlayerSubtitleInfoClass;
169 GType gst_player_subtitle_info_get_type (void);
172 const gchar * gst_player_subtitle_info_get_language (const GstPlayerSubtitleInfo* info);
174 #define GST_TYPE_PLAYER_MEDIA_INFO \
175 (gst_player_media_info_get_type())
176 #define GST_PLAYER_MEDIA_INFO(obj) \
177 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PLAYER_MEDIA_INFO,GstPlayerMediaInfo))
178 #define GST_PLAYER_MEDIA_INFO_CLASS(klass) \
179 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PLAYER_MEDIA_INFO,GstPlayerMediaInfoClass))
180 #define GST_IS_PLAYER_MEDIA_INFO(obj) \
181 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PLAYER_MEDIA_INFO))
182 #define GST_IS_PLAYER_MEDIA_INFO_CLASS(klass) \
183 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PLAYER_MEDIA_INFO))
186 * GstPlayerMediaInfo:
188 * Structure containing the media information of a URI.
190 typedef struct _GstPlayerMediaInfo GstPlayerMediaInfo;
191 typedef struct _GstPlayerMediaInfoClass GstPlayerMediaInfoClass;
194 GType gst_player_media_info_get_type (void);
197 const gchar * gst_player_media_info_get_uri (const GstPlayerMediaInfo *info);
200 gboolean gst_player_media_info_is_seekable (const GstPlayerMediaInfo *info);
203 gboolean gst_player_media_info_is_live (const GstPlayerMediaInfo *info);
206 GstClockTime gst_player_media_info_get_duration (const GstPlayerMediaInfo *info);
209 GList* gst_player_media_info_get_stream_list (const GstPlayerMediaInfo *info);
212 guint gst_player_media_info_get_number_of_streams (const GstPlayerMediaInfo *info);
215 GList* gst_player_media_info_get_video_streams (const GstPlayerMediaInfo *info);
218 guint gst_player_media_info_get_number_of_video_streams (const GstPlayerMediaInfo *info);
221 GList* gst_player_media_info_get_audio_streams (const GstPlayerMediaInfo *info);
224 guint gst_player_media_info_get_number_of_audio_streams (const GstPlayerMediaInfo *info);
227 GList* gst_player_media_info_get_subtitle_streams (const GstPlayerMediaInfo *info);
230 guint gst_player_media_info_get_number_of_subtitle_streams (const GstPlayerMediaInfo *info);
233 GstTagList* gst_player_media_info_get_tags (const GstPlayerMediaInfo *info);
236 const gchar* gst_player_media_info_get_title (const GstPlayerMediaInfo *info);
239 const gchar* gst_player_media_info_get_container_format (const GstPlayerMediaInfo *info);
242 GstSample* gst_player_media_info_get_image_sample (const GstPlayerMediaInfo *info);
244 GST_PLAYER_DEPRECATED_FOR(gst_player_media_info_get_video_streams)
245 GList* gst_player_get_video_streams (const GstPlayerMediaInfo *info);
247 GST_PLAYER_DEPRECATED_FOR(gst_player_media_info_get_audio_streams)
248 GList* gst_player_get_audio_streams (const GstPlayerMediaInfo *info);
250 GST_PLAYER_DEPRECATED_FOR(gst_player_media_info_get_subtitle_streams)
251 GList* gst_player_get_subtitle_streams (const GstPlayerMediaInfo *info);
255 #endif /* __GST_PLAYER_MEDIA_INFO_H */