This commit is contained in:
boks1971
2025-08-15 12:22:21 +05:30
parent 15d99570e9
commit c84ec9dc24
3 changed files with 10 additions and 12 deletions
+2
View File
@@ -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
+8 -6
View File
@@ -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
-6
View File
@@ -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)
}