mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 11:40:38 +00:00
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:
parent
ef408ee167
commit
e4624197da
1 changed files with 8 additions and 23 deletions
|
@ -2746,25 +2746,6 @@ media_streams_set_blocked (GstRTSPMedia * media, gboolean blocked)
|
||||||
priv->blocking_msg_received = 0;
|
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
|
static void
|
||||||
gst_rtsp_media_set_status (GstRTSPMedia * media, GstRTSPMediaStatus status)
|
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
|
/* at this point the media pipeline has been updated and contain all
|
||||||
* specific transport parts: all active streams contain at least one sink
|
* specific transport parts: all active streams contain at least one sink
|
||||||
* element and it's safe to unblock all blocked streams */
|
* element and it's safe to unblock all blocked streams */
|
||||||
media_unblock (media);
|
media_streams_set_blocked (media, FALSE);
|
||||||
} else {
|
} else {
|
||||||
/* streams are not blocked and media is suspended from PAUSED */
|
/* streams are not blocked and media is suspended from PAUSED */
|
||||||
gst_rtsp_media_set_status (media, GST_RTSP_MEDIA_STATUS_PREPARED);
|
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
|
/* at this point the media pipeline has been updated and contain all
|
||||||
* specific transport parts: all active streams contain at least one sink
|
* specific transport parts: all active streams contain at least one sink
|
||||||
* element and it's safe to unblock all blocked streams */
|
* element and it's safe to unblock all blocked streams */
|
||||||
media_unblock (media);
|
media_streams_set_blocked (media, FALSE);
|
||||||
if (!start_preroll (media))
|
if (!start_preroll (media))
|
||||||
goto start_failed;
|
goto start_failed;
|
||||||
|
|
||||||
|
@ -4716,9 +4697,10 @@ media_set_pipeline_state_locked (GstRTSPMedia * media, GstState state)
|
||||||
if (priv->buffering) {
|
if (priv->buffering) {
|
||||||
GST_INFO ("Buffering busy, delay state change");
|
GST_INFO ("Buffering busy, delay state change");
|
||||||
} else {
|
} else {
|
||||||
if (state == GST_STATE_PLAYING)
|
if (state == GST_STATE_PLAYING) {
|
||||||
/* make sure pads are not blocking anymore when going to 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) {
|
if (state == GST_STATE_PAUSED) {
|
||||||
set_state_ret = set_state (media, state);
|
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 */
|
/* we just activated the first media, do the playing state change */
|
||||||
if (old_active == 0 && activate)
|
if (old_active == 0 && activate)
|
||||||
do_state = TRUE;
|
do_state = TRUE;
|
||||||
|
|
Loading…
Reference in a new issue