Uoti Urpala wrote:
On Mon, 2008-09-15 at 15:44 +0200, Stefan Schuermans wrote:
With other words: I did not find out how to change the interval after which MPlayer calls the fill_buffer callback. Can you point me at some documentation regarding this or at another demuxer that does that?
A demuxer stream does not need to have a frame rate. You only need to set the correct timestamp for the frames (the pts field of demuxer packets). The changes between timestamps can be arbitrary.
Calls to the fill_buffer callback are not really timed (though they of course depend somewhat on how often new frames are required). MPlayer calls it at some point to get the next frame, and then later times the display of that frame according to the timestamps.
Thank you for this tip. I've now found the "DEMUXER_CTRL_CORRECT_PTS" control call I've been missing so far and I think I was able to convert the MNG demuxer to dynamic framerate. But I've implemented a minimum framerate of 5 fps because output shows some odd behaviour if the framerate is much slower, e.g. when moving X11 output window. (Btw: This control call seems to be missing in the GIF demuxer?!?!) The other issues mentioned so far are also fixed now, except I'm still not using the MNG library refresh callback. I've added more comment text why I did it another way. The diff attached has been done against current svn version.