Commit 2df7da85 authored by Matthew Waters's avatar Matthew Waters 🐨

webrtc: add support for intersecting inactive transceiver directions

parent 5ea7031b
...@@ -397,6 +397,8 @@ GstWebRTCRTPTransceiverDirection ...@@ -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, ...@@ -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);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment