mirror of
https://github.com/livekit/livekit.git
synced 2026-08-06 12:50:01 +00:00
clean up
This commit is contained in:
@@ -371,6 +371,8 @@ func (p *ParticipantImpl) setCodecPreferencesForPublisherMedia(
|
||||
}
|
||||
|
||||
// SINGLE-PEER-CONNECTION-TODO: can set mid in TrackInfo before sending offer and check on receiving answer to set SdpCid
|
||||
// SINGLE-PEER-CONNECTION-TODO: this has to be do publish enabled codecs filtering also, cannot do it with setting registered codecs on peer connection as subscriber codecs could be different from publisher codecs
|
||||
// SINGLE-PEER-CONNECTION-TODO: probably have to do RTP Header Extensions and RTCP feedback filtering also here
|
||||
}
|
||||
|
||||
return parsedOffer, unprocessed
|
||||
|
||||
@@ -265,12 +265,14 @@ type PCTransport struct {
|
||||
}
|
||||
|
||||
type TransportParams struct {
|
||||
Handler transport.Handler
|
||||
ProtocolVersion types.ProtocolVersion
|
||||
Config *WebRTCConfig
|
||||
Twcc *lktwcc.Responder
|
||||
DirectionConfig DirectionConfig
|
||||
CongestionControlConfig config.CongestionControlConfig
|
||||
Handler transport.Handler
|
||||
ProtocolVersion types.ProtocolVersion
|
||||
Config *WebRTCConfig
|
||||
Twcc *lktwcc.Responder
|
||||
// SINGLE-PEER-CONNECTION-TODO: guess this has to be superset of published and subscribed direction configs
|
||||
DirectionConfig DirectionConfig
|
||||
CongestionControlConfig config.CongestionControlConfig
|
||||
// SINGLE-PEER-CONNECTION-TODO: guess this has to be superset of published and subscribed codecs
|
||||
EnabledCodecs []*livekit.Codec
|
||||
Logger logger.Logger
|
||||
Transport livekit.SignalTarget
|
||||
|
||||
@@ -81,8 +81,6 @@ type RTCClient struct {
|
||||
publisherFullyEstablished atomic.Bool
|
||||
subscriberFullyEstablished atomic.Bool
|
||||
pongReceivedAt atomic.Int64
|
||||
lastOffer atomic.Pointer[webrtc.SessionDescription] // RAJA-REMOVE
|
||||
lastAnswer atomic.Pointer[webrtc.SessionDescription] // RAJA-REMOVE
|
||||
|
||||
// tracks waiting to be acked, cid => trackInfo
|
||||
pendingPublishedTracks map[string]*livekit.TrackInfo
|
||||
@@ -869,13 +867,11 @@ func (c *RTCClient) GetPublishedTrackIDs() []string {
|
||||
|
||||
// LastOffer return SDP of the last offer for the subscriber connection
|
||||
func (c *RTCClient) LastOffer() *webrtc.SessionDescription {
|
||||
// RAJA-REMOVE return c.lastOffer.Load()
|
||||
return c.subscriber.CurrentRemoteDescription()
|
||||
}
|
||||
|
||||
// LastAnswer return SDP of the last answer for the publisher connection
|
||||
func (c *RTCClient) LastAnswer() *webrtc.SessionDescription {
|
||||
// RAJA-REMOVE return c.lastAnswer.Load()
|
||||
return c.publisher.CurrentRemoteDescription()
|
||||
}
|
||||
|
||||
@@ -925,7 +921,6 @@ func (c *RTCClient) handleDataMessageUnlabeled(data []byte) {
|
||||
// handles a server initiated offer, handle on subscriber PC
|
||||
func (c *RTCClient) handleOffer(desc webrtc.SessionDescription, offerId uint32) {
|
||||
logger.Infow("handling server offer", "participant", c.localParticipant.Identity)
|
||||
// RAJA-REMOVE c.lastOffer.Store(&desc)
|
||||
c.subscriber.HandleRemoteDescription(desc, offerId)
|
||||
}
|
||||
|
||||
@@ -933,7 +928,6 @@ func (c *RTCClient) handleOffer(desc webrtc.SessionDescription, offerId uint32)
|
||||
func (c *RTCClient) handleAnswer(desc webrtc.SessionDescription, answerId uint32) {
|
||||
logger.Infow("handling server answer", "participant", c.localParticipant.Identity)
|
||||
|
||||
// RAJA-REMOVE c.lastAnswer.Store(&desc)
|
||||
// remote answered the offer, establish connection
|
||||
c.publisher.HandleRemoteDescription(desc, answerId)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user