Release Vulpes OS 2.7-preview.24

This commit is contained in:
OverSu 2026-11-04 12:52:20 +01:00
commit 97ef99f827
135 changed files with 7717 additions and 2524 deletions

View file

@ -28,9 +28,8 @@ class Listener(C.Structure):
class Camera:
width, height = 640, 480
def __init__(self, index):
def __init__(self, index, width=640, height=480):
self.width, self.height = width, height
self.camera = None
self.display = self.surface = self.context = None
self.frame = None
@ -223,6 +222,8 @@ class Camera:
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--camera', type=int, choices=(0, 1), default=0)
parser.add_argument('--width', type=int, choices=(320, 640), default=640)
parser.add_argument('--height', type=int, choices=(240, 480), default=480)
parser.add_argument('--probe', action='store_true', help='Count frames for five seconds, retain no images')
args = parser.parse_args()
output = os.fdopen(os.dup(1), 'wb', buffering=0)
@ -235,7 +236,9 @@ def main():
os.dup2(2, 1) # HAL callbacks can print; keep stdout protocol uncontaminated.
camera = None
try:
camera = Camera(args.camera)
if (args.width, args.height) not in ((320,240),(640,480)):
raise ValueError('CAMERA_UNSUPPORTED_PREVIEW_SIZE')
camera = Camera(args.camera, args.width, args.height)
started = last_request = time.monotonic()
if not args.probe:
metadata = json.dumps(camera.metadata()).encode()