videorate : Not doing framerate conversion if average-period is set
Submitted by parithi
Link to original bug (#796597)
Description
Framerate conversion is not happening if average-period property is set.
In the following pipeline I've set average-period to 5 seconds. Input frame rate is 30 fps and output of videorate is set to 25 fps. Expected time diff between output buffers is 40ms, but I am getting 33ms which corresponds to 30 fps.
gst-launch-1.0 videotestsrc ! video/x-raw, framerate=30/1 ! videorate skip-to-first=1 qos=0 average-period=5000000000 ! video/x-raw, framerate=25/1 ! checksumsink
Pipeline is PREROLLING ...
Redistribute latency...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
0:00:00.000000000 96f54b85d2ba09c1f8d6863771304c191d8a0e83
New clock: GstSystemClock
0:00:00.066666666 2e7b907574b0be4e0ae6d2757d538576592c0add
0:00:00.100000000 a33753318af1113e98ab7d5fcbe4258f45efdb1a
0:00:00.133333333 cd5c2a365590667741b40136856de7bfb85513f1
0:00:00.166666666 f8910ba35cfb967bab88ba655105aa36eb2c6abb
0:00:00.200000000 460009fb3a7ba25095e66d4bc11c0649a3e59252
0:00:00.233333333 e7b5464887bd0eb4634240c2f18dac37faf4e205
0:00:00.266666666 64595449f6eb0eb97a914eed0e1ac2d1b9749f92
0:00:00.300000000 ad0fc6b080a48402831e26c1bc0aa5d8d83ff21d
0:00:00.333333333 62c92106e0c66a05dddfb782f809208ce343a928
Setting pipeline to PAUSED ...The following pipeline has verage-period as 0 seconds and works properly. I am getting 40ms diff between output buffers.
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
0:00:00.000000000 96f54b85d2ba09c1f8d6863771304c191d8a0e83
New clock: GstSystemClock
0:00:00.040000000 06ea7c0dce328162fbd15515cd40f6ab9b2fedad
0:00:00.080000000 2e7b907574b0be4e0ae6d2757d538576592c0add
0:00:00.120000000 cd5c2a365590667741b40136856de7bfb85513f1
0:00:00.160000000 f8910ba35cfb967bab88ba655105aa36eb2c6abb
0:00:00.200000000 460009fb3a7ba25095e66d4bc11c0649a3e59252
0:00:00.240000000 e7b5464887bd0eb4634240c2f18dac37faf4e205
0:00:00.280000000 64595449f6eb0eb97a914eed0e1ac2d1b9749f92
0:00:00.320000000 62c92106e0c66a05dddfb782f809208ce343a928
0:00:00.360000000 c9c8947b40371d4a2129dd49a91c115bd0dfcc91
gst-launch-1.0 videotestsrc ! video/x-raw, framerate=30/1 ! videorate skip-to-first=1 qos=0 average-period=0000000000 ! video/x-raw, framerate=25/1 ! checksumsinkVersion: 1.14.0