My flow graph is a DVBS2 transmitter, with a file source that is reading from a pipe with the webcam on the other side of the pipe. I'm receiving the transmission on another computer with DVBS2 receiver and displaying the video in a window. I'm calculating the overall latency of the two systems by moving in front of the webcam and then checking after how many seconds my video moves on the Rx machine. Currently, I'm seeing around 20 seconds which I believe is too much. I'm assuming a considerable portion of this latency is coming from the TX side (at least 5 seconds).
To troubleshoot, on the TX side, I've added a custom block just after the file source that adds a tag with a timestamp, and I'm reading the tag just before the hardware sink and comparing it with the current host time. I'm getting a maximum of 150 ms only: this is the time between the first byte leaving the file source until it arrives at the hardware sink. If so, where is all the latency coming from? My only logical conclusion was that bytes were coming from file source, stored in a buffer waiting for the hardware to finish initialization. This was the only explanation of the 5-10 secs delay.
Here is the flow graph I'm using for better understanding, the custom blocks to add and read the timestamps are circled. Anybody is welcome to share ideas.