mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
webrtc: mark streams as active on renegotiation as well.
Otherwise when bundling, only the changed streams would be considered as to whether the bundled transport needs to be blocked as all streams are inactive. Scenario is one transceiver changes direction to inactive and as that is the only change in transciever direction, the entire bundled transport would be blocked even if there are other active transceivers inside the same bundled transport that are still active. Fix by always checking the activeness of a stream regardless of if the transceiverr has changed direction.
This commit is contained in:
parent
c3a9d2dc64
commit
319a5e5779
1 changed files with 17 additions and 14 deletions
|
@ -3794,8 +3794,24 @@ _update_transceiver_from_sdp_media (GstWebRTCBin * webrtc,
|
|||
}
|
||||
}
|
||||
|
||||
if (new_dir == GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_INACTIVE) {
|
||||
if (!bundled) {
|
||||
/* Not a bundled stream means this entire transport is inactive,
|
||||
* so set the receive state to BLOCK below */
|
||||
stream->active = FALSE;
|
||||
receive_state = RECEIVE_STATE_BLOCK;
|
||||
}
|
||||
} else {
|
||||
/* If this transceiver is active for sending or receiving,
|
||||
* we still need receive at least RTCP, so need to unblock
|
||||
* the receive bin below. */
|
||||
GST_LOG_OBJECT (webrtc, "marking stream %p as active", stream);
|
||||
receive_state = RECEIVE_STATE_PASS;
|
||||
stream->active = TRUE;
|
||||
}
|
||||
|
||||
if (new_dir != prev_dir) {
|
||||
GST_TRACE_OBJECT (webrtc, "transceiver direction change");
|
||||
GST_DEBUG_OBJECT (webrtc, "transceiver direction change");
|
||||
|
||||
if (new_dir == GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_INACTIVE) {
|
||||
GstWebRTCBinPad *pad;
|
||||
|
@ -3814,20 +3830,7 @@ _update_transceiver_from_sdp_media (GstWebRTCBin * webrtc,
|
|||
gst_object_unref (pad);
|
||||
}
|
||||
|
||||
if (!bundled) {
|
||||
/* Not a bundled stream means this entire transport is inactive,
|
||||
* so set the receive state to BLOCK below */
|
||||
stream->active = FALSE;
|
||||
receive_state = RECEIVE_STATE_BLOCK;
|
||||
}
|
||||
|
||||
/* XXX: send eos event up the sink pad as well? */
|
||||
} else {
|
||||
/* If this transceiver is active for sending or receiving,
|
||||
* we still need receive at least RTCP, so need to unblock
|
||||
* the receive bin below. */
|
||||
receive_state = RECEIVE_STATE_PASS;
|
||||
stream->active = TRUE;
|
||||
}
|
||||
|
||||
if (new_dir == GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_SENDONLY ||
|
||||
|
|
Loading…
Reference in a new issue