static void gst_data_queue_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GstDataQueue *queue = GST_DATA_QUEUE (object); GstDataQueuePrivate *priv = queue->priv; GST_DATA_QUEUE_MUTEX_LOCK (queue); switch (prop_id) { case PROP_CUR_LEVEL_BYTES: g_value_set_uint (value, priv->cur_level.bytes); break; case PROP_CUR_LEVEL_VISIBLE: g_value_set_uint (value, priv->cur_level.visible); break; case PROP_CUR_LEVEL_TIME: g_value_set_uint64 (value, priv->cur_level.time); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } GST_DATA_QUEUE_MUTEX_UNLOCK (queue); }
/* called only once, as opposed to dispose */ static void gst_data_queue_finalize (GObject * object) { GstDataQueue *queue = GST_DATA_QUEUE (object); GST_DEBUG ("finalizing queue"); gst_data_queue_cleanup (queue); g_queue_free (queue->queue); GST_DEBUG ("free mutex"); g_mutex_free (queue->qlock); GST_DEBUG ("done free mutex"); g_cond_free (queue->item_add); g_cond_free (queue->item_del); G_OBJECT_CLASS (parent_class)->finalize (object); }