Final set of changes for a working ffmpeg.
authorNelson Ferreira <nelson.ferreira@ieee.org>
Thu, 31 Dec 2015 19:39:54 +0000 (14:39 -0500)
committerNelson Ferreira <nelson.ferreira@ieee.org>
Thu, 31 Dec 2015 19:39:54 +0000 (14:39 -0500)
commit32e915e5dc4fea21550f0f97a3d526229182f374
tree50c0d92673e9c8afefd311b2551f5aac2fa074b7
parentc30ddaeba57c7cb8d3ae7c470b80733b1f68b448
Final set of changes for a working ffmpeg.

There are a couple of edges to polish but "works for me" now.

* src/media/media-ffmpeg.c (media_ffmpeg_read): Use
avcodec_decode_audio3 if available. More work is needed to use
avcodec_decod_audio4 because it uses frames which would need to
then be copied to the output buffer.
(my_get_buffer): Use avcodec_default_get_buffer2.
(my_release_buffer): No longer needed.
(stream_component_open): Properly set the thread count and use
avcodec_open2. Set get_buffer2 to my_get_buffer since we
are using the new interface.
(media_ffmpeg_available_formats): Use av_iformat_next.
(stream_open): Defer setting codec options to a later better
understanding of ffmpeg (keep #if 0 the old).
(new_media_ffmpeg_open): Use only the most recent AVIOContext access
method to set eof_reached. If we get issues reported we'll
revisit.
(new_media_ffmpeg_read): Use avio_eof and the most error field of
AVIOContext instead of furl_feof.  Do not unset the interrupt
callback for now.  We may need to revisit the reset of the
callback later.

* m4/sxe-mm.m4 (SXE_CHECK_FFMPEG_LIBS): Properly check for the
avcodec_decode_audio* and define corresponding
HAVE_AVCODEC_AUDIO*.  Also check for av_iformat_next.
(SXE_MM_CHECK_FFMPEG): Check at least one avcodec_decode_audio is
available and av_iformat_next.

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
m4/sxe-mm.m4
src/media/media-ffmpeg.c