mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 00:01:23 +00:00
webrtcbin: Remove pad probe on nicesink
This pad probe is no longer necessary, libnice now drops all buffers before the stream is connected. This pad problem also caused deadlocks in some situations. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2260>
This commit is contained in:
parent
28bd479ea2
commit
b6965e9906
2 changed files with 0 additions and 35 deletions
|
@ -188,7 +188,6 @@ transport_send_bin_change_state (GstElement * element,
|
|||
send->rtp_ctx.rtcp_block = block_peer_pad (elem, "rtcp_sink_0");
|
||||
/* unblock ice sink once a connection is made, this should also be automatic */
|
||||
elem = send->stream->transport->transport->sink;
|
||||
send->rtp_ctx.nice_block = block_peer_pad (elem, "sink");
|
||||
|
||||
TSB_UNLOCK (send);
|
||||
break;
|
||||
|
@ -291,29 +290,6 @@ done:
|
|||
TSB_UNLOCK (send);
|
||||
}
|
||||
|
||||
static void
|
||||
_on_notify_ice_connection_state (GstWebRTCICETransport * transport,
|
||||
GParamSpec * pspec, TransportSendBin * send)
|
||||
{
|
||||
GstWebRTCICEConnectionState state;
|
||||
|
||||
g_object_get (transport, "state", &state, NULL);
|
||||
|
||||
if (state == GST_WEBRTC_ICE_CONNECTION_STATE_CONNECTED ||
|
||||
state == GST_WEBRTC_ICE_CONNECTION_STATE_COMPLETED) {
|
||||
TSB_LOCK (send);
|
||||
if (transport == send->stream->transport->transport) {
|
||||
if (send->rtp_ctx.nice_block) {
|
||||
GST_LOG_OBJECT (send, "Unblocking pad %" GST_PTR_FORMAT,
|
||||
send->rtp_ctx.nice_block->pad);
|
||||
_free_pad_block (send->rtp_ctx.nice_block);
|
||||
send->rtp_ctx.nice_block = NULL;
|
||||
}
|
||||
}
|
||||
TSB_UNLOCK (send);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
tsb_setup_ctx (TransportSendBin * send, TransportSendBinDTLSContext * ctx,
|
||||
GstWebRTCDTLSTransport * transport)
|
||||
|
@ -330,10 +306,6 @@ tsb_setup_ctx (TransportSendBin * send, TransportSendBinDTLSContext * ctx,
|
|||
g_signal_connect (dtlssrtpenc, "notify::is-client",
|
||||
G_CALLBACK (_on_notify_dtls_client_status), send);
|
||||
gst_bin_add (GST_BIN (send), GST_ELEMENT (dtlssrtpenc));
|
||||
|
||||
/* unblock ice sink once it signals a connection */
|
||||
g_signal_connect (transport->transport, "notify::state",
|
||||
G_CALLBACK (_on_notify_ice_connection_state), send);
|
||||
gst_bin_add (GST_BIN (send), GST_ELEMENT (nicesink));
|
||||
|
||||
if (!gst_element_link_pads (GST_ELEMENT (dtlssrtpenc), "src", nicesink,
|
||||
|
@ -401,11 +373,6 @@ cleanup_ctx_blocks (TransportSendBinDTLSContext * ctx)
|
|||
_free_pad_block (ctx->rtcp_block);
|
||||
ctx->rtcp_block = NULL;
|
||||
}
|
||||
|
||||
if (ctx->nice_block) {
|
||||
_free_pad_block (ctx->nice_block);
|
||||
ctx->nice_block = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -42,8 +42,6 @@ struct _TransportSendBinDTLSContext {
|
|||
struct pad_block *rtp_block;
|
||||
/* Block on the dtlssrtpenc RTCP sink pad, if any */
|
||||
struct pad_block *rtcp_block;
|
||||
/* Block on the nicesink sink pad, if any */
|
||||
struct pad_block *nice_block;
|
||||
};
|
||||
|
||||
struct _TransportSendBin
|
||||
|
|
Loading…
Reference in a new issue