g_ptr_array_foreach (priv->streams, (GFunc) stream_update_blocked, media);
}
-static void
+void
gst_rtsp_media_set_status (GstRTSPMedia * media, GstRTSPMediaStatus status)
{
GstRTSPMediaPrivate *priv = media->priv;
return ret;
}
-static GstStateChangeReturn
-set_target_state (GstRTSPMedia * media, GstState state, gboolean do_state)
+GstStateChangeReturn
+gst_rtsp_media_set_target_state (GstRTSPMedia * media, GstState state, gboolean do_state)
{
GstRTSPMediaPrivate *priv = media->priv;
GstStateChangeReturn ret;
GST_INFO ("setting pipeline to PAUSED for media %p", media);
/* first go to PAUSED */
- ret = set_target_state (media, GST_STATE_PAUSED, TRUE);
+ ret = gst_rtsp_media_set_target_state (media, GST_STATE_PAUSED, TRUE);
switch (ret) {
case GST_STATE_CHANGE_SUCCESS:
GST_INFO ("unprepare media %p", media);
if (priv->blocked)
media_streams_set_blocked (media, FALSE);
- set_target_state (media, GST_STATE_NULL, FALSE);
+ gst_rtsp_media_set_target_state (media, GST_STATE_NULL, FALSE);
success = TRUE;
if (priv->status == GST_RTSP_MEDIA_STATUS_PREPARED) {
break;
case GST_RTSP_SUSPEND_MODE_PAUSE:
GST_DEBUG ("media %p suspend to PAUSED", media);
- ret = set_target_state (media, GST_STATE_PAUSED, TRUE);
+ ret = gst_rtsp_media_set_target_state (media, GST_STATE_PAUSED, TRUE);
if (ret == GST_STATE_CHANGE_FAILURE)
goto state_failed;
unblock = TRUE;
break;
case GST_RTSP_SUSPEND_MODE_RESET:
GST_DEBUG ("media %p suspend to NULL", media);
- ret = set_target_state (media, GST_STATE_NULL, TRUE);
+ ret = gst_rtsp_media_set_target_state (media, GST_STATE_NULL, TRUE);
if (ret == GST_STATE_CHANGE_FAILURE)
goto state_failed;
/* Because payloader needs to set the sequence number as
gst_rtsp_media_unprepare (media);
} else {
GST_INFO ("state %s media %p", gst_element_state_get_name (state), media);
- set_target_state (media, state, FALSE);
+ gst_rtsp_media_set_target_state (media, state, FALSE);
/* when we are buffering, don't update the state yet, this will be done
* when buffering finishes */
if (priv->buffering) {