Fix time stamp adjustment when starting with dummy packets. (#2053)
* Fix time stamp adjustment when starting with dmummy packets. - Populated extended values in ExtPacket on dummy packet. - Have to pass reference time stamp offset to first packet time adjustment. * display participant version info
This commit is contained in:
@@ -16,6 +16,7 @@ package rtc
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"strconv"
|
||||
@@ -69,12 +70,20 @@ type downTrackState struct {
|
||||
downTrack sfu.DownTrackState
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
type participantUpdateInfo struct {
|
||||
version uint32
|
||||
state livekit.ParticipantInfo_State
|
||||
updatedAt time.Time
|
||||
}
|
||||
|
||||
func (p participantUpdateInfo) String() string {
|
||||
return fmt.Sprintf("version: %d, state: %s, updatedAt: %s", p.version, p.state.String(), p.updatedAt.String())
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
type ParticipantParams struct {
|
||||
Identity livekit.ParticipantIdentity
|
||||
Name livekit.ParticipantName
|
||||
|
||||
@@ -95,7 +95,7 @@ func (p *ParticipantImpl) SendParticipantUpdate(participantsToUpdate []*livekit.
|
||||
// this is a message delivered out of order, a more recent version of the message had already been
|
||||
// sent.
|
||||
if pi.Version < lastVersion.version {
|
||||
p.params.Logger.Debugw("skipping outdated participant update", "version", pi.Version, "lastVersion", lastVersion)
|
||||
p.params.Logger.Debugw("skipping outdated participant update", "otherParticipant", pi.Identity, "otherPID", pi.Sid, "version", pi.Version, "lastVersion", lastVersion)
|
||||
isValid = false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user