2 * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
21 #ifndef __GST_STREAMINFO_H__
22 #define __GST_STREAMINFO_H__
28 #define GST_TYPE_STREAM_INFO (gst_stream_info_get_type())
29 #define GST_STREAM_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_STREAM_INFO,GstStreamInfo))
30 #define GST_STREAM_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_STREAM_INFO,GstStreamInfoClass))
31 #define GST_IS_STREAM_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_STREAM_INFO))
32 #define GST_IS_STREAM_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_STREAM_INFO))
34 typedef struct _GstStreamInfo GstStreamInfo;
35 typedef struct _GstStreamInfoClass GstStreamInfoClass;
38 GST_STREAM_TYPE_UNKNOWN = 0,
39 GST_STREAM_TYPE_AUDIO = 1, /* an audio stream */
40 GST_STREAM_TYPE_VIDEO = 2, /* a video stream */
41 GST_STREAM_TYPE_TEXT = 3, /* a subtitle/text stream */
42 GST_STREAM_TYPE_ELEMENT = 4, /* stream handled by an element */
45 struct _GstStreamInfo {
48 GstObject *object; /* pad/element providing/handling this stream */
49 GstStreamType type; /* the type of the provided stream */
50 gchar *decoder; /* string describing the decoder */
51 gboolean mute; /* is the stream muted or not */
52 GstObject *origin; /* the real object providing this stream, this can
53 be different from the object as the object can be
54 a queue pad, inserted for preroll. */
55 GstCaps *caps; /* the caps of the stream */
57 /* this is tream information cached here because the streaminfo may be
58 * created before the app can know about it. */
63 struct _GstStreamInfoClass {
64 GObjectClass parent_class;
67 void (*muted) (GstStreamInfo *info, gboolean mute);
70 GType gst_stream_info_get_type (void);
72 GstStreamInfo* gst_stream_info_new (GstObject *object,
77 gboolean gst_stream_info_set_mute (GstStreamInfo *stream_info,
79 gboolean gst_stream_info_is_mute (GstStreamInfo *stream_info);
84 #endif /* __GST_STREAMINFO_H__ */