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

Michael Niedermayer michael at niedermayer.cc
Wed Feb 14 20:18:04 EET 2024


On Tue, Feb 13, 2024 at 11:50:09PM +0100, 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%)

this breaks build

 make
CC	libavutil/jni.o
libavutil/jni.c:68:5: error: no previous prototype for ‘av_jni_set_java_vm’ [-Werror=missing-prototypes]
 int av_jni_set_java_vm(void *vm, void *log_ctx)
     ^~~~~~~~~~~~~~~~~~
libavutil/jni.c:73:7: error: no previous prototype for ‘av_jni_get_java_vm’ [-Werror=missing-prototypes]
 void *av_jni_get_java_vm(void *log_ctx)
       ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
ffbuild/common.mak:81: recipe for target 'libavutil/jni.o' failed
make: *** [libavutil/jni.o] Error 1


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Complexity theory is the science of finding the exact solution to an
approximation. Benchmarking OTOH is finding an approximation of the exact
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20240214/57ddbc17/attachment.sig>


More information about the ffmpeg-devel mailing list