Label streams, not tracks.

We used to label tracks individually, in a view to using the labelling
for simulcast.  Since then, the WebRTC community has converged on a
different strategy, where multiple tracks share a single mid and
are labelled with the rid extension.

We now label whole streams, which is simpler, and use the track's
kind (and, in the future, the rid) to disambiguate.  This changes the
protocol in two ways:

  * in offers, the "labels" dictionary is replaced by a single "label"
    field; and
  * the syntax of the "request" message has changed.
This commit is contained in:
Juliusz Chroboczek
2021-04-28 17:00:50 +02:00
parent b08a2e3943
commit be73380f9f
7 changed files with 147 additions and 269 deletions
+2 -1
View File
@@ -16,6 +16,7 @@ type Up interface {
AddLocal(Down) error
DelLocal(Down) bool
Id() string
Label() string
User() (string, string)
}
@@ -23,7 +24,7 @@ type Up interface {
type UpTrack interface {
AddLocal(DownTrack) error
DelLocal(DownTrack) bool
Label() string
Kind() webrtc.RTPCodecType
Codec() webrtc.RTPCodecCapability
// get a recent packet. Returns 0 if the packet is not in cache.
GetRTP(seqno uint16, result []byte) uint16