rtsp-media: Remove duplicated media_unblock() function

It does literally the same as media_streams_set_blocked(FALSE).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/135>
This commit is contained in:
Sebastian Dröge 2020-06-15 18:17:40 +03:00
parent ef408ee167
commit e4624197da

View file

@ -2746,25 +2746,6 @@ media_streams_set_blocked (GstRTSPMedia * media, gboolean blocked)
priv->blocking_msg_received = 0;
}
static void
stream_unblock (GstRTSPStream * stream, GstRTSPMedia * media)
{
gst_rtsp_stream_set_blocked (stream, FALSE);
}
static void
media_unblock (GstRTSPMedia * media)
{
GstRTSPMediaPrivate *priv = media->priv;
GST_DEBUG ("media %p unblocking streams", media);
/* media is not blocked any longer, as it contains active streams,
* streams that are complete */
priv->blocked = FALSE;
g_ptr_array_foreach (priv->streams, (GFunc) stream_unblock, media);
priv->blocking_msg_received = 0;
}
static void
gst_rtsp_media_set_status (GstRTSPMedia * media, GstRTSPMediaStatus status)
{
@ -4605,7 +4586,7 @@ default_unsuspend (GstRTSPMedia * media)
/* at this point the media pipeline has been updated and contain all
* specific transport parts: all active streams contain at least one sink
* element and it's safe to unblock all blocked streams */
media_unblock (media);
media_streams_set_blocked (media, FALSE);
} else {
/* streams are not blocked and media is suspended from PAUSED */
gst_rtsp_media_set_status (media, GST_RTSP_MEDIA_STATUS_PREPARED);
@ -4626,7 +4607,7 @@ default_unsuspend (GstRTSPMedia * media)
/* at this point the media pipeline has been updated and contain all
* specific transport parts: all active streams contain at least one sink
* element and it's safe to unblock all blocked streams */
media_unblock (media);
media_streams_set_blocked (media, FALSE);
if (!start_preroll (media))
goto start_failed;
@ -4716,9 +4697,10 @@ media_set_pipeline_state_locked (GstRTSPMedia * media, GstState state)
if (priv->buffering) {
GST_INFO ("Buffering busy, delay state change");
} else {
if (state == GST_STATE_PLAYING)
if (state == GST_STATE_PLAYING) {
/* make sure pads are not blocking anymore when going to PLAYING */
media_unblock (media);
media_streams_set_blocked (media, FALSE);
}
if (state == GST_STATE_PAUSED) {
set_state_ret = set_state (media, state);
@ -4840,6 +4822,9 @@ gst_rtsp_media_set_state (GstRTSPMedia * media, GstState state,
}
}
if (activate)
media_streams_set_blocked (media, FALSE);
/* we just activated the first media, do the playing state change */
if (old_active == 0 && activate)
do_state = TRUE;