1/* GStreamer
2 *
3 * Copyright (C) 2015 Brijesh Singh <brijesh.ksingh@gmail.com>
4 *
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.
9 *
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.
14 *
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.
19 */
20
21#ifndef __GST_PLAY_MEDIA_INFO_H__
22#define __GST_PLAY_MEDIA_INFO_H__
23
24#include <gst/gst.h>
25#include <gst/play/play-prelude.h>
26
27G_BEGIN_DECLS
28
29/**
30 * GST_TYPE_PLAY_STREAM_INFO:
31 * Since: 1.20
32 */
33#define GST_TYPE_PLAY_STREAM_INFO \
34 (gst_play_stream_info_get_type ())
35#define GST_PLAY_STREAM_INFO(obj) \
36 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PLAY_STREAM_INFO,GstPlayStreamInfo))
37#define GST_PLAY_STREAM_INFO_CLASS(klass) \
38 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PLAY_STREAM_INFO,GstPlayStreamInfo))
39#define GST_IS_PLAY_STREAM_INFO(obj) \
40 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PLAY_STREAM_INFO))
41#define GST_IS_PLAY_STREAM_INFO_CLASS(klass) \
42 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PLAY_STREAM_INFO))
43
44/**
45 * GstPlayStreamInfo:
46 *
47 * Base structure for information concerning a media stream. Depending on
48 * the stream type, one can find more media-specific information in
49 * #GstPlayVideoInfo, #GstPlayAudioInfo, #GstPlaySubtitleInfo.
50 * Since: 1.20
51 */
52typedef struct _GstPlayStreamInfo GstPlayStreamInfo;
53typedef struct _GstPlayStreamInfoClass GstPlayStreamInfoClass;
54
55GST_PLAY_API
56GType gst_play_stream_info_get_type (void);
57
58GST_PLAY_API
59gint gst_play_stream_info_get_index (const GstPlayStreamInfo *info);
60
61GST_PLAY_API
62const gchar* gst_play_stream_info_get_stream_type (const GstPlayStreamInfo *info);
63
64GST_PLAY_API
65GstTagList* gst_play_stream_info_get_tags (const GstPlayStreamInfo *info);
66
67GST_PLAY_API
68GstCaps* gst_play_stream_info_get_caps (const GstPlayStreamInfo *info);
69
70GST_PLAY_API
71const gchar* gst_play_stream_info_get_codec (const GstPlayStreamInfo *info);
72
73/**
74 * GST_TYPE_PLAY_VIDEO_INFO:
75 * Since: 1.20
76 */
77#define GST_TYPE_PLAY_VIDEO_INFO \
78 (gst_play_video_info_get_type ())
79#define GST_PLAY_VIDEO_INFO(obj) \
80 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PLAY_VIDEO_INFO, GstPlayVideoInfo))
81#define GST_PLAY_VIDEO_INFO_CLASS(klass) \
82 (G_TYPE_CHECK_CLASS_CAST((obj),GST_TYPE_PLAY_VIDEO_INFO, GstPlayVideoInfoClass))
83#define GST_IS_PLAY_VIDEO_INFO(obj) \
84 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PLAY_VIDEO_INFO))
85#define GST_IS_PLAY_VIDEO_INFO_CLASS(klass) \
86 (G_TYPE_CHECK_CLASS_TYPE((obj),GST_TYPE_PLAY_VIDEO_INFO))
87
88/**
89 * GstPlayVideoInfo:
90 *
91 * #GstPlayStreamInfo specific to video streams.
92 * Since: 1.20
93 */
94typedef struct _GstPlayVideoInfo GstPlayVideoInfo;
95typedef struct _GstPlayVideoInfoClass GstPlayVideoInfoClass;
96
97GST_PLAY_API
98GType gst_play_video_info_get_type (void);
99
100GST_PLAY_API
101gint gst_play_video_info_get_bitrate (const GstPlayVideoInfo * info);
102
103GST_PLAY_API
104gint gst_play_video_info_get_max_bitrate (const GstPlayVideoInfo * info);
105
106GST_PLAY_API
107gint gst_play_video_info_get_width (const GstPlayVideoInfo * info);
108
109GST_PLAY_API
110gint gst_play_video_info_get_height (const GstPlayVideoInfo * info);
111
112GST_PLAY_API
113void gst_play_video_info_get_framerate (const GstPlayVideoInfo * info,
114 gint * fps_n,
115 gint * fps_d);
116
117GST_PLAY_API
118void gst_play_video_info_get_pixel_aspect_ratio (const GstPlayVideoInfo * info,
119 guint * par_n,
120 guint * par_d);
121
122/**
123 * GST_TYPE_PLAY_AUDIO_INFO:
124 * Since: 1.20
125 */
126#define GST_TYPE_PLAY_AUDIO_INFO \
127 (gst_play_audio_info_get_type ())
128#define GST_PLAY_AUDIO_INFO(obj) \
129 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PLAY_AUDIO_INFO, GstPlayAudioInfo))
130#define GST_PLAY_AUDIO_INFO_CLASS(klass) \
131 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PLAY_AUDIO_INFO, GstPlayAudioInfoClass))
132#define GST_IS_PLAY_AUDIO_INFO(obj) \
133 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PLAY_AUDIO_INFO))
134#define GST_IS_PLAY_AUDIO_INFO_CLASS(klass) \
135 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PLAY_AUDIO_INFO))
136
137/**
138 * GstPlayAudioInfo:
139 *
140 * #GstPlayStreamInfo specific to audio streams.
141 * Since: 1.20
142 */
143typedef struct _GstPlayAudioInfo GstPlayAudioInfo;
144typedef struct _GstPlayAudioInfoClass GstPlayAudioInfoClass;
145
146GST_PLAY_API
147GType gst_play_audio_info_get_type (void);
148
149GST_PLAY_API
150gint gst_play_audio_info_get_channels (const GstPlayAudioInfo* info);
151
152GST_PLAY_API
153gint gst_play_audio_info_get_sample_rate (const GstPlayAudioInfo* info);
154
155GST_PLAY_API
156gint gst_play_audio_info_get_bitrate (const GstPlayAudioInfo* info);
157
158GST_PLAY_API
159gint gst_play_audio_info_get_max_bitrate (const GstPlayAudioInfo* info);
160
161GST_PLAY_API
162const gchar* gst_play_audio_info_get_language (const GstPlayAudioInfo* info);
163
164/**
165 * GST_TYPE_PLAY_SUBTITLE_INFO:
166 * Since: 1.20
167 */
168#define GST_TYPE_PLAY_SUBTITLE_INFO \
169 (gst_play_subtitle_info_get_type ())
170#define GST_PLAY_SUBTITLE_INFO(obj) \
171 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PLAY_SUBTITLE_INFO, GstPlaySubtitleInfo))
172#define GST_PLAY_SUBTITLE_INFO_CLASS(klass) \
173 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PLAY_SUBTITLE_INFO,GstPlaySubtitleInfoClass))
174#define GST_IS_PLAY_SUBTITLE_INFO(obj) \
175 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PLAY_SUBTITLE_INFO))
176#define GST_IS_PLAY_SUBTITLE_INFO_CLASS(klass) \
177 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PLAY_SUBTITLE_INFO))
178
179/**
180 * GstPlaySubtitleInfo:
181 *
182 * #GstPlayStreamInfo specific to subtitle streams.
183 * Since: 1.20
184 */
185typedef struct _GstPlaySubtitleInfo GstPlaySubtitleInfo;
186typedef struct _GstPlaySubtitleInfoClass GstPlaySubtitleInfoClass;
187
188GST_PLAY_API
189GType gst_play_subtitle_info_get_type (void);
190
191GST_PLAY_API
192const gchar * gst_play_subtitle_info_get_language (const GstPlaySubtitleInfo* info);
193
194/**
195 * GST_TYPE_PLAY_MEDIA_INFO:
196 * Since: 1.20
197 */
198#define GST_TYPE_PLAY_MEDIA_INFO \
199 (gst_play_media_info_get_type())
200#define GST_PLAY_MEDIA_INFO(obj) \
201 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PLAY_MEDIA_INFO,GstPlayMediaInfo))
202#define GST_PLAY_MEDIA_INFO_CLASS(klass) \
203 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PLAY_MEDIA_INFO,GstPlayMediaInfoClass))
204#define GST_IS_PLAY_MEDIA_INFO(obj) \
205 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PLAY_MEDIA_INFO))
206#define GST_IS_PLAY_MEDIA_INFO_CLASS(klass) \
207 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PLAY_MEDIA_INFO))
208
209/**
210 * GstPlayMediaInfo:
211 *
212 * Structure containing the media information of a URI.
213 * Since: 1.20
214 */
215typedef struct _GstPlayMediaInfo GstPlayMediaInfo;
216typedef struct _GstPlayMediaInfoClass GstPlayMediaInfoClass;
217
218GST_PLAY_API
219GType gst_play_media_info_get_type (void);
220
221GST_PLAY_API
222const gchar * gst_play_media_info_get_uri (const GstPlayMediaInfo *info);
223
224GST_PLAY_API
225gboolean gst_play_media_info_is_seekable (const GstPlayMediaInfo *info);
226
227GST_PLAY_API
228gboolean gst_play_media_info_is_live (const GstPlayMediaInfo *info);
229
230GST_PLAY_API
231GstClockTime gst_play_media_info_get_duration (const GstPlayMediaInfo *info);
232
233GST_PLAY_API
234GList* gst_play_media_info_get_stream_list (const GstPlayMediaInfo *info);
235
236GST_PLAY_API
237guint gst_play_media_info_get_number_of_streams (const GstPlayMediaInfo *info);
238
239GST_PLAY_API
240GList* gst_play_media_info_get_video_streams (const GstPlayMediaInfo *info);
241
242GST_PLAY_API
243guint gst_play_media_info_get_number_of_video_streams (const GstPlayMediaInfo *info);
244
245GST_PLAY_API
246GList* gst_play_media_info_get_audio_streams (const GstPlayMediaInfo *info);
247
248GST_PLAY_API
249guint gst_play_media_info_get_number_of_audio_streams (const GstPlayMediaInfo *info);
250
251GST_PLAY_API
252GList* gst_play_media_info_get_subtitle_streams (const GstPlayMediaInfo *info);
253
254GST_PLAY_API
255guint gst_play_media_info_get_number_of_subtitle_streams (const GstPlayMediaInfo *info);
256
257GST_PLAY_API
258GstTagList* gst_play_media_info_get_tags (const GstPlayMediaInfo *info);
259
260GST_PLAY_API
261const gchar* gst_play_media_info_get_title (const GstPlayMediaInfo *info);
262
263GST_PLAY_API
264const gchar* gst_play_media_info_get_container_format (const GstPlayMediaInfo *info);
265
266GST_PLAY_API
267GstSample* gst_play_media_info_get_image_sample (const GstPlayMediaInfo *info);
268
269GST_PLAY_DEPRECATED_FOR(gst_play_media_info_get_video_streams)
270GList* gst_play_get_video_streams (const GstPlayMediaInfo *info);
271
272GST_PLAY_DEPRECATED_FOR(gst_play_media_info_get_audio_streams)
273GList* gst_play_get_audio_streams (const GstPlayMediaInfo *info);
274
275GST_PLAY_DEPRECATED_FOR(gst_play_media_info_get_subtitle_streams)
276GList* gst_play_get_subtitle_streams (const GstPlayMediaInfo *info);
277
278G_END_DECLS
279
280#endif /* __GST_PLAY_MEDIA_INFO_H */
281

Provided by KDAB

Privacy Policy
Learn Advanced QML with KDAB
Find out more

source code of include/gstreamer-1.0/gst/play/gstplay-media-info.h