Example app to exercise the various stream configurations available for Sherlock.
TBD
This method will not allow passing of command line arguments. All that can be done is to start running camera-gym.
sessionctl add_mod fuchsia-pkg://fuchsia.com/camera-gym#meta/camera-gym.cmx
This method will allow command line arguments. Arguments can be specified as shown below.
ffx component destroy /core/session-manager/session:session
fx shell present_view fuchsia-pkg://fuchsia.com/camera-gym#meta/camera-gym.cmx [ args ... ]
fx shell tiles_ctl start fx shell tiles_ctl add fuchsia-pkg://fuchsia.com/camera-gym#meta/camera-gym.cmx [ args ... ] fx shell tiles_ctl stop
fx shell run basemgr.cmx
camera-gym-ctl accepts lists of commands and sends them, one at a time, to camera-gym. camera-gym must be started in manual mode. (Use “fx camera-gym --manual”.)
There are short scripts that run these configs + streams in cycles:
camera-gym can be started in manual mode without a session running:
fx shell present_view fuchsia-pkg://fuchsia.com/camera-gym#meta/camera-gym-manual.cmx
test_simple.sh
Running this bash script will cycle through all configs and all streams forever.
test_crop.sh
Running this bash script will cycle through crop settings in steps of 1/40's.
fx shell camera-gym-ctl --set-description=0
fx shell camera-gym-ctl --set-description=1
Caveat (b/200839146): The current frame capture feature only works while a single stream is running. Trying to do so with multiple streams running at the same time will result capturing from a stream randomly selected from all of those running.
fx shell camera-gym-ctl --capture-frame=0
fx shell ls /data/r/sys/r/session-0/fuchsia.com:camera-gym:0#meta:camera-gym-manual.cmx/.
mkdir -p /tmp/my_dest_dir fx scp “[$(fx get-device-addr)]:”/data/r/sys/r/session-0/fuchsia.com:camera-gym:0#meta:camera-gym-manual.cmx/image_* /tmp/my_dest_dir/.
cd /tmp/my_dest_dir ls -1 image*.nv12 | sed -e ‘s@(._)([0-9][0-9]x[0-9][0-9])(.).nv12@ffmpeg -f rawvideo -pixel_format nv12 -video_size \2 -i \1\2\3.nv12 \1\2\3.png@’ > CONVERT.SH . CONVERT.SH
eog *.png
rsync -av remote.system.somewhere.com:/tmp/my_dest_dir /tmp/. cd /tmp/my_dest_dir eog *.png