Effectively, this produces 120 x 40 video picture size.
Then, when the pipeline is playing, the capsfilter changes to reduce video
picture size, e.g. caps=video/x-raw,width=100,height=100. This leads to
pipeline error (reported as data flow error in videotestsrc), because now
video picture size after cropping becomes negative (-100 x -100). videocrop
itself detects such conditions and simply sets an error return code that is
One way to prevent the error is to detect video picture size change *before
caps negotiation process reaches videocrop* and adjust videocrop's
properties accordingly. How?
I tried to set a (synchronous) callback that is invoked from pipeline worker
thread to monitor caps change:
Re: Callback from pipeline to notify about video picture size changing
In context of my scenario what is most suitable place to start observe inband
(synchronously) caps negotiation process and find new video picture size,
then change videocrop properties accordingly?
Another option looking well logically is to fix video picture size after
videocrop (so it will negotiate bigger size on its sink) and put videoscale
before (so it will adjuct the resolution difference). But this option leads
to lower performance and looks roughly.