camera

package
v0.0.0-...-4b72d78 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cam

type Cam struct {
	Name             string
	Index            int
	Bot              *telegram.Bot
	Store            *datastore.Store
	FrameLimit       *ratelimit.Bucket
	BurstLimit       *ratelimit.Bucket
	PaceLimit        *ratelimit.Bucket
	LastOverviewSent time.Time
	SnapshotChan     chan jobs.Cmd
	FrameChan        chan jobs.Cmd
	PubSubControl    bool
	MaxWidth         int
	MaxHeight        int
	MinWidth         int
	MinHeight        int
	RequirePortrait  bool
	MinConfidence    int
	CropRect         *image.Rectangle
	ROIRect          *image.Rectangle
	SendRejected     bool
	VideoCaptureURI  string
	// contains filtered or unexported fields
}

func New

func New(config Config) (*Cam, error)

func (*Cam) GetParams

func (c *Cam) GetParams() string

func (*Cam) IsActive

func (c *Cam) IsActive() bool

func (*Cam) SetActive

func (c *Cam) SetActive(active bool)

func (*Cam) TakeFrameBuckets

func (c *Cam) TakeFrameBuckets() bool

func (*Cam) TokensRemaining

func (c *Cam) TokensRemaining() string

type Config

type Config struct {
	Name            string
	Index           int
	Bot             *telegram.Bot
	Store           *datastore.Store
	VideoCaptureURI string
	PubSubControl   bool
	MaxWidth        int
	MaxHeight       int
	MinWidth        int
	MinHeight       int
	RequirePortrait bool
	MinConfidence   int
	SendRejected    bool
	CropX           int
	CropY           int
	CropWidth       int
	CropHeight      int
	ROIX            int
	ROIY            int
	ROIWidth        int
	ROIHeight       int
}

Jump to

Keyboard shortcuts

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