Files
streamctl/pkg/encoder/encoder.go
2024-12-14 15:44:20 +00:00

27 lines
648 B
Go

package encoder
import (
"context"
"io"
"github.com/xaionaro-go/streamctl/pkg/streamserver/types"
)
type Encoder interface {
io.Closer
NewInputFromURL(context.Context, string, string, InputConfig) (Input, error)
NewOutputFromURL(context.Context, string, string, OutputConfig) (Output, error)
StartRecoding(context.Context, Input, Output) error
WaitForRecordingEnd(context.Context) error
GetStats(context.Context) (*Stats, error)
}
type NewInputFromPublisherer interface {
NewInputFromPublisher(context.Context, types.Publisher, InputConfig) (Input, error)
}
type Factory interface {
New(context.Context, Config) (Encoder, error)
}