[FFmpeg-devel] [PATCH] add support to Android ndk MediaCodec for encoding/decoding
Matthieu Bouron
matthieu.bouron at gmail.com
Sun Jun 28 14:42:56 EEST 2020
On Sat, Jun 27, 2020 at 09:54:58PM +0300, Martin Storsjö wrote:
> On Sat, 27 Jun 2020, Olivier Ayache wrote:
>
> > Hi everyone this is the first time I post on this mailing list. I am
> > working since several years on a fork of Xuggler for manipulating ffmpeg
> > API with Java/Kotlin.
> > This work leads me to develop encoder and decoder based on Android NDK
> > MediaCodec.
> >
> > This work can be found on my Github repository
> >
> > https://github.com/olivierayache/xuggle-xuggler
> >
> >
> > I know that FFmpeg already integrate MediaCodec for decoding via Jni
> > wrappers since version 3.1. I began this work on FFmpeg 2.8.x and I choose
> > the NDK in order to achieve optimum performance.
>
> If you mean you used the NDK MediaCodec API, I'd suggest you use the same
> JNI wrappers as ffmpeg has already, for consistency. The overhead of a few
> JNI calls per encoded frame is generally negligible. If it, at a later time,
> is decided to drop support for older versions at some point, it should be
> straightforward to convert it to use the NDK MediaCodec API instead.
I agree with this, please use the MediaCodec wrapper for now. The
MediaCodec wrapper mimic the API of the NDK so if we decide to switch to
the NDK, it should be quite easy. Moreover, this work (switch to the NDK)
has already been done by Aman Gupta in one of his branches.
--
Matthieu B.
More information about the ffmpeg-devel
mailing list