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:
Ian Gulliver
2026-01-23 11:53:30 -08:00
parent 47b48337b3
commit 9c7bd671ba
4 changed files with 165 additions and 24 deletions

View File

@@ -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 ""
}