v4l2: implement TimeCode meta
Submitted by Aurélien Zanelli
Link to original bug (#753592)
Description
Currently, we have no way to retrieve the original timestamp of the v4l2buffer in downstream element due to the addition of the delay between the time at which buffer has been timestamped and the processing by v4l2src element.
The original v4l2 timestamp could be useful for application or elements which needs the exact acquisition timestamp to perform some processing which involve external timestamped values.
For instance here is my current use case:
I have an element which takes raw frames, normally from a v4l2src, and perform video stabilization using data from an IMU (inertial measurement unit). These data are timestamped during acquisition, and are queried with timestamp. To perform accurate video stabilization, I shall use the frame acquisition timestamp.
So I propose to add V4L2 metadata to buffer pushed by v4l2src containing the v4l2buffer timestamp. These metadata could be extended as well to contains other v4l2 specific fields.
This changes is very specific to V4L2 and maybe overkill, I mean adding a meta just for a timestamp (currently). It may also be very specific to my use case.
However, I didn't find an other way to retrieve this info, nor generic metadata which can handle this.
Don't hesitate to comment
P.S.: Could be linked with https://bugzilla.gnome.org/show_bug.cgi?id=753562