summaryrefslogtreecommitdiff
path: root/farstream
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2012-09-25 15:08:26 -0400
committerOlivier CrĂȘte <olivier.crete@collabora.com>2012-09-25 16:23:53 -0400
commitdfcbd4cbcf111d6cfe6c174c4fdb5a9235062cf9 (patch)
tree168f70df15e0f7cf7d5d51ebbae320c8be5d9f1a /farstream
parent224a49a5c784efbe6bc4b9e8c7632332efcf7456 (diff)
downloadfarstream-dfcbd4cbcf111d6cfe6c174c4fdb5a9235062cf9.tar.gz
Port to GLib 2.32
Diffstat (limited to 'farstream')
-rw-r--r--farstream/fs-participant.c4
-rw-r--r--farstream/fs-participant.h6
-rw-r--r--farstream/fs-stream.c12
3 files changed, 11 insertions, 11 deletions
diff --git a/farstream/fs-participant.c b/farstream/fs-participant.c
index 125e9ba4..755ce9aa 100644
--- a/farstream/fs-participant.c
+++ b/farstream/fs-participant.c
@@ -85,14 +85,14 @@ static void
fs_participant_init (FsParticipant *self)
{
//self->priv = FS_PARTICIPANT_GET_PRIVATE (self);
- self->mutex = g_mutex_new ();
+ g_mutex_init (&self->mutex);
}
static void
fs_participant_finalize (GObject *object)
{
FsParticipant *self = FS_PARTICIPANT (object);
- g_mutex_free (self->mutex);
+ g_mutex_clear (&self->mutex);
G_OBJECT_CLASS (fs_participant_parent_class)->finalize (object);
}
diff --git a/farstream/fs-participant.h b/farstream/fs-participant.h
index 6658aa05..8124888a 100644
--- a/farstream/fs-participant.h
+++ b/farstream/fs-participant.h
@@ -78,7 +78,7 @@ struct _FsParticipant
/*< private >*/
- GMutex *mutex;
+ GMutex mutex;
FsParticipantPrivate *priv;
@@ -94,7 +94,7 @@ struct _FsParticipant
*/
#define FS_PARTICIPANT_DATA_LOCK(participant) \
- g_mutex_lock ((participant)->mutex)
+ g_mutex_lock (& FS_PARTICIPANT_CAST(participant)->mutex)
/**
* FS_PARTICIPANT_DATA_UNLOCK:
@@ -105,7 +105,7 @@ struct _FsParticipant
*/
#define FS_PARTICIPANT_DATA_UNLOCK(participant) \
- g_mutex_unlock ((participant)->mutex)
+ g_mutex_unlock (& FS_PARTICIPANT_CAST(participant)->mutex)
GType fs_participant_get_type (void);
diff --git a/farstream/fs-stream.c b/farstream/fs-stream.c
index c43cc72a..e74c7187 100644
--- a/farstream/fs-stream.c
+++ b/farstream/fs-stream.c
@@ -136,7 +136,7 @@ enum
struct _FsStreamPrivate
{
- GMutex *mutex;
+ GMutex mutex;
GList *src_pads;
guint32 src_pads_cookie;
};
@@ -162,8 +162,8 @@ static void fs_stream_pad_removed (FsStream *stream, GstPad *pad);
static guint signals[LAST_SIGNAL] = { 0 };
-#define FS_STREAM_LOCK(self) g_mutex_lock((self)->priv->mutex)
-#define FS_STREAM_UNLOCK(self) g_mutex_unlock((self)->priv->mutex)
+#define FS_STREAM_LOCK(self) g_mutex_lock(&(self)->priv->mutex)
+#define FS_STREAM_UNLOCK(self) g_mutex_unlock(&(self)->priv->mutex)
static void
fs_stream_class_init (FsStreamClass *klass)
@@ -337,7 +337,7 @@ fs_stream_init (FsStream *self)
{
/* member init */
self->priv = FS_STREAM_GET_PRIVATE (self);
- self->priv->mutex = g_mutex_new ();
+ g_mutex_init (&self->priv->mutex);
}
static void
@@ -362,7 +362,7 @@ fs_stream_finalize (GObject *obj)
FsStream *stream = FS_STREAM (obj);
g_list_free (stream->priv->src_pads);
- g_mutex_free (stream->priv->mutex);
+ g_mutex_clear (&stream->priv->mutex);
G_OBJECT_CLASS (fs_stream_parent_class)->finalize (obj);
}
@@ -596,7 +596,7 @@ fs_stream_emit_src_pad_added (FsStream *stream,
GstIterator *
fs_stream_iterate_src_pads (FsStream *stream)
{
- return gst_iterator_new_list (GST_TYPE_PAD, stream->priv->mutex,
+ return gst_iterator_new_list (GST_TYPE_PAD, &stream->priv->mutex,
&stream->priv->src_pads_cookie, &stream->priv->src_pads,
g_object_ref (stream), NULL);
}