@@ -9,7 +9,7 @@ str0m does not follow the exact specification for SDP negotiation, however, almo
9
9
These quotes are from the [ spec section 6.1] [ sdpspec ] :
10
10
11
11
> For recvonly RTP streams, the payload type numbers indicate the value of the payload type field
12
- > in RTP packets the offerer is expecting to receive for that codec. For sendonly RTP streams,
12
+ > in RTP packets the offerer is expecting to receive for that codec. For sendonly RTP streams,
13
13
> the payload type numbers indicate the value of the payload type field in RTP packets
14
14
> the offerer is planning to send for that codec. For sendrecv RTP streams, the payload type
15
15
> numbers indicate the value of the payload type field the offerer expects to receive, and would
@@ -48,13 +48,13 @@ are what the receiving side expects.
48
48
49
49
Example:
50
50
51
- * OFFER is ` sendrecv ` VP8 with PT (Payload Type) 100
52
- * ANSWER is ` sendrecv ` VP8 with PT 96
51
+ - OFFER is ` sendrecv ` VP8 with PT (Payload Type) 100
52
+ - ANSWER is ` sendrecv ` VP8 with PT 96
53
53
54
- The OFFER details the receiving capabilties. It * expects * VP8 to arrive at PT 100. This
54
+ The OFFER details the receiving capabilties. It _ expects _ VP8 to arrive at PT 100. This
55
55
is not a suggestion.
56
56
57
- Similarly the ANSWER is talking about its receiving capabilities. It * expects * VP8 to arrive
57
+ Similarly the ANSWER is talking about its receiving capabilities. It _ expects _ VP8 to arrive
58
58
at PT 96. This is also not a suggestion.
59
59
60
60
We have an asymmetry…
@@ -86,14 +86,35 @@ be one in codecs. If you want to send a specific codec, you must also be prepare
86
86
87
87
Example:
88
88
89
- * OFFER ` sendrecv ` VP8 PT 100, H264 PT 102
90
- * ANSWER ` sendrecv ` VP8 PT 96
89
+ - OFFER ` sendrecv ` VP8 PT 100, H264 PT 102
90
+ - ANSWER ` sendrecv ` VP8 PT 96
91
91
92
92
The answer side is not allowed to send H264 in the direction of the offer side, because it is not
93
93
prepared to receive it. We do however have an asymmetry in payload types (96 vs 100).
94
94
95
95
Thus, a spec compliant implementation does not have to maintain separate codecs per direction,
96
96
only separate payload type numbers.
97
97
98
- [ quote ] : https://mailarchive.ietf.org/arch/msg/mmusic/2N1_-eUTVrmciX3LpSjkjFH7oCU/
99
- [ sdpspec ] : https://datatracker.ietf.org/doc/html/rfc3264#section-6.1
98
+ ## Direction change from Inactive
99
+
100
+ This is the behavior of libWebRTC:
101
+
102
+ - SFU adds first media for something we intend to send later.
103
+ - OFFER from SFU for Inactive m-line: mid1
104
+ - ANSWER from client confirming Inactive mid1
105
+
106
+ - Client adds media it wants to send.
107
+ - OFFER from client for new m-line: mid2, _ mid1 is now OFFERed as RecvOnly_
108
+ - ANSWER _ should confirm that mid1 is still inactive_
109
+
110
+ This is because the client is talking about it's receive capabilities. "I can receive on mid1". If the
111
+ SFU blindly follows the client OFFER, it would thus transition (the SFU created)
112
+ mid1 ` Inactive ` -> ` SendOnly ` , when the user (probably) didn't intend to.
113
+
114
+ To get around this str0m breaks with the spec. str0m keeps track of whether a ` Media ` (m-line) is created
115
+ by str0m or the client. For media str0m creates, it refuses to allow the client to do the specific
116
+ transition ` Inactive ` -> ` RecvOnly ` . All other transitions are fine, i.e. a client can change, also a
117
+ str0m created media, from ` Inactive ` to ` SendRecv ` .
118
+
119
+ [ quote ] : https://mailarchive.ietf.org/arch/msg/mmusic/2N1_-eUTVrmciX3LpSjkjFH7oCU/
120
+ [ sdpspec ] : https://datatracker.ietf.org/doc/html/rfc3264#section-6.1
0 commit comments