summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--gnl/gnlcomposition.c18
-rw-r--r--gnl/gnlsource.c6
3 files changed, 14 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index 51e8ed0..499c576 100644
--- a/configure.ac
+++ b/configure.ac
@@ -102,7 +102,7 @@ dnl *** checks for library functions ***
dnl *** checks for dependancy libraries ***
dnl GLib is required
-AG_GST_GLIB_CHECK([2.22])
+AG_GST_GLIB_CHECK([2.31])
dnl checks for gstreamer
dnl uninstalled is selected preferentially -- see pkg-config(1)
diff --git a/gnl/gnlcomposition.c b/gnl/gnlcomposition.c
index 4d62222..d29b2f4 100644
--- a/gnl/gnlcomposition.c
+++ b/gnl/gnlcomposition.c
@@ -79,7 +79,7 @@ struct _GnlCompositionPrivate
GList *objects_start;
GList *objects_stop;
GHashTable *objects_hash;
- GMutex *objects_lock;
+ GMutex objects_lock;
/* Update properties
* can_update: If True, updates should be taken into account immediatly, else
@@ -95,7 +95,7 @@ struct _GnlCompositionPrivate
flushing :
pending_idle :
*/
- GMutex *flushing_lock;
+ GMutex flushing_lock;
gboolean flushing;
guint pending_idle;
@@ -200,7 +200,7 @@ static void no_more_pads_object_cb (GstElement * element,
#define COMP_OBJECTS_LOCK(comp) G_STMT_START { \
GST_LOG_OBJECT (comp, "locking objects_lock from thread %p", \
g_thread_self()); \
- g_mutex_lock (comp->priv->objects_lock); \
+ g_mutex_lock (&comp->priv->objects_lock); \
GST_LOG_OBJECT (comp, "locked objects_lock from thread %p", \
g_thread_self()); \
} G_STMT_END
@@ -208,14 +208,14 @@ static void no_more_pads_object_cb (GstElement * element,
#define COMP_OBJECTS_UNLOCK(comp) G_STMT_START { \
GST_LOG_OBJECT (comp, "unlocking objects_lock from thread %p", \
g_thread_self()); \
- g_mutex_unlock (comp->priv->objects_lock); \
+ g_mutex_unlock (&comp->priv->objects_lock); \
} G_STMT_END
#define COMP_FLUSHING_LOCK(comp) G_STMT_START { \
GST_LOG_OBJECT (comp, "locking flushing_lock from thread %p", \
g_thread_self()); \
- g_mutex_lock (comp->priv->flushing_lock); \
+ g_mutex_lock (&comp->priv->flushing_lock); \
GST_LOG_OBJECT (comp, "locked flushing_lock from thread %p", \
g_thread_self()); \
} G_STMT_END
@@ -223,7 +223,7 @@ static void no_more_pads_object_cb (GstElement * element,
#define COMP_FLUSHING_UNLOCK(comp) G_STMT_START { \
GST_LOG_OBJECT (comp, "unlocking flushing_lock from thread %p", \
g_thread_self()); \
- g_mutex_unlock (comp->priv->flushing_lock); \
+ g_mutex_unlock (&comp->priv->flushing_lock); \
} G_STMT_END
@@ -339,14 +339,14 @@ gnl_composition_init (GnlComposition * comp)
priv = G_TYPE_INSTANCE_GET_PRIVATE (comp, GNL_TYPE_COMPOSITION,
GnlCompositionPrivate);
- priv->objects_lock = g_mutex_new ();
+ g_mutex_init (&priv->objects_lock);
priv->objects_start = NULL;
priv->objects_stop = NULL;
priv->can_update = TRUE;
priv->update_required = FALSE;
- priv->flushing_lock = g_mutex_new ();
+ g_mutex_init (&priv->flushing_lock);
priv->flushing = FALSE;
priv->pending_idle = 0;
@@ -415,11 +415,9 @@ gnl_composition_finalize (GObject * object)
g_hash_table_destroy (priv->objects_hash);
COMP_OBJECTS_UNLOCK (comp);
- g_mutex_free (priv->objects_lock);
gst_segment_free (priv->segment);
gst_segment_free (priv->outside_segment);
- g_mutex_free (priv->flushing_lock);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
diff --git a/gnl/gnlsource.c b/gnl/gnlsource.c
index fcd1c48..42e0c36 100644
--- a/gnl/gnlsource.c
+++ b/gnl/gnlsource.c
@@ -363,9 +363,13 @@ pad_blocked_cb (GstPad * pad, GstPadProbeInfo * info, GnlSource * source)
GST_DEBUG_OBJECT (pad, "probe callback");
if (!source->priv->ghostpad && !source->priv->areblocked) {
+ GThread *lthread;
+
source->priv->areblocked = TRUE;
GST_DEBUG_OBJECT (pad, "starting thread to call ghost_seek_pad");
- g_thread_create ((GThreadFunc) ghost_seek_pad, source, FALSE, NULL);
+ lthread =
+ g_thread_new ("gnlsourceseek", (GThreadFunc) ghost_seek_pad, source);
+ g_thread_unref (lthread);
}
return GST_PAD_PROBE_OK;