process

package
v0.0.0-...-49f6bda Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TimeNow = func() time.Time {
	return time.Now()
}

Functions

func DeleteOldClips

func DeleteOldClips(cam camera.Connection) func(context.Context, chan struct{}) []chan struct{}

TODO(tauraamui): re-write delete clip process

Types

type Event

type Event int
const CAM_SWITCHED_OFF_EVT Event = 0x51
const CAM_SWITCHED_ON_EVT Event = 0x52
const SHUTDOWN_EVT Event = 0x50

type Process

type Process interface {
	Setup() Process
	Start() <-chan struct{}
	Stop() <-chan struct{}
	Wait()
}

func New

func New(settings Settings) Process

func NewCoreProcess

func NewCoreProcess(cam camera.Connection, writer videoclip.Writer) Process

func NewGenerateClipProcess

func NewGenerateClipProcess(
	listener *broadcast.Listener, frames chan videoframe.NoCloser, dest chan videoclip.NoCloser, framesPerClip int, persistLoc string,
) Process

func NewPersistClipProcess

func NewPersistClipProcess(clips chan videoclip.NoCloser, writer videoclip.Writer) Process

func NewStreamConnProcess

func NewStreamConnProcess(
	l *broadcast.Listener, camTitle string, cam camera.IsOpenReader, dest chan videoframe.NoCloser,
) Process

type Settings

type Settings struct {
	WaitForShutdownMsg string
	Process            func(context.Context, chan struct{}) []chan struct{}
}

Jump to

Keyboard shortcuts

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