AVFVideoSource must post a latency message after it renegotiates caps
Submitted by Nick Kallen
Link to original bug (#778273)
Description
Background:
The AVFVideoSource represents the iphone front- and rear-facing cameras. The cameras can output at various frame-rates and putting a capsfilter downstream will trigger the frame-rate selection during caps negotiation. The frame-rate affects the latency, because for example 30fps leads to a latency of ~33ms
.
The bug:
Adding an avfvideosrc to a pipeline in the NULL state works fine because PLAYING the pipeline will calculate latency after all the caps have been negotiated.
However, if you add an avfvideosrc to an already running pipeline, it will renegotiate caps but it will not trigger a latency event after deciding its frame-rate. If the pipeline already had a latency less than 1/frame-rate frames will be dropped.
The fix:
Post latency message after caps have been set.
Version: 1.11.1