Hi guys,
We call xioctl(int fd, int request, void *arg) to start / stop streaming with fixed exposure time.
For some reason we need to frequently restart the streaming, including mmap buffer reallocation / releasing:
- opening /dev/video0
- allocating mmap buffer
- starting streaming
- getting image from mmap buffer
- stopping streaming
- releasing mmap buffer
The procedure above which is a workaround aims to ensure the exposure of the image.
We’re facing some issues:
-
Execution time:
It takes too long for getting just one frame (e.g. 300 ms to get one 30 ms exposure frame). Several frames could be observed via oscilloscope during each streaming if a shorter exposure time is applied.
Please see 30ms_test_timestamp.txt, 30ms_test_dmesg.txt, 30ms_test_dbg_trace.txt. -
Stability (we skip the getting image step):
a. Streaming stops during burn-in test after many repetition times (around 130000 times).
We ran following script also got a similar repetition times then crashed (see script_burn_in_crash_log.txt):
for i in {1..1000000}
do
echo $i
v4l2-ctl -d 0 --stream-mmap --stream-count=1
done
b. Streaming can be easily stopped with some exposure time values (e.g. with 50 ms exposure time and never change).
Please see 50ms_test_timestamp.txt, 50ms_test_dmesg.txt, 50ms_test_dbg_trace.txt.
Any suggestion for improvement would be appreciated.
30ms_test_dbg_trace.txt (18.9 KB)
30ms_test_dmesg.txt (3.4 KB)
30ms_test_timestamp.txt (420 Bytes)
script_burn_in_crash_log.txt (7.0 KB)
50ms_test_dbg_trace.txt (44.4 KB)
50ms_test_dmesg.txt (534 Bytes)
50ms_test_timestamp.txt (145 Bytes)