add multicast flow transmitter discovery via mdns _netaudio-chan service
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
29
dante.go
29
dante.go
@@ -85,3 +85,32 @@ func (n *Nodes) UpdateDante(name string, ip net.IP, arcPort int) {
|
||||
go n.t.probeDanteDeviceWithPort(ip, arcPort)
|
||||
}
|
||||
}
|
||||
|
||||
func (n *Nodes) UpdateDanteTxChannels(name string, ip net.IP, channels string) {
|
||||
n.mu.Lock()
|
||||
defer n.mu.Unlock()
|
||||
|
||||
node := n.getNodeByIPLocked(ip)
|
||||
if node == nil {
|
||||
return
|
||||
}
|
||||
node.DanteTxChannels = channels
|
||||
}
|
||||
|
||||
func (n *Nodes) GetDanteTxDeviceInGroup(groupIP net.IP) string {
|
||||
n.mu.RLock()
|
||||
defer n.mu.RUnlock()
|
||||
|
||||
groupKey := groupIP.String()
|
||||
gm := n.multicastGroups[groupKey]
|
||||
if gm == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
for _, membership := range gm.Members {
|
||||
if membership.Node != nil && membership.Node.DanteTxChannels != "" {
|
||||
return membership.Node.Name
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user