video

package
v0.0.0-...-ab68a60 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

MIT License -----------

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

MIT License -----------

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Transcode

func Transcode(input string, output string) error

Types

type Dnn

type Dnn struct {
	DrawBoxes bool
	// contains filtered or unexported fields
}

func NewDnn

func NewDnn() *Dnn

func (*Dnn) Close

func (v *Dnn) Close()

func (*Dnn) EnableBoxing

func (v *Dnn) EnableBoxing(enableBoxing bool)

func (*Dnn) Init

func (v *Dnn) Init()

func (*Dnn) Name

func (v *Dnn) Name() string

func (*Dnn) Run

func (v *Dnn) Run(in gocv.Mat)

func (*Dnn) SetModelPath

func (v *Dnn) SetModelPath(modelPath string)

func (*Dnn) SetState

func (v *Dnn) SetState(state *event.State)

type Frame

type Frame struct {
	Data     []byte
	DataSize int
	Height   int
	Width    int
	// contains filtered or unexported fields
}

type MotionDetector

type MotionDetector struct {
	MinimumArea  float64
	DrawBoxes    bool
	DrawContours bool
	ShowWindow   bool
	// contains filtered or unexported fields
}

func NewMotionDetector

func NewMotionDetector() *MotionDetector

func (*MotionDetector) Close

func (v *MotionDetector) Close()

func (*MotionDetector) EnableBoxing

func (v *MotionDetector) EnableBoxing(enableBoxing bool)

func (*MotionDetector) EnableContours

func (v *MotionDetector) EnableContours(enableCountours bool)

func (*MotionDetector) EnableWindow

func (v *MotionDetector) EnableWindow(enableWindow bool)

func (*MotionDetector) Init

func (v *MotionDetector) Init()

func (*MotionDetector) Name

func (v *MotionDetector) Name() string

func (*MotionDetector) Run

func (v *MotionDetector) Run(img gocv.Mat)

func (*MotionDetector) SetMinimumArea

func (v *MotionDetector) SetMinimumArea(minimumArea float64)

func (*MotionDetector) SetState

func (v *MotionDetector) SetState(state *event.State)

type Video

type Video struct {
	VideoOutput     []VideoProcessor
	RecordingOutput []chan VideoRecording
	// contains filtered or unexported fields
}

func NewVideo

func NewVideo(storagePath string) *Video

func (*Video) Free

func (v *Video) Free()

func (*Video) GetIsRecording

func (v *Video) GetIsRecording() bool

func (*Video) GetSinkFrame

func (v *Video) GetSinkFrame() Frame

func (*Video) IsSinkPlaying

func (v *Video) IsSinkPlaying() bool

func (*Video) Open

func (v *Video) Open(src *VideoSource) bool

func (*Video) RegisterVideoChannel

func (v *Video) RegisterVideoChannel(ch chan VideoRecording)

func (*Video) RegisterVideoOutput

func (v *Video) RegisterVideoOutput(proc VideoProcessor)

func (*Video) ReleaseFrame

func (v *Video) ReleaseFrame(frame *Frame)

func (*Video) SetState

func (v *Video) SetState(state *event.State)

func (*Video) Start

func (v *Video) Start() bool

func (*Video) StartProcessors

func (v *Video) StartProcessors()

func (*Video) StartRecording

func (v *Video) StartRecording(EventUuid string) bool

func (*Video) Stop

func (v *Video) Stop() bool

func (*Video) StopRecording

func (v *Video) StopRecording() VideoRecording

func (*Video) Transcode

func (v *Video) Transcode(input string, output string) bool

type VideoProcessor

type VideoProcessor interface {
	Init()
	Name() string
	SetState(state *event.State)
	Run(img gocv.Mat)
	Close()
}

type VideoRecording

type VideoRecording struct {
	EventId      string
	VideoUri     string
	ThumbnailUri string
}

type VideoSource

type VideoSource struct {
	Type     int
	Uri      string
	Username string
	Password string
	Height   int
	Width    int
	Fps      float32
	Codec    string

	DisableRecord bool
}

Jump to

Keyboard shortcuts

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