[FFmpeg-devel] [PATCH 1/7] avcodec: move ffjni to avutil/jniutils

Matthieu Bouron matthieu.bouron at gmail.com
Thu Feb 15 09:40:57 EET 2024


On Wed, Feb 14, 2024 at 11:31:21PM +0000, Mark Thompson wrote:
> On 13/02/2024 22:50, Matthieu Bouron wrote:
> > This will allow to use the jni utils in libavformat. This will be mostly useful
> > to add Android content-uri support.
> > 
> > This deprecates avcodec/jni.h functions in favor of the ones from avutil/jni.h.
> > ---
> >   doc/APIchanges                             |   6 +
> >   libavcodec/Makefile                        |   3 +-
> >   libavcodec/jni.c                           |  48 +----
> >   libavcodec/jni.h                           |   8 +
> >   libavcodec/mediacodec.c                    |   6 +-
> >   libavcodec/mediacodec_surface.c            |   6 +-
> >   libavcodec/mediacodec_wrapper.c            | 200 ++++++++++-----------
> >   libavcodec/mediacodecdec.c                 |   3 +-
> >   libavutil/Makefile                         |   4 +
> >   libavutil/jni.c                            |  78 ++++++++
> >   libavutil/jni.h                            |  46 +++++
> >   libavcodec/ffjni.c => libavutil/jniutils.c |  36 ++--
> >   libavcodec/ffjni.h => libavutil/jniutils.h |  26 ++-
> >   13 files changed, 283 insertions(+), 187 deletions(-)
> >   create mode 100644 libavutil/jni.c
> >   create mode 100644 libavutil/jni.h
> >   rename libavcodec/ffjni.c => libavutil/jniutils.c (88%)
> >   rename libavcodec/ffjni.h => libavutil/jniutils.h (84%)
> 
> Why?
> 
> libavformat already depends on libavcodec.

Since both libavformat  and libavcodec will use it, it seems more
logical to put the code in libavutil. It could also benefits
libavutil/hwcontext_mediacodec.

[...]


More information about the ffmpeg-devel mailing list