mirror of
https://github.com/livekit/livekit.git
synced 2026-10-22 10:12:25 +00:00
Group SDES items for one SSRC in the same chunk. (#2280)
This commit is contained in:
1 parent
dd024571a1
commit
7b778c50eb
2 files changed
+17
-12
No files matched your search
@@ -1486,7 +1486,11 @@ func (p *ParticipantImpl) subscriberRTCPWorker() {
|
||||
|
||||
pkts = append(pkts, sr)
|
||||
sd = append(sd, chunks...)
|
||||
batchSize = batchSize + 1 + len(chunks)
|
||||
numItems := 0
|
||||
for _, chunk := range chunks {
|
||||
numItems += len(chunk.Items)
|
||||
}
|
||||
batchSize = batchSize + 1 + numItems
|
||||
if batchSize >= sdBatchSize {
|
||||
if len(sd) != 0 {
|
||||
pkts = append(pkts, &rtcp.SourceDescription{Chunks: sd})
|
||||
|
||||
+12
-11
@@ -1266,22 +1266,23 @@ func (d *DownTrack) Resync() {
|
||||
}
|
||||
|
||||
func (d *DownTrack) CreateSourceDescriptionChunks() []rtcp.SourceDescriptionChunk {
|
||||
if !d.bound.Load() || d.transceiver.Load() == nil {
|
||||
transceiver := d.transceiver.Load()
|
||||
if !d.bound.Load() || transceiver == nil {
|
||||
return nil
|
||||
}
|
||||
return []rtcp.SourceDescriptionChunk{
|
||||
{
|
||||
Source: d.ssrc,
|
||||
Items: []rtcp.SourceDescriptionItem{{
|
||||
Type: rtcp.SDESCNAME,
|
||||
Text: d.params.StreamID,
|
||||
}},
|
||||
}, {
|
||||
Source: d.ssrc,
|
||||
Items: []rtcp.SourceDescriptionItem{{
|
||||
Type: rtcp.SDESType(15),
|
||||
Text: d.transceiver.Load().Mid(),
|
||||
}},
|
||||
Items: []rtcp.SourceDescriptionItem{
|
||||
{
|
||||
Type: rtcp.SDESCNAME,
|
||||
Text: d.params.StreamID,
|
||||
},
|
||||
{
|
||||
Type: rtcp.SDESType(15),
|
||||
Text: transceiver.Mid(),
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user