• Aman Gupta's avatar
    avcodec/mediacodecdec: refactor to take advantage of new decoding api · f611fef3
    Aman Gupta authored
    This refactor splits up the main mediacodec decode loop into two
    send/receive helpers, which are then used to rewrite the receive_frame
    callback and take full advantage of the new decoding api. Since we
    can now request packets on demand with ff_decode_get_packet(), the
    fifo buffer is no longer necessary and has been removed.
    
    This change was motivated by behavior observed on certain Android TV
    devices, featuring hardware mpeg2/h264 decoders which also deinterlace
    content (to produce multiple frames per field). Previously, this code
    caused buffering issues because queueInputBuffer() was always invoked
    before each dequeueOutputBuffer(), even though twice as many output
    buffers were being generated.
    
    With this patch, the decoder will always attempt to drain new frames
    first before sending more data into the underlying codec.
    Signed-off-by: 's avatarMatthieu Bouron <matthieu.bouron@gmail.com>
    f611fef3
Name
Last commit
Last update
compat Loading commit data...
doc Loading commit data...
ffbuild Loading commit data...
fftools Loading commit data...
libavcodec Loading commit data...
libavdevice Loading commit data...
libavfilter Loading commit data...
libavformat Loading commit data...
libavresample Loading commit data...
libavutil Loading commit data...
libpostproc Loading commit data...
libswresample Loading commit data...
libswscale Loading commit data...
presets Loading commit data...
tests Loading commit data...
tools Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING.md Loading commit data...
COPYING.GPLv2 Loading commit data...
COPYING.GPLv3 Loading commit data...
COPYING.LGPLv2.1 Loading commit data...
COPYING.LGPLv3 Loading commit data...
CREDITS Loading commit data...
Changelog Loading commit data...
INSTALL.md Loading commit data...
LICENSE.md Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
RELEASE Loading commit data...
configure Loading commit data...