mirror of
https://github.com/xaionaro-go/streamctl.git
synced 2025-10-16 12:30:47 +08:00
27 lines
632 B
Go
27 lines
632 B
Go
package recoder
|
|
|
|
import (
|
|
"context"
|
|
"io"
|
|
|
|
"github.com/xaionaro-go/streamctl/pkg/streamserver/types"
|
|
)
|
|
|
|
type Recoder interface {
|
|
io.Closer
|
|
|
|
NewInputFromURL(context.Context, string, InputConfig) (Input, error)
|
|
NewOutputFromURL(context.Context, 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) (Recoder, error)
|
|
}
|