ext/: Don't take the stream lock.
authorAndy Wingo <wingo@pobox.com>
Mon, 21 Nov 2005 17:34:30 +0000 (17:34 +0000)
committerAndy Wingo <wingo@pobox.com>
Mon, 21 Nov 2005 17:34:30 +0000 (17:34 +0000)
Original commit message from CVS:
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.

ChangeLog
ext/a52dec/gsta52dec.c
ext/mad/gstmad.c
ext/mpeg2dec/gstmpeg2dec.c
ext/sidplay/gstsiddec.cc
gst/realmedia/rmdemux.c

index 32540d8..1a7e411 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 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.
 
index 65d9a9f..556f904 100644 (file)
@@ -358,7 +358,6 @@ gst_a52dec_sink_event (GstPad * pad, GstEvent * event)
       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);
@@ -371,27 +370,22 @@ gst_a52dec_sink_event (GstPad * pad, GstEvent * 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);
index 5403e1e..ba145da 100644 (file)
@@ -981,18 +981,14 @@ gst_mad_sink_event (GstPad * pad, GstEvent * 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);
index e777175..dbd815e 100644 (file)
@@ -892,30 +892,24 @@ gst_mpeg2dec_sink_event (GstPad * pad, GstEvent * 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:
index d0b1b9a..27a3e28 100644 (file)
@@ -474,9 +474,7 @@ gst_siddec_sink_event (GstPad * pad, GstEvent * event)
 
   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;
index a1c6ce0..19f3adf 100644 (file)
@@ -534,7 +534,7 @@ gst_rmdemux_perform_seek (GstRMDemux * rmdemux, gboolean flush)
   /* 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");
 
@@ -609,7 +609,7 @@ gst_rmdemux_perform_seek (GstRMDemux * rmdemux, gboolean flush)
 done:
 
   /* streaming can continue now */
-  GST_STREAM_UNLOCK (rmdemux->sinkpad);
+  GST_PAD_STREAM_UNLOCK (rmdemux->sinkpad);
 
   return ret;
 }