grabber

package
v0.0.0-...-66a10cb Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Capture

type Capture struct {
	Connection chan Data
	// contains filtered or unexported fields
}

func New

func New(url string) (*Capture, error)

New creates a new connection and returns the pointer to Capture struct

func (*Capture) CloseStream

func (c *Capture) CloseStream() error

CloseStream disconnect's active stream

func (*Capture) ForceReconnect

func (c *Capture) ForceReconnect() error

ForceReconnect forces stream to close and connect again for various reasons

func (*Capture) Fps

func (c *Capture) Fps() time.Duration

Fps returns the current fps target set by user or a default one if user did not provide one.

func (*Capture) Pause

func (c *Capture) Pause()

Pause simply stop processing frames, but maintain the connection with the camera In simple words, it uses Grab() instead of Read()

func (*Capture) PauseWithTimeout

func (c *Capture) PauseWithTimeout(timeout time.Duration)

PauseWithTimeout is the same as Pause but it will automaticly resume after timeout passed.

func (*Capture) Resume

func (c *Capture) Resume()

Resume continues processing frames

func (*Capture) SetFps

func (c *Capture) SetFps(fps float64)

SetFps sets the target fps for the camera

func (*Capture) SetReconnect

func (c *Capture) SetReconnect(attempts int, delay time.Duration)

SetReconnect sets max reconnect attempts and delay between attempts

type Data

type Data struct {
	Frame gocv.Mat
	Time  time.Time
	Err   error
}

Jump to

Keyboard shortcuts

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