2005-11-21 Andy Wingo <wingo@pobox.com>
+ * ext/sidplay/gstsiddec.cc (gst_siddec_sink_event):
+ * ext/mpeg2dec/gstmpeg2dec.c (gst_mpeg2dec_sink_event):
+ * ext/mad/gstmad.c (gst_mad_sink_event):
+ * ext/a52dec/gsta52dec.c (gst_a52dec_sink_event): Don't take the
+ stream lock.
+
+ * gst/realmedia/rmdemux.c (gst_rmdemux_perform_seek): Update for
+ stream lock changes.
+
* *.h:
* *.c: Ran scripts/update-macros. Oh yes.
GstFormat format;
gint64 val;
- GST_STREAM_LOCK (pad);
gst_event_parse_newsegment (event, NULL, NULL, &format, &val, NULL, NULL);
if (format != GST_FORMAT_TIME || !GST_CLOCK_TIME_IS_VALID (val)) {
GST_WARNING ("No time in newsegment event %p", event);
a52dec->cache = NULL;
}
ret = gst_pad_event_default (pad, event);
- GST_STREAM_UNLOCK (pad);
break;
}
case GST_EVENT_TAG:
case GST_EVENT_EOS:{
- GST_STREAM_LOCK (pad);
ret = gst_pad_event_default (pad, event);
- GST_STREAM_UNLOCK (pad);
break;
}
case GST_EVENT_FLUSH_START:
ret = gst_pad_event_default (pad, event);
break;
case GST_EVENT_FLUSH_STOP:
- GST_STREAM_LOCK (pad);
if (a52dec->cache) {
gst_buffer_unref (a52dec->cache);
a52dec->cache = NULL;
}
ret = gst_pad_event_default (pad, event);
- GST_STREAM_UNLOCK (pad);
break;
default:
ret = gst_pad_event_default (pad, event);
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_NEWSEGMENT:
/* this isn't really correct? */
- GST_STREAM_LOCK (pad);
result = gst_pad_push_event (mad->srcpad, event);
mad->tempsize = 0;
/* we don't need to restart when we get here */
mad->restart = FALSE;
- GST_STREAM_UNLOCK (pad);
break;
case GST_EVENT_EOS:
- GST_STREAM_LOCK (pad);
mad->caps_set = FALSE; /* could be a new stream */
result = gst_pad_push_event (mad->srcpad, event);
- GST_STREAM_UNLOCK (pad);
break;
default:
result = gst_pad_push_event (mad->srcpad, event);
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_NEWSEGMENT:
{
- GST_STREAM_LOCK (pad);
mpeg2dec->next_time = -1;;
ret = gst_pad_event_default (pad, event);
- GST_STREAM_UNLOCK (pad);
break;
}
case GST_EVENT_FLUSH_START:
ret = gst_pad_event_default (pad, event);
break;
case GST_EVENT_FLUSH_STOP:
- GST_STREAM_LOCK (pad);
mpeg2dec->discont_state = MPEG2DEC_DISC_NEW_PICTURE;
mpeg2dec->next_time = -1;;
mpeg2_reset (mpeg2dec->decoder, 0);
ret = gst_pad_event_default (pad, event);
- GST_STREAM_UNLOCK (pad);
break;
case GST_EVENT_EOS:
- GST_STREAM_LOCK (pad);
if (mpeg2dec->index && mpeg2dec->closed) {
gst_index_commit (mpeg2dec->index, mpeg2dec->index_id);
}
ret = gst_pad_event_default (pad, event);
- GST_STREAM_UNLOCK (pad);
break;
default:
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_EOS:
- GST_STREAM_LOCK (pad);
res = start_play_tune (siddec);
- GST_STREAM_UNLOCK (pad);
break;
case GST_EVENT_NEWSEGMENT:
res = FALSE;
/* now grab the stream lock so that streaming cannot continue, for
* non flushing seeks when the element is in PAUSED this could block
* forever. */
- GST_STREAM_LOCK (rmdemux->sinkpad);
+ GST_PAD_STREAM_LOCK (rmdemux->sinkpad);
GST_LOG_OBJECT (rmdemux, "Took streamlock");
done:
/* streaming can continue now */
- GST_STREAM_UNLOCK (rmdemux->sinkpad);
+ GST_PAD_STREAM_UNLOCK (rmdemux->sinkpad);
return ret;
}