mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-17 13:56:32 +00:00
webrtcrenego: Port to updated mechanism for doing renegotiation
Sending an EOS event is actually really bad because rtpbin doesn't handle that very well. It was only being used as a way to notify webrtcbin to check if re-negotiation is needed. We don't need that anymore, since changing the direction is enough to notify webrtcbin to check for re-negotiation. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5045>
This commit is contained in:
parent
6af8b3dd80
commit
fb406b7a56
1 changed files with 4 additions and 1 deletions
|
@ -218,9 +218,12 @@ stream_change (gpointer data)
|
|||
g_print ("Removing extra stream\n");
|
||||
pad = gst_element_get_static_pad (extra_src, "src");
|
||||
peer = gst_pad_get_peer (pad);
|
||||
gst_element_send_event (extra_src, gst_event_new_eos ());
|
||||
|
||||
g_object_get (peer, "transceiver", &transceiver, NULL);
|
||||
/* Instead of removing the source, you can add a pad probe to block data
|
||||
* flow, and you can set this to SENDONLY later to switch this track from
|
||||
* inactive to sendonly, but this only works with non-gstreamer receivers
|
||||
* at present. */
|
||||
g_object_set (transceiver, "direction",
|
||||
GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_INACTIVE, NULL);
|
||||
|
||||
|
|
Loading…
Reference in a new issue