Merge pull request #859 from 'reifl/master'

This commit is contained in:
Alex X
2024-04-29 20:19:21 +03:00
5 changed files with 165 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
package execbc
import (
"github.com/AlexxIT/go2rtc/internal/streams"
"github.com/AlexxIT/go2rtc/pkg/core"
"github.com/AlexxIT/go2rtc/pkg/execbc"
"github.com/AlexxIT/go2rtc/pkg/shell"
)
func Init() {
streams.HandleFunc("execbc", handle)
}
func handle(url string) (core.Producer, error) {
args := shell.QuoteSplit(url[7:])
con, err := execbc.NewClient(args)
if err != nil {
return nil, err
}
return con, nil
}