(bind-func astra_start_rgb
(lambda ()
(let ((sensor:astra_streamsetconnection_t (alloc))
(reader:astra_reader_t (alloc))
(colorAvailable:i1 0)
(mode:<i32,i32,i32,i32,i8,i32>* (alloc))
(stream:astra_colorstream_t (alloc)))
(astra_initialize)
(println '[open]: (astra_streamset_open "device/default" (ref sensor)))
(println '[create 'reader]: (astra_reader_create sensor (ref reader)))
(println '[fetch 'stream]: (astra_reader_get_colorstream reader (ref stream)))
(println '[check 'color 'available]: (astra_colorstream_is_available stream (ref colorAvailable)))
(println '[is 'color 'available]: colorAvailable)
;(tfill! mode 0 640 480 ASTRA_PIXEL_FORMAT_RGB888 30)
;(println '[set 'mode]: (astra_imagestream_set_mode stream (convert mode)))
(println '[start 'stream]: (astra_stream_start stream))
(AstraCtx sensor reader))))