Code Cleanup, rename outputbc to execbc, using buffered Writer

This commit is contained in:
Michael Reif
2024-01-06 09:32:47 +01:00
parent f65b18842a
commit cc6b8277c9
7 changed files with 98 additions and 66 deletions
+22
View File
@@ -0,0 +1,22 @@
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
}
con.Dial()
return con, nil
}