90 q->cur_level.visible, \ |
90 q->cur_level.visible, \ |
91 q->cur_level.bytes, \ |
91 q->cur_level.bytes, \ |
92 q->cur_level.time, \ |
92 q->cur_level.time, \ |
93 q->queue->length) |
93 q->queue->length) |
94 |
94 |
|
95 static void gst_data_queue_class_init (GstDataQueueClass * klass); |
|
96 static void gst_data_queue_init (GstDataQueue * queue); |
95 static void gst_data_queue_finalize (GObject * object); |
97 static void gst_data_queue_finalize (GObject * object); |
96 |
98 |
97 static void gst_data_queue_set_property (GObject * object, |
99 static void gst_data_queue_set_property (GObject * object, |
98 guint prop_id, const GValue * value, GParamSpec * pspec); |
100 guint prop_id, const GValue * value, GParamSpec * pspec); |
99 static void gst_data_queue_get_property (GObject * object, |
101 static void gst_data_queue_get_property (GObject * object, |
100 guint prop_id, GValue * value, GParamSpec * pspec); |
102 guint prop_id, GValue * value, GParamSpec * pspec); |
101 |
103 |
102 static GObjectClass *parent_class = NULL; |
104 static GObjectClass *parent_class = NULL; |
103 static guint gst_data_queue_signals[LAST_SIGNAL] = { 0 }; |
105 static guint gst_data_queue_signals[LAST_SIGNAL] = { 0 }; |
104 |
106 #ifdef __SYMBIAN32__ |
105 #define _do_init \ |
107 EXPORT_C |
106 { \ |
108 #endif |
107 GST_DEBUG_CATEGORY_INIT (data_queue_debug, "dataqueue", 0, \ |
109 |
108 "data queue object"); \ |
110 |
109 GST_DEBUG_CATEGORY_INIT (data_queue_dataflow, "data_queue_dataflow", 0, \ |
111 GType |
110 "dataflow inside the data queue object"); \ |
112 gst_data_queue_get_type (void) |
111 } |
113 { |
112 |
114 static GType queue_type = 0; |
113 |
115 |
114 G_DEFINE_TYPE_WITH_CODE (GstDataQueue, gst_data_queue, G_TYPE_OBJECT, _do_init); |
116 if (!queue_type) { |
|
117 static const GTypeInfo queue_info = { |
|
118 sizeof (GstDataQueueClass), |
|
119 NULL, |
|
120 NULL, |
|
121 (GClassInitFunc) gst_data_queue_class_init, |
|
122 NULL, |
|
123 NULL, |
|
124 sizeof (GstDataQueue), |
|
125 0, |
|
126 (GInstanceInitFunc) gst_data_queue_init, |
|
127 NULL |
|
128 }; |
|
129 |
|
130 queue_type = g_type_register_static (G_TYPE_OBJECT, |
|
131 "GstDataQueue", &queue_info, 0); |
|
132 GST_DEBUG_CATEGORY_INIT (data_queue_debug, "dataqueue", 0, |
|
133 "data queue object"); |
|
134 GST_DEBUG_CATEGORY_INIT (data_queue_dataflow, "data_queue_dataflow", 0, |
|
135 "dataflow inside the data queue object"); |
|
136 } |
|
137 |
|
138 return queue_type; |
|
139 } |
115 |
140 |
116 static void |
141 static void |
117 gst_data_queue_class_init (GstDataQueueClass * klass) |
142 gst_data_queue_class_init (GstDataQueueClass * klass) |
118 { |
143 { |
119 GObjectClass *gobject_class = G_OBJECT_CLASS (klass); |
144 GObjectClass *gobject_class = G_OBJECT_CLASS (klass); |
154 |
179 |
155 /* properties */ |
180 /* properties */ |
156 g_object_class_install_property (gobject_class, ARG_CUR_LEVEL_BYTES, |
181 g_object_class_install_property (gobject_class, ARG_CUR_LEVEL_BYTES, |
157 g_param_spec_uint ("current-level-bytes", "Current level (kB)", |
182 g_param_spec_uint ("current-level-bytes", "Current level (kB)", |
158 "Current amount of data in the queue (bytes)", |
183 "Current amount of data in the queue (bytes)", |
159 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); |
184 0, G_MAXUINT, 0, G_PARAM_READABLE)); |
160 g_object_class_install_property (gobject_class, ARG_CUR_LEVEL_VISIBLE, |
185 g_object_class_install_property (gobject_class, ARG_CUR_LEVEL_VISIBLE, |
161 g_param_spec_uint ("current-level-visible", |
186 g_param_spec_uint ("current-level-visible", |
162 "Current level (visible items)", |
187 "Current level (visible items)", |
163 "Current number of visible items in the queue", 0, G_MAXUINT, 0, |
188 "Current number of visible items in the queue", 0, G_MAXUINT, 0, |
164 G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); |
189 G_PARAM_READABLE)); |
165 g_object_class_install_property (gobject_class, ARG_CUR_LEVEL_TIME, |
190 g_object_class_install_property (gobject_class, ARG_CUR_LEVEL_TIME, |
166 g_param_spec_uint64 ("current-level-time", "Current level (ns)", |
191 g_param_spec_uint64 ("current-level-time", "Current level (ns)", |
167 "Current amount of data in the queue (in ns)", 0, G_MAXUINT64, 0, |
192 "Current amount of data in the queue (in ns)", 0, G_MAXUINT64, 0, |
168 G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); |
193 G_PARAM_READABLE)); |
169 |
194 |
170 /* set several parent class virtual functions */ |
195 /* set several parent class virtual functions */ |
171 gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_data_queue_finalize); |
196 gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_data_queue_finalize); |
172 |
197 |
173 } |
198 } |