Change ListSizes function for V4L2 device

This commit is contained in:
Alex X
2025-01-07 22:17:35 +03:00
parent e4b8d1807d
commit 93252fc5d2
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -66,8 +66,8 @@ func (d *Device) ListFormats() ([]uint32, error) {
return items, nil
}
func (d *Device) ListSizes(pixFmt uint32) ([]uint32, error) {
var items []uint32
func (d *Device) ListSizes(pixFmt uint32) ([][2]uint32, error) {
var items [][2]uint32
for i := uint32(0); ; i++ {
fs := v4l2_frmsizeenum{
@@ -85,7 +85,7 @@ func (d *Device) ListSizes(pixFmt uint32) ([]uint32, error) {
continue
}
items = append(items, fs.discrete.width, fs.discrete.height)
items = append(items, [2]uint32{fs.discrete.width, fs.discrete.height})
}
return items, nil