Skip to content

Commit 680a429

Browse files
committed
camera-usb: Share cropped height/width (backported from folk2)
1 parent 3e17eae commit 680a429

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

virtual-programs/camera-usb.folk

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,11 @@ When /someone/ wishes $::thisNode uses camera /cameraPath/ with /...options/ {
349349
set camera [Camera::new $cameraPath $width $height $bufferCount]
350350

351351
# TODO: report actual width and height from v4l2
352-
Claim camera $cameraPath has width $width height $height
352+
if {[info exists crop]} {
353+
Claim camera $cameraPath has width [dict get $crop width] height [dict get $crop height]
354+
} else {
355+
Claim camera $cameraPath has width $width height $height
356+
}
353357

354358
puts "camera-usb: $cameraPath ($options) (tid [getTid]) booted at [clock milliseconds]"
355359

0 commit comments

Comments
 (0)