mirror of
https://github.com/AlexxIT/go2rtc.git
synced 2025-09-26 20:31:11 +08:00
Change alsa source name for discovery API
This commit is contained in:
@@ -47,10 +47,13 @@ func apiAlsa(w http.ResponseWriter, r *http.Request) {
|
||||
r1, r2 := dev.RangeRates()
|
||||
c1, c2 := dev.RangeChannels()
|
||||
source := &api.Source{
|
||||
Name: info.ID + " / " + info.Name + " / " + info.SubName,
|
||||
Name: info.ID,
|
||||
Info: fmt.Sprintf("Formats: %s, Rates: %d-%d, Channels: %d-%d", formats, r1, r2, c1, c2),
|
||||
URL: "alsa:device?audio=" + path,
|
||||
}
|
||||
if !strings.Contains(source.Name, info.Name) {
|
||||
source.Name += ", " + info.Name
|
||||
}
|
||||
sources = append(sources, source)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user