webrtc: add support for intersecting inactive transceiver directions
This commit is contained in:
parent
5ea7031bd0
commit
2df7da85fe
@ -397,6 +397,8 @@ GstWebRTCRTPTransceiverDirection
|
|||||||
_intersect_answer_directions (GstWebRTCRTPTransceiverDirection offer,
|
_intersect_answer_directions (GstWebRTCRTPTransceiverDirection offer,
|
||||||
GstWebRTCRTPTransceiverDirection answer)
|
GstWebRTCRTPTransceiverDirection answer)
|
||||||
{
|
{
|
||||||
|
if (offer == DIR (INACTIVE) || answer == DIR (INACTIVE))
|
||||||
|
return DIR (INACTIVE);
|
||||||
if (offer == DIR (SENDONLY) && answer == DIR (SENDRECV))
|
if (offer == DIR (SENDONLY) && answer == DIR (SENDRECV))
|
||||||
return DIR (RECVONLY);
|
return DIR (RECVONLY);
|
||||||
if (offer == DIR (SENDONLY) && answer == DIR (RECVONLY))
|
if (offer == DIR (SENDONLY) && answer == DIR (RECVONLY))
|
||||||
@ -411,6 +413,10 @@ _intersect_answer_directions (GstWebRTCRTPTransceiverDirection offer,
|
|||||||
return DIR (SENDONLY);
|
return DIR (SENDONLY);
|
||||||
if (offer == DIR (SENDRECV) && answer == DIR (RECVONLY))
|
if (offer == DIR (SENDRECV) && answer == DIR (RECVONLY))
|
||||||
return DIR (RECVONLY);
|
return DIR (RECVONLY);
|
||||||
|
if (offer == DIR (RECVONLY) && answer == DIR (RECVONLY))
|
||||||
|
return DIR (INACTIVE);
|
||||||
|
if (offer == DIR (SENDONLY) && answer == DIR (SENDONLY))
|
||||||
|
return DIR (INACTIVE);
|
||||||
|
|
||||||
return DIR (NONE);
|
return DIR (NONE);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user