camera

package
v0.0.0-...-a6ce1d2 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2018 License: GPL-2.0 Imports: 8 Imported by: 1

Documentation

Overview

Package camera handles the camera processing

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CamHandler

type CamHandler struct {
	Cam Camera
}

CamHandler is an http.Handler for a camera

func (CamHandler) ServeHTTP

func (c CamHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Camera

type Camera interface {
	GetFrameJPEG() (io.ReadCloser, error)
	Close() error
}

Camera is a camera used for the robot

type Local

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

Local is a local camera

func NewLocalCam

func NewLocalCam(path string) (*Local, error)

NewLocalCam sets up a new local camera

func (*Local) Close

func (l *Local) Close() error

Close a camera.Local

func (*Local) GetFrameJPEG

func (l *Local) GetFrameJPEG() (io.ReadCloser, error)

GetFrameJPEG returns an io.ReadCloser with a frame in JPEG format

type Remote

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

Remote is a remote camera

func NewRemoteCam

func NewRemoteCam(u *url.URL, cli *http.Client) *Remote

NewRemoteCam creates a new Remote object

func (*Remote) Close

func (r *Remote) Close() error

Close a camera.Remote

func (*Remote) GetFrameJPEG

func (r *Remote) GetFrameJPEG() (io.ReadCloser, error)

GetFrameJPEG returns an io.ReadCloser with a frame in JPEG format

Jump to

Keyboard shortcuts

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