Re: [FFmpeg-devel] [PATCH 1/7] avcodec: move ffjni to avutil/jniutils
On Wed, Feb 14, 2024 at 11:31:21PM +, 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. [...] ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 1/7] avcodec: move ffjni to avutil/jniutils
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. Thanks, - Mark ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 1/7] avcodec: move ffjni to avutil/jniutils
On Wed, Feb 14, 2024 at 07:18:04PM +0100, Michael Niedermayer wrote: > 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 > CClibavutil/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 Thanks, new patch attached. [...] >From 5b6a127143d8a3d111f7bef1a3e3bc9aab60a8ea Mon Sep 17 00:00:00 2001 From: Matthieu Bouron Date: Mon, 12 Feb 2024 18:33:41 +0100 Subject: [PATCH 1/7] avcodec: move ffjni to avutil/jniutils 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 | 49 + 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, 284 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%) diff --git a/doc/APIchanges b/doc/APIchanges index 221fea30c2..45611ea7ea 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -2,6 +2,12 @@ The last version increases of all libraries were on 2023-02-09 API changes, most recent first: +2024-02-xx - xx - lavu 58.39.100 - jni.h + Add av_jni_set_jvm() and av_jni_get_jvm(). + +2024-02-xx - xx - lavc 60.40.100 - jni.h + Deprecate av_jni_set_java_vm() and av_jni_get_java_vm(). + 2024-02-xx - xx - lavu 58.38.100 - channel_layout.h Add av_channel_layout_retype(). diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 470d7cb9b1..f8584d8dfd 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -117,7 +117,7 @@ OBJS-$(CONFIG_IIRFILTER) += iirfilter.o OBJS-$(CONFIG_INFLATE_WRAPPER) += zlib_wrapper.o OBJS-$(CONFIG_INTRAX8) += intrax8.o intrax8dsp.o msmpeg4data.o OBJS-$(CONFIG_IVIDSP) += ivi_dsp.o -OBJS-$(CONFIG_JNI) += ffjni.o jni.o +OBJS-$(CONFIG_JNI) += jni.o OBJS-$(CONFIG_JPEGTABLES) += jpegtables.o OBJS-$(CONFIG_LCMS2) += fflcms2.o OBJS-$(CONFIG_LLAUDDSP)+= lossless_audiodsp.o @@ -1269,7 +1269,6 @@ SKIPHEADERS-$(CONFIG_AMF) += amfenc.h SKIPHEADERS-$(CONFIG_D3D11VA) += d3d11va.h dxva2_internal.h SKIPHEADERS-$(CONFIG_D3D12VA) += d3d12va_decode.h SKIPHEADERS-$(CONFIG_DXVA2)+= dxva2.h dxva2_internal.h -SKIPHEADERS-$(CONFIG_JNI) += ffjni.h SKIPHEADERS-$(CONFIG_LCMS2)+= fflcms2.h SKIPHEADERS-$(CONFI
Re: [FFmpeg-devel] [PATCH 1/7] avcodec: move ffjni to avutil/jniutils
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 signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".