Files
go2rtc/pkg/stdin/client.go
2024-06-16 06:20:45 +03:00

35 lines
542 B
Go

package stdin
import (
"os/exec"
"github.com/AlexxIT/go2rtc/pkg/core"
)
// Deprecated: should be rewritten to core.Connection
type Client struct {
cmd *exec.Cmd
medias []*core.Media
sender *core.Sender
send int
}
func NewClient(cmd *exec.Cmd) (*Client, error) {
c := &Client{
cmd: cmd,
medias: []*core.Media{
{
Kind: core.KindAudio,
Direction: core.DirectionSendonly,
Codecs: []*core.Codec{
{Name: core.CodecPCMA, ClockRate: 8000},
{Name: core.CodecPCM},
},
},
},
}
return c, nil
}