remotecctv

package module
v0.0.0-...-1dafa22 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2019 License: BSD-3-Clause Imports: 11 Imported by: 0

README

remotecctv

This program is a distributed video streamer and viewer for multiple feeds that connect using abstract RF protcols such as LoRa, Long Range WiFi, etc. The connection must only implement the RemoteConnection interface.

This module and its packages are beiung actively developed, and unstable/unusable. Only tagged releases are ment to be used.

See LICENCE for licensing and copyright information.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareHashArgon

func CompareHashArgon(password []byte, hash []byte) error

CompareHashArgon compares hash to the argon2 hash of password. It returns a non-nil error if they DO NOT match, and nil err if they do.

func LoginPage

func LoginPage(w http.ResponseWriter, r *http.Request)

Types

type Argon2Parameters

type Argon2Parameters struct {
	Memory      uint32
	Iterations  uint32
	Parallelism uint8
	// recomended salt length of at least 16 bytes.
	SaltLen uint32
	// recomended key length of at leasr 32 bytes
	KeyLen uint32
}

Argon2Parameters holds the setttings for using Argon2.

type MediaStream

type MediaStream interface {
	io.Reader
	io.Seeker
	io.Closer
	Type() StreamType
}

MediaStream is a ReadSeekCloser with a the addition of a `Type() StreamType` method.

type Server

type Server struct {
	// embeds an http.Server for the incomming network connection.
	*http.Server
	// contains filtered or unexported fields
}

Server is an http server that also serves streaming media such as video.

func NewServer

func NewServer(addr string) *Server

func (*Server) Streams

func (s *Server) Streams() ([]MediaStream, error)

Streams return a slice containing all of the available MediaStreams.

type StreamType

type StreamType int

StreamType denotes the type of the media stream.

const (
	AudioStream StreamType = iota
	VideoStream
)

func (*StreamType) Audio

func (st *StreamType) Audio() bool

func (*StreamType) Read

func (st *StreamType) Read(p []byte) (n int, err error)

func (*StreamType) StreamVideo

func (st *StreamType) StreamVideo(p []byte) (n int, stopFunc func(), err error)

func (*StreamType) Type

func (st *StreamType) Type() StreamType

func (*StreamType) Video

func (st *StreamType) Video() bool

type Streamer

type Streamer interface {
	Stream(p chan []byte) (stopFunc func(), err error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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