mirror of https://bitbucket.org/ausocean/av.git
Merged in netsender-report-vars (pull request #304)
Netsender report vars Approved-by: Saxon Milton <saxon.milton@gmail.com> Approved-by: Alan Noble <anoble@gmail.com>
This commit is contained in:
commit
bf006f1dcd
|
@ -282,7 +282,7 @@ func run(cfg config.Config) {
|
|||
return nil // Return error only if we want NetSender to generate an error
|
||||
}
|
||||
|
||||
ns, err := netsender.New(log, nil, readPin, nil)
|
||||
ns, err := netsender.New(log, nil, readPin, nil, config.TypeData)
|
||||
if err != nil {
|
||||
log.Log(logger.Fatal, pkg+"could not initialise netsender client: "+err.Error())
|
||||
}
|
||||
|
|
3
go.mod
3
go.mod
|
@ -3,12 +3,11 @@ module bitbucket.org/ausocean/av
|
|||
go 1.13
|
||||
|
||||
require (
|
||||
bitbucket.org/ausocean/iot v1.2.8
|
||||
bitbucket.org/ausocean/iot v1.2.9
|
||||
bitbucket.org/ausocean/utils v1.2.11
|
||||
github.com/Comcast/gots v0.0.0-20190305015453-8d56e473f0f7
|
||||
github.com/go-audio/audio v0.0.0-20181013203223-7b2a6ca21480
|
||||
github.com/go-audio/wav v0.0.0-20181013172942-de841e69b884
|
||||
github.com/kr/pretty v0.1.0 // indirect
|
||||
github.com/mewkiz/flac v1.0.5
|
||||
github.com/pkg/errors v0.8.1
|
||||
github.com/yobert/alsa v0.0.0-20180630182551-d38d89fa843e
|
||||
|
|
2
go.sum
2
go.sum
|
@ -1,5 +1,7 @@
|
|||
bitbucket.org/ausocean/iot v1.2.8 h1:m2UhfAbG/6RKPBzY4OJ5S7zLxTmuzyMKPNbu0qaxFIw=
|
||||
bitbucket.org/ausocean/iot v1.2.8/go.mod h1:wCLOYeEDCxDquneSZ/zTEcKGXZ6uan+6sgZyTMlNVDo=
|
||||
bitbucket.org/ausocean/iot v1.2.9 h1:3tzgiekH+Z0yXhkwnqBzxxe8qQJ2O7YTkz4s0T6stgw=
|
||||
bitbucket.org/ausocean/iot v1.2.9/go.mod h1:Q5FwaOKnCty3dVeVtki6DLwYa5vhNpOaeu1lwLyPCg8=
|
||||
bitbucket.org/ausocean/utils v1.2.11 h1:zA0FOaPjN960ryp8PKCkV5y50uWBYrIxCVnXjwbvPqg=
|
||||
bitbucket.org/ausocean/utils v1.2.11/go.mod h1:uXzX9z3PLemyURTMWRhVI8uLhPX4uuvaaO85v2hcob8=
|
||||
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
|
||||
|
|
|
@ -258,6 +258,45 @@ type Config struct {
|
|||
MTSRBWriteTimeout int // The ringbuffer write timeout in seconds.
|
||||
}
|
||||
|
||||
// TypeData contains information about all of the variables that
|
||||
// can be set over the web. It is a psuedo const.
|
||||
var TypeData = map[string]string{
|
||||
"AutoWhiteBalance": "enum:off,auto,sun,cloud,shade,tungsten,fluorescent,incandescent,flash,horizon",
|
||||
"BitDepth": "int",
|
||||
"Brightness": "uint",
|
||||
"BurstPeriod": "uint",
|
||||
"CameraChan": "int",
|
||||
"CBR": "bool",
|
||||
"ClipDuration": "uint",
|
||||
"Exposure": "enum:auto,night,nightpreview,backlight,spotlight,sports,snow,beach,verylong,fixedfps,antishake,fireworks",
|
||||
"FrameRate": "uint",
|
||||
"Height": "uint",
|
||||
"HorizontalFlip": "bool",
|
||||
"HTTPAddress": "string",
|
||||
"Input": "enum:raspivid,rtsp,v4l,file",
|
||||
"InputCodec": "enum:H264,MJPEG",
|
||||
"InputPath": "string",
|
||||
"Logging": "enum:Debug,Info,Warning,Error,Fatal",
|
||||
"MinFrames": "uint",
|
||||
"MTSRBElementSize": "int",
|
||||
"MTSRBSize": "int",
|
||||
"MTSRBWriteTimeout": "int",
|
||||
"OutputPath": "string",
|
||||
"Outputs": "string",
|
||||
"Quantization": "uint",
|
||||
"Rotation": "uint",
|
||||
"RTMPRBElementSize": "int",
|
||||
"RTMPRBSize": "int",
|
||||
"RTMPRBWriteTimeout": "int",
|
||||
"RTMPURL": "string",
|
||||
"RTPAddress": "string",
|
||||
"Saturation": "int",
|
||||
"VBRBitrate": "int",
|
||||
"VBRQuality": "enum:standard,fair,good,great,excellent",
|
||||
"VerticalFlip": "bool",
|
||||
"Width": "uint",
|
||||
}
|
||||
|
||||
// Validation errors.
|
||||
var (
|
||||
errInvalidQuantization = errors.New("invalid quantization")
|
||||
|
|
Loading…
Reference in New Issue