mirror of
https://github.com/xaionaro-go/streamctl.git
synced 2025-10-23 15:33:20 +08:00
27 lines
648 B
Go
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)
|
|
}
|