From: Matthieu Bouron <matthieu.bouron@gmail.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Cc: Leo Izen <leo.izen@gmail.com>
Subject: Re: [FFmpeg-devel] [PATCH v2 1/1] avcodec, avformat/ffjni: fix duplicate JNI symbols
Date: Thu, 4 Apr 2024 21:58:30 +0200
Message-ID: <Zg8GZhajzbmUYK_b@kusa> (raw)
In-Reply-To: <ZgwANARxhduHPEKL@kusa>
On Tue, Apr 02, 2024 at 02:55:16PM +0200, Matthieu Bouron wrote:
> On Mon, Apr 01, 2024 at 10:03:54AM +0200, Matthieu Bouron wrote:
> > On Wed, Mar 27, 2024 at 09:06:19AM -0400, Leo Izen wrote:
> > > Use SHLIBOBJS and STLIBOBJS in the Makefiles for avcodec and avformat,
> > > and add a stub ffjni.c to libavformat, which allows the symbols to be
> > > duplicated for shared builds but not static builds.
> > >
> > > Signed-off-by: Leo Izen <leo.izen@gmail.com>
> > > ---
> > > libavcodec/Makefile | 1 +
> > > libavformat/Makefile | 1 +
> > > libavformat/ffjni.c | 23 +++++++++++++++++++++++
> > > libavformat/file.c | 2 +-
> > > 4 files changed, 26 insertions(+), 1 deletion(-)
> > > create mode 100644 libavformat/ffjni.c
> > >
> > > diff --git a/libavcodec/Makefile b/libavcodec/Makefile
> > > index 9ce6d445c1..113adb22d5 100644
> > > --- a/libavcodec/Makefile
> > > +++ b/libavcodec/Makefile
> > > @@ -1068,6 +1068,7 @@ STLIBOBJS-$(CONFIG_ISO_MEDIA) += mpegaudiotabs.o
> > > STLIBOBJS-$(CONFIG_FLV_MUXER) += mpeg4audio_sample_rates.o
> > > STLIBOBJS-$(CONFIG_HLS_DEMUXER) += ac3_channel_layout_tab.o
> > > STLIBOBJS-$(CONFIG_IMAGE_JPEGXL_PIPE_DEMUXER) += jpegxl_parse.o
> > > +STLIBOBJS-$(CONFIG_JNI) += ffjni.o
> > > STLIBOBJS-$(CONFIG_JPEGXL_ANIM_DEMUXER) += jpegxl_parse.o
> > > STLIBOBJS-$(CONFIG_MATROSKA_DEMUXER) += mpeg4audio_sample_rates.o
> > > STLIBOBJS-$(CONFIG_MOV_DEMUXER) += ac3_channel_layout_tab.o
> > > diff --git a/libavformat/Makefile b/libavformat/Makefile
> > > index 44aa485029..a89df7e9a3 100644
> > > --- a/libavformat/Makefile
> > > +++ b/libavformat/Makefile
> > > @@ -728,6 +728,7 @@ SHLIBOBJS-$(CONFIG_ISO_MEDIA) += mpegaudiotabs.o
> > > SHLIBOBJS-$(CONFIG_FLV_MUXER) += mpeg4audio_sample_rates.o
> > > SHLIBOBJS-$(CONFIG_HLS_DEMUXER) += ac3_channel_layout_tab.o
> > > SHLIBOBJS-$(CONFIG_IMAGE_JPEGXL_PIPE_DEMUXER) += jpegxl_parse.o
> > > +SHLIBOBJS-$(CONFIG_JNI) += ffjni.o
> > > SHLIBOBJS-$(CONFIG_JPEGXL_ANIM_DEMUXER) += jpegxl_parse.o
> > > SHLIBOBJS-$(CONFIG_MATROSKA_DEMUXER) += mpeg4audio_sample_rates.o
> > > SHLIBOBJS-$(CONFIG_MOV_DEMUXER) += ac3_channel_layout_tab.o
> > > diff --git a/libavformat/ffjni.c b/libavformat/ffjni.c
> > > new file mode 100644
> > > index 0000000000..2b1483cf42
> > > --- /dev/null
> > > +++ b/libavformat/ffjni.c
> > > @@ -0,0 +1,23 @@
> > > +/*
> > > + * JNI utility functions - included stub
> > > + *
> > > + * Copyright (c) 2024 Leo Izen <leo.izen@gmail.com>
> > > + *
> > > + * This file is part of FFmpeg.
> > > + *
> > > + * FFmpeg is free software; you can redistribute it and/or
> > > + * modify it under the terms of the GNU Lesser General Public
> > > + * License as published by the Free Software Foundation; either
> > > + * version 2.1 of the License, or (at your option) any later version.
> > > + *
> > > + * FFmpeg is distributed in the hope that it will be useful,
> > > + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> > > + * Lesser General Public License for more details.
> > > + *
> > > + * You should have received a copy of the GNU Lesser General Public
> > > + * License along with FFmpeg; if not, write to the Free Software
> > > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
> > > + */
> > > +
> > > +#include "libavcodec/ffjni.c"
> > > diff --git a/libavformat/file.c b/libavformat/file.c
> > > index 182995717a..1f853e0e17 100644
> > > --- a/libavformat/file.c
> > > +++ b/libavformat/file.c
> > > @@ -527,8 +527,8 @@ const URLProtocol ff_fd_protocol = {
> > >
> > > #if CONFIG_ANDROID_CONTENT_PROTOCOL
> > > #include <jni.h>
> > > +#include "libavcodec/ffjni.h"
> > > #include "libavcodec/jni.h"
> > > -#include "libavcodec/ffjni.c"
> > >
> > > typedef struct JFields {
> > > jclass uri_class;
> >
> > LGTM, thanks.
>
> Once the patch is applied. Can you also backport it to the 7.0 branch ?
>
> Thanks in advance,
Applied and backported.
--
Matthieu B.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
prev parent reply other threads:[~2024-04-04 19:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-27 13:06 [FFmpeg-devel] [PATCH v2 0/1] " Leo Izen
2024-03-27 13:06 ` [FFmpeg-devel] [PATCH v2 1/1] " Leo Izen
2024-04-01 8:03 ` Matthieu Bouron
2024-04-02 12:55 ` Matthieu Bouron
2024-04-04 19:58 ` Matthieu Bouron [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zg8GZhajzbmUYK_b@kusa \
--to=matthieu.bouron@gmail.com \
--cc=ffmpeg-devel@ffmpeg.org \
--cc=leo.izen@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git