Added support to stream backchannel to a command (outputbc)
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package outputbc
|
||||
|
||||
import (
|
||||
"github.com/AlexxIT/go2rtc/internal/streams"
|
||||
"github.com/AlexxIT/go2rtc/pkg/core"
|
||||
"github.com/AlexxIT/go2rtc/pkg/outputbc"
|
||||
"github.com/AlexxIT/go2rtc/pkg/shell"
|
||||
)
|
||||
|
||||
func Init() {
|
||||
streams.HandleFunc("outputbc", handle)
|
||||
}
|
||||
|
||||
func handle(url string) (core.Producer, error) {
|
||||
args := shell.QuoteSplit(url[9:])
|
||||
con, err := outputbc.NewClient(args)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
con.Dial()
|
||||
return con, nil
|
||||
}
|
||||
Reference in New Issue
Block a user