Provide timestamps to librts' rts::IFrameListener
It would be nice if IFrameListener was provided with timestamps of the moment the frame was received. But it's not so trivial:
- for 'live' sources, wall time would be the most useful
- but each source can have different latency and possibly provides some timestamps of its own; it would be good to use these to make this as precise as possible
- but there are also log sources (i.e. reading rtlsdr or gpio log); these can't provide wall clock timestamps, but they can provide timestamps relative to log start
- what exactly should the timestamp refer to? Probably to the start of the frame (including any sync pulses etc.) So it could be delivered to onFrameDetected (assuming any decoded frame has been detected just before that, so the last TS passed to onFrameDetected also refers to the decoded frame).
- the actual mechanism of passing the TS needs to be generic to support both absolute and relative timestamps. And possibly different absolute timestamps depending on the mechanism used by each source? A simple abstract base class + specific implementations + visitor should be sufficient.
- but if timestamps are not needed, there might be a way of turning these off to not burn CPU and memory needlessly? But is it worth it? The producer could just make 1 instance of the respective TS class, update the timestamp and pass that instance to onFrameDetected. So this will only cost the retrieval of the timestamp. Which, taking into account what else happens there, is really OK.