Documentation ¶
Index ¶
- Constants
- type Error
- type Options
- func (o *Options) Clone() *Options
- func (o *Options) GetAddress() string
- func (o *Options) GetImageDestination() string
- func (o *Options) GetSize() int
- func (o *Options) GetTranscodeOptions() ffmpeg.TranscodeOptions
- func (o *Options) GetVideoDestination() string
- func (o *Options) GetVideoSource() string
- func (o *Options) IsEmpty() bool
- func (o *Options) Replace(options *Options)
- type Pipeline
Constants ¶
View Source
const ( // ErrPipelineIsAlreadyActive is thrown when the Run() method is called during an active pipeline. ErrPipelineIsAlreadyActive = Error("pipeline is currently active, unable to run") // ErrCannotSetupWhilstPipelineIsActive is thrown when the Setup() method is called whilst the pipeline is active. ErrCannotSetupWhilstPipelineIsActive = Error("cannot setup whilst pipeline is active") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error string
Error is a custom error interface for our pipeline. It was implemented to have constant errors.
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
func NewOptions ¶
func NewOptions( size int, address, videoSource, videoDestination, imageDestination string, transcodeOptions ffmpeg.TranscodeOptions, ) *Options
func (*Options) GetAddress ¶
func (*Options) GetImageDestination ¶
func (*Options) GetTranscodeOptions ¶
func (o *Options) GetTranscodeOptions() ffmpeg.TranscodeOptions
func (*Options) GetVideoDestination ¶
func (*Options) GetVideoSource ¶
type Pipeline ¶
type Pipeline interface { // Setup will set the options if the pipeline isn't running. Setup(options *Options) (err error) // Run combines the other flow methods // in the following order: Download -> Transcode -> Metadata -> Upload Run(ctx context.Context) (err error) Close() (err error) Active() bool // Methods Download(ctx context.Context) (err error) Transcode(ctx context.Context) (err error) Metadata(ctx context.Context) (err error) Upload(ctx context.Context) (err error) Retry(ctx context.Context, response *grpc_runner_v1.StreamResponse) (err error) // Events Stream() <-chan *grpc_runner_v1.StreamRequest Operation() <-chan *grpc_runner_v1.OperationRequest Done() <-chan struct{} }
func NewWithOptions ¶
Click to show internal directories.
Click to hide internal directories.