guint max_buffers;
gboolean drop;
- GCond *cond;
- GMutex *mutex;
+ GCond cond;
+ GMutex mutex;
GQueue *queue;
GstBuffer *preroll;
GstCaps *preroll_caps;
G_TYPE_INSTANCE_GET_PRIVATE (appsink, GST_TYPE_APP_SINK,
GstAppSinkPrivate);
- priv->mutex = g_mutex_new ();
- priv->cond = g_cond_new ();
+ g_mutex_init (&priv->mutex);
+ g_cond_init (&priv->cond);
priv->queue = g_queue_new ();
priv->emit_signals = DEFAULT_PROP_EMIT_SIGNALS;
GST_OBJECT_UNLOCK (appsink);
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
while ((queue_obj = g_queue_pop_head (priv->queue)))
gst_mini_object_unref (queue_obj);
gst_buffer_replace (&priv->preroll, NULL);
gst_caps_replace (&priv->preroll_caps, NULL);
gst_caps_replace (&priv->last_caps, NULL);
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
G_OBJECT_CLASS (parent_class)->dispose (obj);
}
GstAppSink *appsink = GST_APP_SINK_CAST (obj);
GstAppSinkPrivate *priv = appsink->priv;
- g_mutex_free (priv->mutex);
- g_cond_free (priv->cond);
+ g_mutex_clear (&priv->mutex);
+ g_cond_clear (&priv->cond);
g_queue_free (priv->queue);
G_OBJECT_CLASS (parent_class)->finalize (obj);
GstAppSink *appsink = GST_APP_SINK_CAST (bsink);
GstAppSinkPrivate *priv = appsink->priv;
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
GST_DEBUG_OBJECT (appsink, "unlock start");
priv->unlock = TRUE;
- g_cond_signal (priv->cond);
- g_mutex_unlock (priv->mutex);
+ g_cond_signal (&priv->cond);
+ g_mutex_unlock (&priv->mutex);
return TRUE;
}
GstAppSink *appsink = GST_APP_SINK_CAST (bsink);
GstAppSinkPrivate *priv = appsink->priv;
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
GST_DEBUG_OBJECT (appsink, "unlock stop");
priv->unlock = FALSE;
- g_cond_signal (priv->cond);
- g_mutex_unlock (priv->mutex);
+ g_cond_signal (&priv->cond);
+ g_mutex_unlock (&priv->mutex);
return TRUE;
}
while ((obj = g_queue_pop_head (priv->queue)))
gst_mini_object_unref (obj);
priv->num_buffers = 0;
- g_cond_signal (priv->cond);
+ g_cond_signal (&priv->cond);
}
static gboolean
GstAppSink *appsink = GST_APP_SINK_CAST (psink);
GstAppSinkPrivate *priv = appsink->priv;
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
GST_DEBUG_OBJECT (appsink, "starting");
priv->flushing = FALSE;
priv->started = TRUE;
gst_segment_init (&priv->last_segment, GST_FORMAT_TIME);
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
return TRUE;
}
GstAppSink *appsink = GST_APP_SINK_CAST (psink);
GstAppSinkPrivate *priv = appsink->priv;
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
GST_DEBUG_OBJECT (appsink, "stopping");
priv->flushing = TRUE;
priv->started = FALSE;
gst_app_sink_flush_unlocked (appsink);
gst_caps_replace (&priv->preroll_caps, NULL);
gst_caps_replace (&priv->last_caps, NULL);
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
return TRUE;
}
GstAppSink *appsink = GST_APP_SINK_CAST (sink);
GstAppSinkPrivate *priv = appsink->priv;
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
GST_DEBUG_OBJECT (appsink, "receiving CAPS");
g_queue_push_tail (priv->queue, gst_event_new_caps (caps));
gst_caps_replace (&priv->preroll_caps, caps);
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
return TRUE;
}
switch (event->type) {
case GST_EVENT_SEGMENT:
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
GST_DEBUG_OBJECT (appsink, "receiving SEGMENT");
g_queue_push_tail (priv->queue, gst_event_ref (event));
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
break;
case GST_EVENT_EOS:
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
GST_DEBUG_OBJECT (appsink, "receiving EOS");
priv->is_eos = TRUE;
- g_cond_signal (priv->cond);
- g_mutex_unlock (priv->mutex);
+ g_cond_signal (&priv->cond);
+ g_mutex_unlock (&priv->mutex);
/* emit EOS now */
if (priv->callbacks.eos)
GST_DEBUG_OBJECT (appsink, "received FLUSH_START");
break;
case GST_EVENT_FLUSH_STOP:
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
GST_DEBUG_OBJECT (appsink, "received FLUSH_STOP");
gst_app_sink_flush_unlocked (appsink);
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
break;
default:
break;
GstAppSinkPrivate *priv = appsink->priv;
gboolean emit;
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
if (priv->flushing)
goto flushing;
GST_DEBUG_OBJECT (appsink, "setting preroll buffer %p", buffer);
gst_buffer_replace (&priv->preroll, buffer);
- g_cond_signal (priv->cond);
+ g_cond_signal (&priv->cond);
emit = priv->emit_signals;
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
if (priv->callbacks.new_preroll)
res = priv->callbacks.new_preroll (appsink, priv->user_data);
flushing:
{
GST_DEBUG_OBJECT (appsink, "we are flushing");
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
return GST_FLOW_FLUSHING;
}
}
gboolean emit;
restart:
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
if (priv->flushing)
goto flushing;
if (priv->unlock) {
/* we are asked to unlock, call the wait_preroll method */
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
if ((ret = gst_base_sink_wait_preroll (psink)) != GST_FLOW_OK)
goto stopping;
}
/* wait for a buffer to be removed or flush */
- g_cond_wait (priv->cond, priv->mutex);
+ g_cond_wait (&priv->cond, &priv->mutex);
if (priv->flushing)
goto flushing;
}
/* we need to ref the buffer when pushing it in the queue */
g_queue_push_tail (priv->queue, gst_buffer_ref (buffer));
priv->num_buffers++;
- g_cond_signal (priv->cond);
+ g_cond_signal (&priv->cond);
emit = priv->emit_signals;
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
if (priv->callbacks.new_sample)
priv->callbacks.new_sample (appsink, priv->user_data);
flushing:
{
GST_DEBUG_OBJECT (appsink, "we are flushing");
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
return GST_FLOW_FLUSHING;
}
stopping:
priv = appsink->priv;
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
if (!priv->started)
goto not_started;
GST_DEBUG_OBJECT (appsink, "we are not yet EOS");
ret = FALSE;
}
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
return ret;
not_started:
{
GST_DEBUG_OBJECT (appsink, "we are stopped, return TRUE");
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
return TRUE;
}
}
priv = appsink->priv;
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
priv->emit_signals = emit;
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
}
/**
priv = appsink->priv;
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
result = priv->emit_signals;
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
return result;
}
priv = appsink->priv;
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
if (max != priv->max_buffers) {
priv->max_buffers = max;
/* signal the change */
- g_cond_signal (priv->cond);
+ g_cond_signal (&priv->cond);
}
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
}
/**
priv = appsink->priv;
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
result = priv->max_buffers;
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
return result;
}
priv = appsink->priv;
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
if (priv->drop != drop) {
priv->drop = drop;
/* signal the change */
- g_cond_signal (priv->cond);
+ g_cond_signal (&priv->cond);
}
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
}
/**
priv = appsink->priv;
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
result = priv->drop;
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
return result;
}
priv = appsink->priv;
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
while (TRUE) {
GST_DEBUG_OBJECT (appsink, "trying to grab a buffer");
/* nothing to return, wait */
GST_DEBUG_OBJECT (appsink, "waiting for the preroll buffer");
- g_cond_wait (priv->cond, priv->mutex);
+ g_cond_wait (&priv->cond, &priv->mutex);
}
sample =
gst_sample_new (priv->preroll, priv->preroll_caps, &priv->last_segment,
NULL);
GST_DEBUG_OBJECT (appsink, "we have the preroll sample %p", sample);
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
return sample;
eos:
{
GST_DEBUG_OBJECT (appsink, "we are EOS, return NULL");
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
return NULL;
}
not_started:
{
GST_DEBUG_OBJECT (appsink, "we are stopped, return NULL");
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
return NULL;
}
}
priv = appsink->priv;
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
while (TRUE) {
GST_DEBUG_OBJECT (appsink, "trying to grab a buffer");
/* nothing to return, wait */
GST_DEBUG_OBJECT (appsink, "waiting for a buffer");
- g_cond_wait (priv->cond, priv->mutex);
+ g_cond_wait (&priv->cond, &priv->mutex);
}
buffer = dequeue_buffer (appsink);
GST_DEBUG_OBJECT (appsink, "we have a buffer %p", buffer);
sample = gst_sample_new (buffer, priv->last_caps, &priv->last_segment, NULL);
gst_buffer_unref (buffer);
- g_cond_signal (priv->cond);
- g_mutex_unlock (priv->mutex);
+ g_cond_signal (&priv->cond);
+ g_mutex_unlock (&priv->mutex);
return sample;
eos:
{
GST_DEBUG_OBJECT (appsink, "we are EOS, return NULL");
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
return NULL;
}
not_started:
{
GST_DEBUG_OBJECT (appsink, "we are stopped, return NULL");
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
return NULL;
}
}
struct _GstAppSrcPrivate
{
- GCond *cond;
- GMutex *mutex;
+ GCond cond;
+ GMutex mutex;
GQueue *queue;
GstCaps *caps;
priv = appsrc->priv = G_TYPE_INSTANCE_GET_PRIVATE (appsrc, GST_TYPE_APP_SRC,
GstAppSrcPrivate);
- priv->mutex = g_mutex_new ();
- priv->cond = g_cond_new ();
+ g_mutex_init (&priv->mutex);
+ g_cond_init (&priv->cond);
priv->queue = g_queue_new ();
priv->size = DEFAULT_PROP_SIZE;
GstAppSrc *appsrc = GST_APP_SRC_CAST (obj);
GstAppSrcPrivate *priv = appsrc->priv;
- g_mutex_free (priv->mutex);
- g_cond_free (priv->cond);
+ g_mutex_clear (&priv->mutex);
+ g_cond_clear (&priv->cond);
+ g_cond_clear (&priv->cond);
g_queue_free (priv->queue);
g_free (priv->uri);
GstAppSrc *appsrc = GST_APP_SRC_CAST (bsrc);
GstAppSrcPrivate *priv = appsrc->priv;
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
GST_DEBUG_OBJECT (appsrc, "unlock start");
priv->flushing = TRUE;
- g_cond_broadcast (priv->cond);
- g_mutex_unlock (priv->mutex);
+ g_cond_broadcast (&priv->cond);
+ g_mutex_unlock (&priv->mutex);
return TRUE;
}
GstAppSrc *appsrc = GST_APP_SRC_CAST (bsrc);
GstAppSrcPrivate *priv = appsrc->priv;
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
GST_DEBUG_OBJECT (appsrc, "unlock stop");
priv->flushing = FALSE;
- g_cond_broadcast (priv->cond);
- g_mutex_unlock (priv->mutex);
+ g_cond_broadcast (&priv->cond);
+ g_mutex_unlock (&priv->mutex);
return TRUE;
}
GstAppSrc *appsrc = GST_APP_SRC_CAST (bsrc);
GstAppSrcPrivate *priv = appsrc->priv;
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
GST_DEBUG_OBJECT (appsrc, "starting");
priv->new_caps = FALSE;
priv->started = TRUE;
* in random-access mode. */
priv->offset = -1;
priv->flushing = FALSE;
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
gst_base_src_set_format (bsrc, priv->format);
GstAppSrc *appsrc = GST_APP_SRC_CAST (bsrc);
GstAppSrcPrivate *priv = appsrc->priv;
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
GST_DEBUG_OBJECT (appsrc, "stopping");
priv->is_eos = FALSE;
priv->flushing = TRUE;
priv->started = FALSE;
gst_app_src_flush_queued (appsrc);
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
return TRUE;
}
res = gst_base_src_query_latency (src, &live, &min, &max);
/* overwrite with our values when we need to */
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
if (priv->min_latency != -1)
min = priv->min_latency;
if (priv->max_latency != -1)
max = priv->max_latency;
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
gst_query_set_latency (query, live, min, max);
break;
else {
gboolean emit;
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
emit = priv->emit_signals;
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
if (emit)
g_signal_emit (appsrc, gst_app_src_signals[SIGNAL_SEEK_DATA], 0,
GstAppSrcPrivate *priv = appsrc->priv;
emit = priv->emit_signals;
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
GST_DEBUG_OBJECT (appsrc,
"we are at %" G_GINT64_FORMAT ", seek to %" G_GINT64_FORMAT,
g_signal_emit (appsrc, gst_app_src_signals[SIGNAL_SEEK_DATA], 0,
offset, &res);
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
return res;
}
GstAppSrcPrivate *priv = appsrc->priv;
emit = priv->emit_signals;
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
/* we have no data, we need some. We fire the signal with the size hint. */
if (priv->callbacks.need_data)
g_signal_emit (appsrc, gst_app_src_signals[SIGNAL_NEED_DATA], 0, size,
NULL);
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
/* we can be flushing now because we released the lock */
}
GstAppSrcPrivate *priv = appsrc->priv;
gboolean result;
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
result = gst_app_src_do_negotiate (basesrc);
priv->new_caps = FALSE;
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
return result;
}
GST_OBJECT_UNLOCK (appsrc);
}
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
/* check flushing first */
if (G_UNLIKELY (priv->flushing))
goto flushing;
priv->offset += buf_size;
/* signal that we removed an item */
- g_cond_broadcast (priv->cond);
+ g_cond_broadcast (&priv->cond);
/* see if we go lower than the empty-percent */
if (priv->min_percent && priv->max_bytes) {
goto eos;
/* nothing to return, wait a while for new data or flushing. */
- g_cond_wait (priv->cond, priv->mutex);
+ g_cond_wait (&priv->cond, &priv->mutex);
}
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
return ret;
/* ERRORS */
flushing:
{
GST_DEBUG_OBJECT (appsrc, "we are flushing");
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
return GST_FLOW_FLUSHING;
}
eos:
{
GST_DEBUG_OBJECT (appsrc, "we are EOS");
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
return GST_FLOW_EOS;
}
seek_error:
{
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
GST_ELEMENT_ERROR (appsrc, RESOURCE, READ, ("failed to seek"),
GST_ERROR_SYSTEM);
return GST_FLOW_ERROR;
priv->caps = NULL;
if (old)
gst_caps_unref (old);
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
priv->new_caps = TRUE;
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
}
GST_OBJECT_UNLOCK (appsrc);
}
priv = appsrc->priv;
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
if (max != priv->max_bytes) {
GST_DEBUG_OBJECT (appsrc, "setting max-bytes to %" G_GUINT64_FORMAT, max);
priv->max_bytes = max;
/* signal the change */
- g_cond_broadcast (priv->cond);
+ g_cond_broadcast (&priv->cond);
}
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
}
/**
priv = appsrc->priv;
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
result = priv->max_bytes;
GST_DEBUG_OBJECT (appsrc, "getting max-bytes of %" G_GUINT64_FORMAT, result);
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
return result;
}
GstAppSrcPrivate *priv = appsrc->priv;
gboolean changed = FALSE;
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
if (do_min && priv->min_latency != min) {
priv->min_latency = min;
changed = TRUE;
priv->max_latency = max;
changed = TRUE;
}
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
if (changed) {
GST_DEBUG_OBJECT (appsrc, "posting latency changed");
priv = appsrc->priv;
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
if (min)
*min = priv->min_latency;
if (max)
*max = priv->max_latency;
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
}
/**
priv = appsrc->priv;
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
priv->emit_signals = emit;
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
}
/**
priv = appsrc->priv;
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
result = priv->emit_signals;
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
return result;
}
priv = appsrc->priv;
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
while (TRUE) {
/* can't accept buffers when we are flushing or EOS */
emit = priv->emit_signals;
/* only signal on the first push */
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
if (priv->callbacks.enough_data)
priv->callbacks.enough_data (appsrc, priv->user_data);
g_signal_emit (appsrc, gst_app_src_signals[SIGNAL_ENOUGH_DATA], 0,
NULL);
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
/* continue to check for flushing/eos after releasing the lock */
first = FALSE;
continue;
GST_DEBUG_OBJECT (appsrc, "waiting for free space");
/* we are filled, wait until a buffer gets popped or when we
* flush. */
- g_cond_wait (priv->cond, priv->mutex);
+ g_cond_wait (&priv->cond, &priv->mutex);
} else {
/* no need to wait for free space, we just pump more data into the
* queue hoping that the caller reacts to the enough-data signal and
gst_buffer_ref (buffer);
g_queue_push_tail (priv->queue, buffer);
priv->queued_bytes += gst_buffer_get_size (buffer);
- g_cond_broadcast (priv->cond);
- g_mutex_unlock (priv->mutex);
+ g_cond_broadcast (&priv->cond);
+ g_mutex_unlock (&priv->mutex);
return GST_FLOW_OK;
GST_DEBUG_OBJECT (appsrc, "refuse buffer %p, we are flushing", buffer);
if (steal_ref)
gst_buffer_unref (buffer);
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
return GST_FLOW_FLUSHING;
}
eos:
GST_DEBUG_OBJECT (appsrc, "refuse buffer %p, we are EOS", buffer);
if (steal_ref)
gst_buffer_unref (buffer);
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
return GST_FLOW_EOS;
}
}
priv = appsrc->priv;
- g_mutex_lock (priv->mutex);
+ g_mutex_lock (&priv->mutex);
/* can't accept buffers when we are flushing. We can accept them when we are
* EOS although it will not do anything. */
if (priv->flushing)
GST_DEBUG_OBJECT (appsrc, "sending EOS");
priv->is_eos = TRUE;
- g_cond_broadcast (priv->cond);
- g_mutex_unlock (priv->mutex);
+ g_cond_broadcast (&priv->cond);
+ g_mutex_unlock (&priv->mutex);
return GST_FLOW_OK;
/* ERRORS */
flushing:
{
- g_mutex_unlock (priv->mutex);
+ g_mutex_unlock (&priv->mutex);
GST_DEBUG_OBJECT (appsrc, "refuse EOS, we are flushing");
return GST_FLOW_FLUSHING;
}