|
1 /* GStreamer |
|
2 * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu> |
|
3 * <2007> Wim Taymans <wim.taymans@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., 59 Temple Place - Suite 330, |
|
18 * Boston, MA 02111-1307, USA. |
|
19 */ |
|
20 |
|
21 |
|
22 #ifndef __GST_STREAMINFO_H__ |
|
23 #define __GST_STREAMINFO_H__ |
|
24 |
|
25 #include <gst/gst.h> |
|
26 |
|
27 G_BEGIN_DECLS |
|
28 |
|
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)) |
|
34 |
|
35 typedef struct _GstStreamInfo GstStreamInfo; |
|
36 typedef struct _GstStreamInfoClass GstStreamInfoClass; |
|
37 |
|
38 typedef enum { |
|
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 */ |
|
45 } GstStreamType; |
|
46 |
|
47 struct _GstStreamInfo { |
|
48 GObject parent; |
|
49 |
|
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 */ |
|
58 |
|
59 /* this is tream information cached here because the streaminfo may be |
|
60 * created before the app can know about it. */ |
|
61 gchar *langcode, |
|
62 *codec; |
|
63 }; |
|
64 |
|
65 struct _GstStreamInfoClass { |
|
66 GObjectClass parent_class; |
|
67 |
|
68 /* signals */ |
|
69 void (*muted) (GstStreamInfo *info, gboolean mute); |
|
70 }; |
|
71 #ifdef __SYMBIAN32__ |
|
72 IMPORT_C |
|
73 #endif |
|
74 |
|
75 |
|
76 GType gst_stream_info_get_type (void); |
|
77 #ifdef __SYMBIAN32__ |
|
78 IMPORT_C |
|
79 #endif |
|
80 |
|
81 |
|
82 GstStreamInfo* gst_stream_info_new (GstObject *object, |
|
83 GstStreamType type, |
|
84 const gchar *decoder, |
|
85 const GstCaps *caps); |
|
86 #ifdef __SYMBIAN32__ |
|
87 IMPORT_C |
|
88 #endif |
|
89 |
|
90 |
|
91 gboolean gst_stream_info_set_mute (GstStreamInfo *stream_info, |
|
92 gboolean mute); |
|
93 #ifdef __SYMBIAN32__ |
|
94 IMPORT_C |
|
95 #endif |
|
96 |
|
97 gboolean gst_stream_info_is_mute (GstStreamInfo *stream_info); |
|
98 |
|
99 |
|
100 G_END_DECLS |
|
101 |
|
102 #endif /* __GST_STREAMINFO_H__ */ |