Hi Tx Team,
I have a CSI OV5640 camera, which I am using to stream video using imx6 and GStreamer plugins. Now I have a certain custom device, that outputs a set of data(D1,D2) at 60Hz. I want to synchronize this set of data (D1 & D2) to the frames being captured by the camera. Both the custom device and OV5640 are connected to the imx6 processor.
For eg. the camera operates at 30 fps, which gives me each frame at ~33ms. This means two sets of data (D1 & D2) from the custom device, for each frame at a given point of time.
so at time t1 -> for frame F1, I have D1 & D2 captured at t0 and D1 & D2 captured at t1. F1 D10 D20 D11 D12 -> complete data at time t1.
The custom device provides a trigger signal, which can trigger the camera at 30Hz. I was wondering if its possible to trigger the camera OV5640 every 30Hz, so that the data from custom device and camera is in sync. I had a look into datasheet of OV5640, which says that it supports snapshot operation, but somehow there is no description available on how to do this. Could you let me know if this is possible to do?
It would also be fine, if the triggering can be done vice-versa, i.e. the camera triggering the custom device.
Could you suggest whats the best way to synchronize the custom device and camera? Gstreamer provides, timestamp features, which I am considering to use if none of the above solutions work. Would that be a good option?
Consider this simple eg:
gst-launch-1.0 -v imxv4l2videosrc device=/dev/video1 !
video/x-raw,width=100,height=50,framerate=30/1 ! filesink location=xyz.avi
How could I modify this to make it trigger from an external device at 30Hz?