2 * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
3 * <2007> Wim Taymans <wim.taymans@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., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
22 #ifndef __GST_STREAMINFO_H__
23 #define __GST_STREAMINFO_H__
29 #define GST_TYPE_STREAM_INFO (gst_stream_info_get_type())
30 #define GST_STREAM_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_STREAM_INFO,GstStreamInfo))
31 #define GST_STREAM_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_STREAM_INFO,GstStreamInfoClass))
32 #define GST_IS_STREAM_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_STREAM_INFO))
33 #define GST_IS_STREAM_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_STREAM_INFO))
35 typedef struct _GstStreamInfo GstStreamInfo;
36 typedef struct _GstStreamInfoClass GstStreamInfoClass;
39 GST_STREAM_TYPE_UNKNOWN = 0,
40 GST_STREAM_TYPE_AUDIO = 1, /* an audio stream */
41 GST_STREAM_TYPE_VIDEO = 2, /* a video stream */
42 GST_STREAM_TYPE_TEXT = 3, /* a subtitle/text stream */
43 GST_STREAM_TYPE_SUBPICTURE = 4, /* a subtitle in picture-form */
44 GST_STREAM_TYPE_ELEMENT = 5 /* stream handled by an element */
47 struct _GstStreamInfo {
50 GstObject *object; /* pad/element providing/handling this stream */
51 GstStreamType type; /* the type of the provided stream */
52 gchar *decoder; /* string describing the decoder */
53 gboolean mute; /* is the stream muted or not */
54 GstObject *origin; /* the real object providing this stream, this can
55 be different from the object as the object can be
56 a queue pad, inserted for preroll. */
57 GstCaps *caps; /* the caps of the stream */
59 /* this is tream information cached here because the streaminfo may be
60 * created before the app can know about it. */
65 struct _GstStreamInfoClass {
66 GObjectClass parent_class;
69 void (*muted) (GstStreamInfo *info, gboolean mute);
72 GType gst_stream_info_get_type (void);
74 GstStreamInfo* gst_stream_info_new (GstObject *object,
79 gboolean gst_stream_info_set_mute (GstStreamInfo *stream_info,
81 gboolean gst_stream_info_is_mute (GstStreamInfo *stream_info);
86 #endif /* __GST_STREAMINFO_H__ */