mirror of https://bitbucket.org/ausocean/av.git
cmd/rv/main.go: updating bitrate pin and using const
This commit is contained in:
parent
7a265335f4
commit
eafc0179c3
|
@ -103,6 +103,7 @@ const (
|
|||
profilePath = "rv.prof"
|
||||
pkg = "rv: "
|
||||
runPreDelay = 20 * time.Second
|
||||
bitratePin = "X36"
|
||||
)
|
||||
|
||||
// This is set to true if the 'profile' build tag is provided on build.
|
||||
|
@ -269,11 +270,11 @@ func sleep(ns *netsender.Sender, l *logger.Logger) {
|
|||
}
|
||||
|
||||
// readPin provides a callback function of consistent signature for use by
|
||||
// netsender to retrieve software defined pin values e.g. revid bitrate (X23).
|
||||
// netsender to retrieve software defined pin values e.g. revid bitrate.
|
||||
func readPin(rv *revid.Revid) func(pin *netsender.Pin) error {
|
||||
return func(pin *netsender.Pin) error {
|
||||
switch {
|
||||
case pin.Name == "X23":
|
||||
case pin.Name == bitratePin:
|
||||
pin.Value = -1
|
||||
if rv != nil {
|
||||
pin.Value = rv.Bitrate()
|
||||
|
|
Loading…
Reference in New Issue