mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 12:32:29 +00:00
No need to take the lock anymore, core already did that before calling us.
Original commit message from CVS: * ext/mad/gstmad.c: (gst_mad_chain), (gst_mad_change_state): * ext/sidplay/gstsiddec.cc: * gst/alpha/gstalpha.c: (gst_alpha_chain): * gst/goom/gstgoom.c: (gst_goom_chain): No need to take the lock anymore, core already did that before calling us.
This commit is contained in:
parent
0e06450bdf
commit
2a98869f30
3 changed files with 26 additions and 28 deletions
|
@ -1,3 +1,12 @@
|
|||
2005-05-25 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* ext/mad/gstmad.c: (gst_mad_chain), (gst_mad_change_state):
|
||||
* ext/sidplay/gstsiddec.cc:
|
||||
* gst/alpha/gstalpha.c: (gst_alpha_chain):
|
||||
* gst/goom/gstgoom.c: (gst_goom_chain):
|
||||
No need to take the lock anymore, core already did
|
||||
that before calling us.
|
||||
|
||||
2005-05-25 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* ext/amrnb/amrnbdec.c: (gst_amrnbdec_init), (gst_amrnbdec_chain),
|
||||
|
|
|
@ -1283,8 +1283,6 @@ gst_mad_chain (GstPad * pad, GstBuffer * buffer)
|
|||
mad = GST_MAD (GST_PAD_PARENT (pad));
|
||||
g_return_val_if_fail (GST_IS_MAD (mad), GST_FLOW_ERROR);
|
||||
|
||||
GST_STREAM_LOCK (pad);
|
||||
|
||||
/* restarts happen on discontinuities, ie. seek, flush, PAUSED to PLAYING */
|
||||
if (gst_mad_check_restart (mad))
|
||||
GST_DEBUG ("mad restarted");
|
||||
|
@ -1591,7 +1589,6 @@ gst_mad_chain (GstPad * pad, GstBuffer * buffer)
|
|||
result = GST_FLOW_OK;
|
||||
|
||||
end:
|
||||
GST_STREAM_UNLOCK (pad);
|
||||
gst_buffer_unref (buffer);
|
||||
|
||||
return result;
|
||||
|
@ -1601,10 +1598,13 @@ static GstElementStateReturn
|
|||
gst_mad_change_state (GstElement * element)
|
||||
{
|
||||
GstMad *mad;
|
||||
GstElementStateReturn ret;
|
||||
gint transition;
|
||||
|
||||
mad = GST_MAD (element);
|
||||
transition = GST_STATE_TRANSITION (element);
|
||||
|
||||
switch (GST_STATE_TRANSITION (element)) {
|
||||
switch (transition) {
|
||||
case GST_STATE_NULL_TO_READY:
|
||||
break;
|
||||
case GST_STATE_READY_TO_PAUSED:
|
||||
|
@ -1635,12 +1635,17 @@ gst_mad_change_state (GstElement * element)
|
|||
break;
|
||||
}
|
||||
case GST_STATE_PAUSED_TO_PLAYING:
|
||||
/* do something to get out of the chain function faster */
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
ret = parent_class->change_state (element);
|
||||
|
||||
switch (transition) {
|
||||
case GST_STATE_PLAYING_TO_PAUSED:
|
||||
break;
|
||||
case GST_STATE_PAUSED_TO_READY:
|
||||
GST_STREAM_LOCK (mad->sinkpad);
|
||||
mad_synth_finish (&mad->synth);
|
||||
mad_frame_finish (&mad->frame);
|
||||
mad_stream_finish (&mad->stream);
|
||||
|
@ -1649,11 +1654,11 @@ gst_mad_change_state (GstElement * element)
|
|||
gst_tag_list_free (mad->tags);
|
||||
mad->tags = NULL;
|
||||
}
|
||||
GST_STREAM_UNLOCK (mad->sinkpad);
|
||||
break;
|
||||
case GST_STATE_READY_TO_NULL:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return parent_class->change_state (element);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -371,7 +371,6 @@ play_loop (GstPad * pad)
|
|||
|
||||
siddec = GST_SIDDEC (GST_PAD_PARENT (pad));
|
||||
|
||||
GST_STREAM_LOCK (pad);
|
||||
out = gst_buffer_new_and_alloc (siddec->blocksize);
|
||||
gst_buffer_set_caps (out, GST_PAD_CAPS (pad));
|
||||
|
||||
|
@ -406,14 +405,11 @@ play_loop (GstPad * pad)
|
|||
if ((ret = gst_pad_push (siddec->srcpad, out)) != GST_FLOW_OK)
|
||||
goto pause;
|
||||
|
||||
GST_STREAM_UNLOCK (pad);
|
||||
|
||||
return;
|
||||
|
||||
pause:
|
||||
{
|
||||
gst_task_pause (GST_RPAD_TASK (pad));
|
||||
GST_STREAM_UNLOCK (pad);
|
||||
gst_pad_pause_task (pad);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -434,16 +430,8 @@ start_play_tune (GstSidDec * siddec)
|
|||
siddec->tune_number))
|
||||
goto could_not_init;
|
||||
|
||||
if (GST_ELEMENT_SCHEDULER (siddec)) {
|
||||
GST_STREAM_LOCK (siddec->srcpad);
|
||||
GST_RPAD_TASK (siddec->srcpad) =
|
||||
gst_scheduler_create_task (GST_ELEMENT_SCHEDULER (siddec),
|
||||
(GstTaskFunction) play_loop, siddec->srcpad);
|
||||
|
||||
gst_task_start (GST_RPAD_TASK (siddec->srcpad));
|
||||
GST_STREAM_UNLOCK (siddec->srcpad);
|
||||
res = TRUE;
|
||||
}
|
||||
res = gst_pad_start_task (siddec->srcpad,
|
||||
(GstTaskFunction) play_loop, siddec->srcpad);
|
||||
return res;
|
||||
|
||||
/* ERRORS */
|
||||
|
@ -502,14 +490,10 @@ gst_siddec_chain (GstPad * pad, GstBuffer * buffer)
|
|||
if (siddec->tune_len + size > maxSidtuneFileLen)
|
||||
goto overflow;
|
||||
|
||||
GST_STREAM_LOCK (pad);
|
||||
|
||||
memcpy (siddec->tune_buffer + siddec->tune_len, GST_BUFFER_DATA (buffer),
|
||||
size);
|
||||
siddec->tune_len += size;
|
||||
|
||||
GST_STREAM_UNLOCK (pad);
|
||||
|
||||
gst_buffer_unref (buffer);
|
||||
|
||||
return GST_FLOW_OK;
|
||||
|
|
Loading…
Reference in a new issue