amcrest

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const EncodeConfig string = "Encode"
View Source
const EncodeTypeAlarm int = 2
View Source
const EncodeTypeMotion int = 1
View Source
const EncodeTypeRegular int = 0
View Source
const ExtraFormat string = "ExtraFormat"
View Source
const GeneralConfig string = "General"
View Source
const MainFormat string = "MainFormat"
View Source
const SnapConfig string = "Snap"
View Source
const SnapFormat string = "SnapFormat"
View Source
const VideoBitRateControlParam string = "Video.BitRateControl"
View Source
const VideoBitRateParam string = "Video.BitRate"
View Source
const VideoCompressionParam string = "Video.Compression"
View Source
const VideoEncodingH263 string = "H263"
View Source
const VideoEncodingH264 string = "H264"
View Source
const VideoEncodingH265 string = "H265"
View Source
const VideoEncodingMJPG string = "MJPG"
View Source
const VideoEncodingMPEG1 string = "MPEG1"
View Source
const VideoEncodingMPEG2 string = "MPEG2"
View Source
const VideoEncodingMPEG4 string = "MPEG4"
View Source
const VideoFPSParam string = "Video.FPS"
View Source
const VideoGOPParam string = "Video.GOP"
View Source
const VideoResolution1080P = VideoResolution1920x1080
View Source
const VideoResolution1920x1080 string = "1920x1080"
View Source
const VideoResolution2560x1920 string = "2560x1920"
View Source
const VideoResolution5_1M = VideoResolution2560x1920
View Source
const VideoResolutionDefault string = "720x576"
View Source
const VideoResolutionParam string = "Video.resolution"

Variables

This section is empty.

Functions

This section is empty.

Types

type AmcrestClient

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

func New

func New(host string, username string, password string) *AmcrestClient

func (*AmcrestClient) GetConfig

func (c *AmcrestClient) GetConfig(configName string) ([]ConfigValue, error)

func (*AmcrestClient) GetEncodingConfigCapabilities

func (c *AmcrestClient) GetEncodingConfigCapabilities() ([]ConfigValue, error)

func (*AmcrestClient) GetSnapshot

func (c *AmcrestClient) GetSnapshot(channel ...int) (GetSnapshotResponse, error)

Get a snapshot from the specified channel

Parameter

channel int (optional): the channel index (starts at 1)

func (*AmcrestClient) SetConfig

func (c *AmcrestClient) SetConfig(inputs ...ConfigValue) error

type ConfigValue

type ConfigValue struct {
	// Category[Channel].FormatType[FormatEncodeType].Param=Value
	Category         string
	Channel          int // The channel index (starts at 0)
	FormatType       string
	FormatEncodeType int
	Param            string
	Value            any
}

func ConfigValueFromString

func ConfigValueFromString(input string) (ConfigValue, error)

Parse config values from a string

input: a string like "Category[Channel].FormatType[FormatEncodeType].Param.Name=Value"

func (ConfigValue) ToParamString

func (c ConfigValue) ToParamString() string

type GetSnapshotResponse

type GetSnapshotResponse struct {
	MimeType string
	Data     []byte
}

Jump to

Keyboard shortcuts

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