diff --git a/ChangeLog b/ChangeLog index c972406e14..7ca1d9160a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2005-11-21 Andy Wingo + + * ext/vorbis/vorbisdec.c (vorbis_dec_sink_event): + * gst/videorate/gstvideorate.c (gst_videorate_event): + * ext/theora/theoradec.c (theora_dec_sink_event): + * ext/theora/theoraenc.c (theora_enc_sink_event): Don't take + stream lock. + + * gst/subparse/gstsubparse.c (gst_subparse_src_event): + * ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek): Update for + stream lock changes. + 2005-11-21 Wim Taymans * gst-libs/gst/audio/gstbaseaudiosink.c: diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c index 7ae7f308cf..d3761eed9d 100644 --- a/ext/ogg/gstoggdemux.c +++ b/ext/ogg/gstoggdemux.c @@ -1574,7 +1574,7 @@ gst_ogg_demux_perform_seek (GstOggDemux * ogg) /* 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 (ogg->sinkpad); + GST_PAD_STREAM_LOCK (ogg->sinkpad); GST_OBJECT_LOCK (ogg); /* nothing configured, play complete file */ @@ -1786,21 +1786,21 @@ gst_ogg_demux_perform_seek (GstOggDemux * ogg) } /* streaming can continue now */ - GST_STREAM_UNLOCK (ogg->sinkpad); + GST_PAD_STREAM_UNLOCK (ogg->sinkpad); return TRUE; no_chains: { GST_DEBUG_OBJECT (ogg, "no chains"); - GST_STREAM_UNLOCK (ogg->sinkpad); + GST_PAD_STREAM_UNLOCK (ogg->sinkpad); return FALSE; } seek_error: { GST_DEBUG_OBJECT (ogg, "got a seek error"); - GST_STREAM_UNLOCK (ogg->sinkpad); + GST_PAD_STREAM_UNLOCK (ogg->sinkpad); return FALSE; } diff --git a/ext/theora/theoradec.c b/ext/theora/theoradec.c index 3b5259b30d..49ae54f225 100644 --- a/ext/theora/theoradec.c +++ b/ext/theora/theoradec.c @@ -599,9 +599,7 @@ theora_dec_sink_event (GstPad * pad, GstEvent * event) GST_LOG_OBJECT (dec, "handling event"); switch (GST_EVENT_TYPE (event)) { case GST_EVENT_EOS: - GST_STREAM_LOCK (pad); ret = gst_pad_push_event (dec->srcpad, event); - GST_STREAM_UNLOCK (pad); break; case GST_EVENT_NEWSEGMENT: { @@ -609,7 +607,6 @@ theora_dec_sink_event (GstPad * pad, GstEvent * event) gdouble rate; gint64 start, stop, time; - GST_STREAM_LOCK (pad); gst_event_parse_newsegment (event, NULL, &rate, &format, &start, &stop, &time); @@ -630,7 +627,6 @@ theora_dec_sink_event (GstPad * pad, GstEvent * event) dec->granulepos = -1; dec->last_timestamp = -1; ret = gst_pad_push_event (dec->srcpad, event); - GST_STREAM_UNLOCK (pad); break; } default: @@ -645,13 +641,11 @@ done: /* ERRORS */ newseg_wrong_format: { - GST_STREAM_UNLOCK (pad); GST_DEBUG ("received non TIME newsegment"); goto done; } newseg_wrong_rate: { - GST_STREAM_UNLOCK (pad); GST_DEBUG ("negative rates not supported yet"); goto done; } diff --git a/ext/theora/theoraenc.c b/ext/theora/theoraenc.c index 66fe21a6a9..ee40edfbad 100644 --- a/ext/theora/theoraenc.c +++ b/ext/theora/theoraenc.c @@ -423,7 +423,6 @@ theora_enc_sink_event (GstPad * pad, GstEvent * event) switch (GST_EVENT_TYPE (event)) { case GST_EVENT_EOS: - GST_STREAM_LOCK (pad); /* push last packet with eos flag */ while (theora_encode_packetout (&enc->state, 1, &op)) { GstClockTime out_time = @@ -432,7 +431,6 @@ theora_enc_sink_event (GstPad * pad, GstEvent * event) theora_push_packet (enc, &op, out_time, GST_SECOND / enc->fps); } res = gst_pad_push_event (enc->srcpad, event); - GST_STREAM_UNLOCK (pad); break; default: res = gst_pad_push_event (enc->srcpad, event); diff --git a/ext/vorbis/vorbisdec.c b/ext/vorbis/vorbisdec.c index 9b3a48d6e0..1c8f1cc720 100644 --- a/ext/vorbis/vorbisdec.c +++ b/ext/vorbis/vorbisdec.c @@ -428,9 +428,7 @@ vorbis_dec_sink_event (GstPad * pad, GstEvent * event) GST_LOG_OBJECT (dec, "handling event"); switch (GST_EVENT_TYPE (event)) { case GST_EVENT_EOS: - GST_STREAM_LOCK (pad); ret = gst_pad_push_event (dec->srcpad, event); - GST_STREAM_UNLOCK (pad); break; case GST_EVENT_NEWSEGMENT: { @@ -439,7 +437,6 @@ vorbis_dec_sink_event (GstPad * pad, GstEvent * event) gint64 start, stop, time; gboolean update; - GST_STREAM_LOCK (pad); gst_event_parse_newsegment (event, &update, &rate, &format, &start, &stop, &time); @@ -463,7 +460,6 @@ vorbis_dec_sink_event (GstPad * pad, GstEvent * event) vorbis_synthesis_restart (&dec->vd); #endif ret = gst_pad_push_event (dec->srcpad, event); - GST_STREAM_UNLOCK (pad); break; } default: @@ -477,13 +473,11 @@ done: /* ERRORS */ newseg_wrong_format: { - GST_STREAM_UNLOCK (pad); GST_DEBUG ("received non TIME newsegment"); goto done; } newseg_wrong_rate: { - GST_STREAM_UNLOCK (pad); GST_DEBUG ("negative rates not supported yet"); goto done; } diff --git a/ext/vorbis/vorbisenc.c b/ext/vorbis/vorbisenc.c index 27e9cc2267..e2f0af4927 100644 --- a/ext/vorbis/vorbisenc.c +++ b/ext/vorbis/vorbisenc.c @@ -884,17 +884,14 @@ gst_vorbisenc_sink_event (GstPad * pad, GstEvent * event) switch (GST_EVENT_TYPE (event)) { case GST_EVENT_EOS: - GST_STREAM_LOCK (pad); /* Tell the library we're at end of stream so that it can handle * the last frame and mark end of stream in the output properly */ GST_DEBUG_OBJECT (vorbisenc, "EOS, clearing state and sending event on"); gst_vorbisenc_clear (vorbisenc); res = gst_pad_push_event (vorbisenc->srcpad, event); - GST_STREAM_UNLOCK (pad); break; case GST_EVENT_TAG: - GST_STREAM_LOCK (pad); if (vorbisenc->tags) { GstTagList *list; @@ -905,7 +902,6 @@ gst_vorbisenc_sink_event (GstPad * pad, GstEvent * event) g_assert_not_reached (); } res = gst_pad_push_event (vorbisenc->srcpad, event); - GST_STREAM_UNLOCK (pad); break; default: res = gst_pad_push_event (vorbisenc->srcpad, event); diff --git a/gst/subparse/gstsubparse.c b/gst/subparse/gstsubparse.c index de3420ebc4..1434d0e876 100644 --- a/gst/subparse/gstsubparse.c +++ b/gst/subparse/gstsubparse.c @@ -184,13 +184,13 @@ gst_subparse_src_event (GstPad * pad, GstEvent * event) gst_event_unref (event); - GST_STREAM_LOCK (self->sinkpad); + GST_PAD_STREAM_LOCK (self->sinkpad); /* just seek to 0, rely on the overlayer to throw away buffers until the right time -- and his mother cried... */ self->next_offset = 0; - GST_STREAM_UNLOCK (self->sinkpad); + GST_PAD_STREAM_UNLOCK (self->sinkpad); gst_object_unref (self); diff --git a/gst/videorate/gstvideorate.c b/gst/videorate/gstvideorate.c index 5881045590..3245905ab7 100644 --- a/gst/videorate/gstvideorate.c +++ b/gst/videorate/gstvideorate.c @@ -394,8 +394,6 @@ gst_videorate_event (GstPad * pad, GstEvent * event) gboolean update; GstFormat format; - GST_STREAM_LOCK (pad); - gst_event_parse_newsegment (event, &update, &rate, &format, &start, &stop, &base); @@ -415,7 +413,6 @@ gst_videorate_event (GstPad * pad, GstEvent * event) GST_TIME_ARGS (videorate->segment_start), GST_TIME_ARGS (videorate->segment_stop)); } - GST_STREAM_UNLOCK (pad); break; }