segm

package
v0.8.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAlreadyInitialized = errors.New("operation was already initialized")

ErrAlreadyInitialized happened when Init() func called twice

View Source
var ErrAlreadyStarted = errors.New("operation was already started")

ErrAlreadyStarted happened when Run() func called twice

View Source
var ErrNotInitialized = errors.New("operation have not been initialized")

ErrNotInitialized happened when instance wasn't initialized by Init() func

Functions

This section is empty.

Types

type ConcatOperation added in v0.8.2

type ConcatOperation struct {
	// contains filtered or unexported fields
}

ConcatOperation _

func NewConcatOperation added in v0.8.2

func NewConcatOperation(ctx context.Context) *ConcatOperation

NewConcatOperation _

func (*ConcatOperation) Closed added in v0.8.2

func (co *ConcatOperation) Closed() <-chan struct{}

Closed _

func (*ConcatOperation) Init added in v0.8.2

func (co *ConcatOperation) Init(req ConcatRequest) error

Init _

func (*ConcatOperation) Prune added in v0.8.2

func (co *ConcatOperation) Prune() error

Prune _

func (*ConcatOperation) Run added in v0.8.2

func (co *ConcatOperation) Run() (progress chan ff.Progressable, failures chan error)

Run _

type ConcatRequest added in v0.8.2

type ConcatRequest struct {
	OutFile  files.Filer
	Segments []*Segment
}

ConcatRequest _

type Segment

type Segment struct {
	// from 0 to inf
	Position int
	File     files.Filer
}

Segment _

type SliceOperation added in v0.8.2

type SliceOperation struct {
	// contains filtered or unexported fields
}

SliceOperation _

func NewSliceOperation added in v0.8.2

func NewSliceOperation(ctx context.Context) *SliceOperation

NewSliceOperation _

func (*SliceOperation) Closed added in v0.8.2

func (so *SliceOperation) Closed() <-chan struct{}

Closed _

func (*SliceOperation) Init added in v0.8.2

func (so *SliceOperation) Init(req SliceRequest) error

Init _

func (*SliceOperation) Purge added in v0.8.2

func (so *SliceOperation) Purge() error

Purge removes all segments from tmp directory & also tmp directory itself

func (*SliceOperation) Run added in v0.8.2

func (so *SliceOperation) Run() (
	progress chan ff.Progressable,
	segments chan *Segment,
	failures chan error,
)

Run _

type SliceRequest added in v0.8.2

type SliceRequest struct {
	InFile         files.Filer
	OutPath        files.Pather
	KeepTimestamps bool
	SegmentSec     int
}

SliceRequest _

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL