mirror of https://bitbucket.org/ausocean/av.git
input/gvctrl/gvctrl.go: adapted Height option function to support channel 1 resolution options (just 1080p so far)
This commit is contained in:
parent
710a245c89
commit
d3cb619389
|
@ -148,7 +148,15 @@ func CodecOut(c Codec) Option {
|
|||
// heights are 256, 360 and 720.
|
||||
func Height(h int) Option {
|
||||
return func(s settings) (settings, error) {
|
||||
v, ok := map[int]string{256: res256, 360: res360, 720: res720}[h]
|
||||
var m map[int]string
|
||||
switch s.ch {
|
||||
case 1:
|
||||
// TODO: add other resolutions supported by channel 1.
|
||||
m = map[int]string{1080: res1080}
|
||||
case 2:
|
||||
m = map[int]string{256: res256, 360: res360, 720: res720}
|
||||
}
|
||||
v, ok := m[h]
|
||||
if !ok {
|
||||
return s, fmt.Errorf("invalid display height: %d", h)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue