mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 05:16:13 +00:00
webrtc/transportsendbin: Clean up pad probe removal
We already have a helper function for this so just use it instead of duplicating it.
This commit is contained in:
parent
50ae5061f9
commit
1ecb27f221
1 changed files with 1 additions and 16 deletions
|
@ -81,7 +81,6 @@ enum
|
||||||
#define TSB_UNLOCK(tsb) (g_mutex_unlock (TSB_GET_LOCK(tsb)))
|
#define TSB_UNLOCK(tsb) (g_mutex_unlock (TSB_GET_LOCK(tsb)))
|
||||||
|
|
||||||
static void cleanup_blocks (TransportSendBin * send);
|
static void cleanup_blocks (TransportSendBin * send);
|
||||||
static void tsb_remove_probe (struct pad_block *block);
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_set_rtcp_mux (TransportSendBin * send, gboolean rtcp_mux)
|
_set_rtcp_mux (TransportSendBin * send, gboolean rtcp_mux)
|
||||||
|
@ -174,15 +173,6 @@ block_peer_pad (GstElement * elem, const gchar * pad_name)
|
||||||
return block;
|
return block;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
tsb_remove_probe (struct pad_block *block)
|
|
||||||
{
|
|
||||||
if (block && block->block_id) {
|
|
||||||
gst_pad_remove_probe (block->pad, block->block_id);
|
|
||||||
block->block_id = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static GstStateChangeReturn
|
static GstStateChangeReturn
|
||||||
transport_send_bin_change_state (GstElement * element,
|
transport_send_bin_change_state (GstElement * element,
|
||||||
GstStateChange transition)
|
GstStateChange transition)
|
||||||
|
@ -247,12 +237,7 @@ transport_send_bin_change_state (GstElement * element,
|
||||||
* if they still exist, without accidentally feeding data to the
|
* if they still exist, without accidentally feeding data to the
|
||||||
* dtlssrtpenc elements */
|
* dtlssrtpenc elements */
|
||||||
TSB_LOCK (send);
|
TSB_LOCK (send);
|
||||||
tsb_remove_probe (send->rtp_ctx.rtp_block);
|
cleanup_blocks (send);
|
||||||
tsb_remove_probe (send->rtp_ctx.rtcp_block);
|
|
||||||
tsb_remove_probe (send->rtp_ctx.nice_block);
|
|
||||||
|
|
||||||
tsb_remove_probe (send->rtcp_ctx.rtcp_block);
|
|
||||||
tsb_remove_probe (send->rtcp_ctx.nice_block);
|
|
||||||
TSB_UNLOCK (send);
|
TSB_UNLOCK (send);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue