theoraenc: do not reset the encoder when we need a keyframe
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Mon, 25 Feb 2013 10:49:19 +0000 (10:49 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Sun, 31 Mar 2013 14:45:26 +0000 (15:45 +0100)
commitda673880eb8f9bca9c84f63ef722720b3a3fc49f
treebe8254bb4c57ba932661dc15f46a22d8d080b691
parent76d71da1c4a90730a4dfa5a595bb48e1cdd3fa8f
theoraenc: do not reset the encoder when we need a keyframe

Instead, remember we need a keyframe, and we will force the encoder
to emit one next time we submit a new frame.
Since libtheora does not have an API to request a keyframe, we reset
the max keyframe interval to 1 temporarily.

This has the advantage that the rate control keeps its history,
and that the encoder won't choose different quant tables or
somesuch, thus requiring new streamheaders (although this is
probably only a theoretical possibility). Should also be a
bit faster than resetting the encoder.

https://bugzilla.gnome.org/show_bug.cgi?id=663350
ext/theora/gsttheoraenc.c