15 lines
335 B
Go
15 lines
335 B
Go
package gstreamer
|
|
|
|
import "errors"
|
|
|
|
func (g *Gstreamer) getDecklinkOutput(name string) (string, error) {
|
|
g.Decklink.Lock()
|
|
for slot, pipelineName := range g.Decklink.Slots {
|
|
if pipelineName == "" {
|
|
g.Decklink.Slots[slot] = name
|
|
g.Decklink.Unlock()
|
|
return slot, nil
|
|
}
|
|
}
|
|
return "", errors.New("No free Decklink slot")
|
|
}
|