summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gst/rtsp-server/rtsp-stream.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/gst/rtsp-server/rtsp-stream.c b/gst/rtsp-server/rtsp-stream.c
index ddf7ba4..c94e6ee 100644
--- a/gst/rtsp-server/rtsp-stream.c
+++ b/gst/rtsp-server/rtsp-stream.c
@@ -220,6 +220,7 @@ struct _GstRTSPStreamPrivate
guint32 blocked_seqnum;
guint32 blocked_rtptime;
GstClockTime blocked_running_time;
+ gint blocked_clock_rate;
/* Whether we should send and receive RTCP */
gboolean enable_rtcp;
@@ -4344,6 +4345,14 @@ gst_rtsp_stream_get_rtpinfo (GstRTSPStream * stream,
goto stats;
*running_time = priv->blocked_running_time;
}
+
+ if (clock_rate) {
+ *clock_rate = priv->blocked_clock_rate;
+
+ if (*clock_rate == 0 && running_time)
+ *running_time = GST_CLOCK_TIME_NONE;
+ }
+
goto done;
}
}
@@ -5306,6 +5315,17 @@ pad_blocking (GstPad * pad, GstPadProbeInfo * info, gpointer user_data)
gst_event_unref (event);
}
+ event = gst_pad_get_sticky_event (pad, GST_EVENT_CAPS, 0);
+ if (event) {
+ GstCaps *caps;
+ GstStructure *s;
+
+ gst_event_parse_caps (event, &caps);
+ s = gst_caps_get_structure (caps, 0);
+ gst_structure_get_int (s, "clock-rate", &priv->blocked_clock_rate);
+ gst_event_unref (event);
+ }
+
priv->blocking = TRUE;
GST_DEBUG_OBJECT (pad, "Now blocking");
@@ -5347,6 +5367,7 @@ set_blocked (GstRTSPStream * stream, gboolean blocked)
priv->blocking = FALSE;
priv->blocked_buffer = FALSE;
priv->blocked_running_time = GST_CLOCK_TIME_NONE;
+ priv->blocked_clock_rate = 0;
priv->blocked_id[i] = gst_pad_add_probe (priv->send_src[i],
GST_PAD_PROBE_TYPE_BLOCK | GST_PAD_PROBE_TYPE_BUFFER |
GST_PAD_PROBE_TYPE_BUFFER_LIST |
@@ -6243,8 +6264,8 @@ gst_rtsp_stream_set_rate_control (GstRTSPStream * stream, gboolean enabled)
if (stream->priv->appsink[0])
g_object_set (stream->priv->appsink[0], "sync", enabled, NULL);
if (stream->priv->payloader
- && g_object_class_find_property (G_OBJECT_GET_CLASS (stream->priv->
- payloader), "onvif-no-rate-control"))
+ && g_object_class_find_property (G_OBJECT_GET_CLASS (stream->
+ priv->payloader), "onvif-no-rate-control"))
g_object_set (stream->priv->payloader, "onvif-no-rate-control", !enabled,
NULL);
if (stream->priv->session) {