GNOME Bugzilla – Bug 442557
[videorate] doesn't handle latency queries
Last modified: 2007-07-13 18:13:01 UTC
videorate should handle latency queries since it's delaying the output of the video frames (it needs to have 2 buffers before knowing which ones to output with which timestamps). The hard part is figuring out exactly what value should be added to the upstream latency. It should at least be the duration of one output frame (ie 1/output_framerate seconds), but that might not be enough. If you have an constant input framerate which is lower, then you should be adding the duration of one of the input framerate (ie 1/input_framerate seconds). The really tricky part is for non-constant incoming framerates (a webcam for example, or an rtp source which can have frame dropped). Then you have no way of knowing how much latency is introduced.
* gst/videorate/gstvideorate.c: (gst_video_rate_init), (gst_video_rate_query): Use boilerplate. Add latency query, might not be perfect yet but already works a lot better. Fixes #442557.