mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-02 16:52:42 +00:00
Don't take stream lock.
Original commit message from CVS: 2005-11-21 Andy Wingo <wingo@pobox.com> * 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.
This commit is contained in:
parent
0f2336cff6
commit
137c23468e
8 changed files with 18 additions and 27 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
||||||
|
2005-11-21 Andy Wingo <wingo@pobox.com>
|
||||||
|
|
||||||
|
* 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 <wim@fluendo.com>
|
2005-11-21 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
* gst-libs/gst/audio/gstbaseaudiosink.c:
|
* gst-libs/gst/audio/gstbaseaudiosink.c:
|
||||||
|
|
|
@ -1574,7 +1574,7 @@ gst_ogg_demux_perform_seek (GstOggDemux * ogg)
|
||||||
/* now grab the stream lock so that streaming cannot continue, for
|
/* now grab the stream lock so that streaming cannot continue, for
|
||||||
* non flushing seeks when the element is in PAUSED this could block
|
* non flushing seeks when the element is in PAUSED this could block
|
||||||
* forever. */
|
* forever. */
|
||||||
GST_STREAM_LOCK (ogg->sinkpad);
|
GST_PAD_STREAM_LOCK (ogg->sinkpad);
|
||||||
|
|
||||||
GST_OBJECT_LOCK (ogg);
|
GST_OBJECT_LOCK (ogg);
|
||||||
/* nothing configured, play complete file */
|
/* nothing configured, play complete file */
|
||||||
|
@ -1786,21 +1786,21 @@ gst_ogg_demux_perform_seek (GstOggDemux * ogg)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* streaming can continue now */
|
/* streaming can continue now */
|
||||||
GST_STREAM_UNLOCK (ogg->sinkpad);
|
GST_PAD_STREAM_UNLOCK (ogg->sinkpad);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
no_chains:
|
no_chains:
|
||||||
{
|
{
|
||||||
GST_DEBUG_OBJECT (ogg, "no chains");
|
GST_DEBUG_OBJECT (ogg, "no chains");
|
||||||
GST_STREAM_UNLOCK (ogg->sinkpad);
|
GST_PAD_STREAM_UNLOCK (ogg->sinkpad);
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
seek_error:
|
seek_error:
|
||||||
{
|
{
|
||||||
GST_DEBUG_OBJECT (ogg, "got a seek error");
|
GST_DEBUG_OBJECT (ogg, "got a seek error");
|
||||||
GST_STREAM_UNLOCK (ogg->sinkpad);
|
GST_PAD_STREAM_UNLOCK (ogg->sinkpad);
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -599,9 +599,7 @@ theora_dec_sink_event (GstPad * pad, GstEvent * event)
|
||||||
GST_LOG_OBJECT (dec, "handling event");
|
GST_LOG_OBJECT (dec, "handling event");
|
||||||
switch (GST_EVENT_TYPE (event)) {
|
switch (GST_EVENT_TYPE (event)) {
|
||||||
case GST_EVENT_EOS:
|
case GST_EVENT_EOS:
|
||||||
GST_STREAM_LOCK (pad);
|
|
||||||
ret = gst_pad_push_event (dec->srcpad, event);
|
ret = gst_pad_push_event (dec->srcpad, event);
|
||||||
GST_STREAM_UNLOCK (pad);
|
|
||||||
break;
|
break;
|
||||||
case GST_EVENT_NEWSEGMENT:
|
case GST_EVENT_NEWSEGMENT:
|
||||||
{
|
{
|
||||||
|
@ -609,7 +607,6 @@ theora_dec_sink_event (GstPad * pad, GstEvent * event)
|
||||||
gdouble rate;
|
gdouble rate;
|
||||||
gint64 start, stop, time;
|
gint64 start, stop, time;
|
||||||
|
|
||||||
GST_STREAM_LOCK (pad);
|
|
||||||
gst_event_parse_newsegment (event, NULL, &rate, &format, &start, &stop,
|
gst_event_parse_newsegment (event, NULL, &rate, &format, &start, &stop,
|
||||||
&time);
|
&time);
|
||||||
|
|
||||||
|
@ -630,7 +627,6 @@ theora_dec_sink_event (GstPad * pad, GstEvent * event)
|
||||||
dec->granulepos = -1;
|
dec->granulepos = -1;
|
||||||
dec->last_timestamp = -1;
|
dec->last_timestamp = -1;
|
||||||
ret = gst_pad_push_event (dec->srcpad, event);
|
ret = gst_pad_push_event (dec->srcpad, event);
|
||||||
GST_STREAM_UNLOCK (pad);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
@ -645,13 +641,11 @@ done:
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
newseg_wrong_format:
|
newseg_wrong_format:
|
||||||
{
|
{
|
||||||
GST_STREAM_UNLOCK (pad);
|
|
||||||
GST_DEBUG ("received non TIME newsegment");
|
GST_DEBUG ("received non TIME newsegment");
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
newseg_wrong_rate:
|
newseg_wrong_rate:
|
||||||
{
|
{
|
||||||
GST_STREAM_UNLOCK (pad);
|
|
||||||
GST_DEBUG ("negative rates not supported yet");
|
GST_DEBUG ("negative rates not supported yet");
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
|
@ -423,7 +423,6 @@ theora_enc_sink_event (GstPad * pad, GstEvent * event)
|
||||||
|
|
||||||
switch (GST_EVENT_TYPE (event)) {
|
switch (GST_EVENT_TYPE (event)) {
|
||||||
case GST_EVENT_EOS:
|
case GST_EVENT_EOS:
|
||||||
GST_STREAM_LOCK (pad);
|
|
||||||
/* push last packet with eos flag */
|
/* push last packet with eos flag */
|
||||||
while (theora_encode_packetout (&enc->state, 1, &op)) {
|
while (theora_encode_packetout (&enc->state, 1, &op)) {
|
||||||
GstClockTime out_time =
|
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);
|
theora_push_packet (enc, &op, out_time, GST_SECOND / enc->fps);
|
||||||
}
|
}
|
||||||
res = gst_pad_push_event (enc->srcpad, event);
|
res = gst_pad_push_event (enc->srcpad, event);
|
||||||
GST_STREAM_UNLOCK (pad);
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
res = gst_pad_push_event (enc->srcpad, event);
|
res = gst_pad_push_event (enc->srcpad, event);
|
||||||
|
|
|
@ -428,9 +428,7 @@ vorbis_dec_sink_event (GstPad * pad, GstEvent * event)
|
||||||
GST_LOG_OBJECT (dec, "handling event");
|
GST_LOG_OBJECT (dec, "handling event");
|
||||||
switch (GST_EVENT_TYPE (event)) {
|
switch (GST_EVENT_TYPE (event)) {
|
||||||
case GST_EVENT_EOS:
|
case GST_EVENT_EOS:
|
||||||
GST_STREAM_LOCK (pad);
|
|
||||||
ret = gst_pad_push_event (dec->srcpad, event);
|
ret = gst_pad_push_event (dec->srcpad, event);
|
||||||
GST_STREAM_UNLOCK (pad);
|
|
||||||
break;
|
break;
|
||||||
case GST_EVENT_NEWSEGMENT:
|
case GST_EVENT_NEWSEGMENT:
|
||||||
{
|
{
|
||||||
|
@ -439,7 +437,6 @@ vorbis_dec_sink_event (GstPad * pad, GstEvent * event)
|
||||||
gint64 start, stop, time;
|
gint64 start, stop, time;
|
||||||
gboolean update;
|
gboolean update;
|
||||||
|
|
||||||
GST_STREAM_LOCK (pad);
|
|
||||||
gst_event_parse_newsegment (event, &update, &rate, &format, &start, &stop,
|
gst_event_parse_newsegment (event, &update, &rate, &format, &start, &stop,
|
||||||
&time);
|
&time);
|
||||||
|
|
||||||
|
@ -463,7 +460,6 @@ vorbis_dec_sink_event (GstPad * pad, GstEvent * event)
|
||||||
vorbis_synthesis_restart (&dec->vd);
|
vorbis_synthesis_restart (&dec->vd);
|
||||||
#endif
|
#endif
|
||||||
ret = gst_pad_push_event (dec->srcpad, event);
|
ret = gst_pad_push_event (dec->srcpad, event);
|
||||||
GST_STREAM_UNLOCK (pad);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
@ -477,13 +473,11 @@ done:
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
newseg_wrong_format:
|
newseg_wrong_format:
|
||||||
{
|
{
|
||||||
GST_STREAM_UNLOCK (pad);
|
|
||||||
GST_DEBUG ("received non TIME newsegment");
|
GST_DEBUG ("received non TIME newsegment");
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
newseg_wrong_rate:
|
newseg_wrong_rate:
|
||||||
{
|
{
|
||||||
GST_STREAM_UNLOCK (pad);
|
|
||||||
GST_DEBUG ("negative rates not supported yet");
|
GST_DEBUG ("negative rates not supported yet");
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
|
@ -884,17 +884,14 @@ gst_vorbisenc_sink_event (GstPad * pad, GstEvent * event)
|
||||||
|
|
||||||
switch (GST_EVENT_TYPE (event)) {
|
switch (GST_EVENT_TYPE (event)) {
|
||||||
case GST_EVENT_EOS:
|
case GST_EVENT_EOS:
|
||||||
GST_STREAM_LOCK (pad);
|
|
||||||
/* Tell the library we're at end of stream so that it can handle
|
/* 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 */
|
* the last frame and mark end of stream in the output properly */
|
||||||
GST_DEBUG_OBJECT (vorbisenc, "EOS, clearing state and sending event on");
|
GST_DEBUG_OBJECT (vorbisenc, "EOS, clearing state and sending event on");
|
||||||
gst_vorbisenc_clear (vorbisenc);
|
gst_vorbisenc_clear (vorbisenc);
|
||||||
|
|
||||||
res = gst_pad_push_event (vorbisenc->srcpad, event);
|
res = gst_pad_push_event (vorbisenc->srcpad, event);
|
||||||
GST_STREAM_UNLOCK (pad);
|
|
||||||
break;
|
break;
|
||||||
case GST_EVENT_TAG:
|
case GST_EVENT_TAG:
|
||||||
GST_STREAM_LOCK (pad);
|
|
||||||
if (vorbisenc->tags) {
|
if (vorbisenc->tags) {
|
||||||
GstTagList *list;
|
GstTagList *list;
|
||||||
|
|
||||||
|
@ -905,7 +902,6 @@ gst_vorbisenc_sink_event (GstPad * pad, GstEvent * event)
|
||||||
g_assert_not_reached ();
|
g_assert_not_reached ();
|
||||||
}
|
}
|
||||||
res = gst_pad_push_event (vorbisenc->srcpad, event);
|
res = gst_pad_push_event (vorbisenc->srcpad, event);
|
||||||
GST_STREAM_UNLOCK (pad);
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
res = gst_pad_push_event (vorbisenc->srcpad, event);
|
res = gst_pad_push_event (vorbisenc->srcpad, event);
|
||||||
|
|
|
@ -184,13 +184,13 @@ gst_subparse_src_event (GstPad * pad, GstEvent * event)
|
||||||
|
|
||||||
gst_event_unref (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
|
/* just seek to 0, rely on the overlayer to throw away buffers until the right
|
||||||
time -- and his mother cried... */
|
time -- and his mother cried... */
|
||||||
self->next_offset = 0;
|
self->next_offset = 0;
|
||||||
|
|
||||||
GST_STREAM_UNLOCK (self->sinkpad);
|
GST_PAD_STREAM_UNLOCK (self->sinkpad);
|
||||||
|
|
||||||
gst_object_unref (self);
|
gst_object_unref (self);
|
||||||
|
|
||||||
|
|
|
@ -394,8 +394,6 @@ gst_videorate_event (GstPad * pad, GstEvent * event)
|
||||||
gboolean update;
|
gboolean update;
|
||||||
GstFormat format;
|
GstFormat format;
|
||||||
|
|
||||||
GST_STREAM_LOCK (pad);
|
|
||||||
|
|
||||||
gst_event_parse_newsegment (event, &update, &rate, &format, &start, &stop,
|
gst_event_parse_newsegment (event, &update, &rate, &format, &start, &stop,
|
||||||
&base);
|
&base);
|
||||||
|
|
||||||
|
@ -415,7 +413,6 @@ gst_videorate_event (GstPad * pad, GstEvent * event)
|
||||||
GST_TIME_ARGS (videorate->segment_start),
|
GST_TIME_ARGS (videorate->segment_start),
|
||||||
GST_TIME_ARGS (videorate->segment_stop));
|
GST_TIME_ARGS (videorate->segment_stop));
|
||||||
}
|
}
|
||||||
GST_STREAM_UNLOCK (pad);
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue