mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-13 12:51:16 +00:00
stream: block the output of rtpbin instead of the source pipeline
85c52e194b
introduced a more correct
detection of the srtp rollover counter to add to the SDP.
Unfortunately, it was incomplete for live pipelines where the logic
blocks the source bin before creating the SDP and thus would never have
the necessary informaiton to create a correct SDP with srtp encryption.
Move the pad blocks to rtpbin's output pads instead so that the
necessary information can be created before we need the information for
the SDP.
https://bugzilla.gnome.org/show_bug.cgi?id=770239
This commit is contained in:
parent
f00ac2daf2
commit
b38eb8e99e
1 changed files with 15 additions and 10 deletions
|
@ -149,7 +149,7 @@ struct _GstRTSPStreamPrivate
|
|||
gint dscp_qos;
|
||||
|
||||
/* stream blocking */
|
||||
gulong blocked_id;
|
||||
gulong blocked_id[2];
|
||||
gboolean blocking;
|
||||
|
||||
/* pt->caps map for RECORD streams */
|
||||
|
@ -3689,6 +3689,7 @@ gboolean
|
|||
gst_rtsp_stream_set_blocked (GstRTSPStream * stream, gboolean blocked)
|
||||
{
|
||||
GstRTSPStreamPrivate *priv;
|
||||
int i;
|
||||
|
||||
g_return_val_if_fail (GST_IS_RTSP_STREAM (stream), FALSE);
|
||||
|
||||
|
@ -3697,18 +3698,22 @@ gst_rtsp_stream_set_blocked (GstRTSPStream * stream, gboolean blocked)
|
|||
g_mutex_lock (&priv->lock);
|
||||
if (blocked) {
|
||||
priv->blocking = FALSE;
|
||||
if (priv->blocked_id == 0) {
|
||||
priv->blocked_id = gst_pad_add_probe (priv->srcpad,
|
||||
GST_PAD_PROBE_TYPE_BLOCK | GST_PAD_PROBE_TYPE_BUFFER |
|
||||
GST_PAD_PROBE_TYPE_BUFFER_LIST, pad_blocking,
|
||||
g_object_ref (stream), g_object_unref);
|
||||
for (i = 0; i < 2; i++) {
|
||||
if (priv->blocked_id[i] == 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, pad_blocking,
|
||||
g_object_ref (stream), g_object_unref);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (priv->blocked_id != 0) {
|
||||
gst_pad_remove_probe (priv->srcpad, priv->blocked_id);
|
||||
priv->blocked_id = 0;
|
||||
priv->blocking = FALSE;
|
||||
for (i = 0; i < 2; i++) {
|
||||
if (priv->blocked_id[i] != 0) {
|
||||
gst_pad_remove_probe (priv->send_src[i], priv->blocked_id[i]);
|
||||
priv->blocked_id[i] = 0;
|
||||
}
|
||||
}
|
||||
priv->blocking = FALSE;
|
||||
}
|
||||
g_mutex_unlock (&priv->lock);
|
||||
|
||||
|
|
Loading…
Reference in a new issue