mirror of
https://github.com/livekit/livekit.git
synced 2026-04-25 09:02:11 +00:00
Add some debug logs around track publish (#2340)
This commit is contained in:
@@ -211,7 +211,13 @@ func (t *MediaTrack) AddReceiver(receiver *webrtc.RTPReceiver, track *webrtc.Tra
|
||||
t.lock.Lock()
|
||||
mime := strings.ToLower(track.Codec().MimeType)
|
||||
layer := buffer.RidToSpatialLayer(track.RID(), ti)
|
||||
t.params.Logger.Debugw("AddReceiver", "mime", track.Codec().MimeType)
|
||||
t.params.Logger.Debugw(
|
||||
"AddReceiver",
|
||||
"mime", track.Codec().MimeType,
|
||||
"rid", track.RID(),
|
||||
"layer", layer,
|
||||
"ssrc", track.SSRC(),
|
||||
)
|
||||
wr := t.MediaTrackReceiver.Receiver(mime)
|
||||
if wr == nil {
|
||||
priority := -1
|
||||
|
||||
@@ -186,8 +186,8 @@ func (t *MediaTrackReceiver) SetupReceiver(receiver sfu.TrackReceiver, priority
|
||||
|
||||
for i, ci := range t.trackInfo.Codecs {
|
||||
if i == priority {
|
||||
ci.Mid = mid
|
||||
ci.MimeType = receiver.Codec().MimeType
|
||||
ci.Mid = mid
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1833,7 +1833,7 @@ func (p *ParticipantImpl) mediaTrackReceived(track *webrtc.TrackRemote, rtpRecei
|
||||
}
|
||||
}
|
||||
if codecFound != len(ti.Codecs) {
|
||||
p.params.Logger.Warnw("migrated track codec mismatched", nil, "track", logger.Proto(ti), "webrtcCodec", parameters)
|
||||
p.pubLogger.Warnw("migrated track codec mismatched", nil, "track", logger.Proto(ti), "webrtcCodec", parameters)
|
||||
p.pendingTracksLock.Unlock()
|
||||
p.IssueFullReconnect(types.ParticipantCloseReasonMigrateCodecMismatch)
|
||||
return nil, false
|
||||
@@ -1862,6 +1862,7 @@ func (p *ParticipantImpl) mediaTrackReceived(track *webrtc.TrackRemote, rtpRecei
|
||||
if mt.AddReceiver(rtpReceiver, track, p.twcc, mid) {
|
||||
p.removeMutedTrackNotFired(mt)
|
||||
if newTrack {
|
||||
p.pubLogger.Debugw("track published", nil, "trackID", mt.ID(), "track", logger.Proto(mt.ToProto()))
|
||||
go p.handleTrackPublished(mt)
|
||||
}
|
||||
}
|
||||
@@ -1993,7 +1994,7 @@ func (p *ParticipantImpl) addMediaTrack(signalCid string, sdpCid string, ti *liv
|
||||
|
||||
if !p.IsClosed() {
|
||||
// unpublished events aren't necessary when participant is closed
|
||||
p.pubLogger.Infow("unpublished track", "trackID", ti.Sid, "trackInfo", ti)
|
||||
p.pubLogger.Debugw("track unpublished", "trackID", ti.Sid, "track", logger.Proto(ti))
|
||||
p.lock.RLock()
|
||||
onTrackUnpublished := p.onTrackUnpublished
|
||||
p.lock.RUnlock()
|
||||
|
||||
@@ -458,7 +458,7 @@ func (d *DownTrack) SetStreamAllocatorListener(listener DownTrackStreamAllocator
|
||||
d.transportWideExtID = 0
|
||||
}
|
||||
|
||||
// kick of a gratuitous allocation
|
||||
// kick off a gratuitous allocation
|
||||
listener.OnSubscriptionChanged(d)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user