From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 79ADA4A742 for ; Thu, 4 Apr 2024 19:58:49 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 599ED68D10C; Thu, 4 Apr 2024 22:58:47 +0300 (EEST) Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0891968CA93 for ; Thu, 4 Apr 2024 22:58:41 +0300 (EEST) Received: by mail-pg1-f180.google.com with SMTP id 41be03b00d2f7-5d8ddbac4fbso1145149a12.0 for ; Thu, 04 Apr 2024 12:58:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712260719; x=1712865519; darn=ffmpeg.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=8r9TUIPildwPWEvU3rb4Hhzdy862scMi/sv2QbApDVA=; b=fYidbf5xSfIEu4vxNZt2+EaRpORNOQR3bw5/puPu2WIIJgB117awAj4y35JZm8yuZs 8zRMlPrDVblz5P9M4ppoFwrd14FPV9hNiicZocGBtWsQhkSPxbjNwkez4QzpFMeNdw1Z 2TNwEnfmJznNmX324CxM2q6gcxBL91210uGtX4qExR77swE3dofiJVyG0OzOSDSe6DMi AOrFnGgSZEg7hW0WU+SD6ItmlOlOx6QW1X+gXsKgzManrtolDsKbANL7sKVM4eCz/IFB 4QffIju9VLyi1XLIx9n4LfV5K9dpsl+Rjx4LpSguv+hUemUd9kF5oqoJLtqU9J7X4CDg aUdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712260719; x=1712865519; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=8r9TUIPildwPWEvU3rb4Hhzdy862scMi/sv2QbApDVA=; b=BU+jN+ptvevm1rr5n3VLr+EDEoQBlZVL5o/pvb51BgqZ5i1hQckbIf3e24Hh8MRvl6 zSkterCto/B51FShftAay6x9KnIb2mr+gmJ/D6NNsJaP4LYV8yJccMJBWdJkZTMzLOC7 pA8ubw7iCrQIhfjYuv/Y3asAPWQ85kdk0lWap5Cyi+v7QO71maG4XR4TB/D6PUlnmh4P dkTGRZ2f+l0jh/gutxAkpfTh8kQRl+o0XazqM/hVvh3RtmkOLMrJTc+1+wPqYkygHTgg H2yB/J90nlJHwPu/edYxkwVqY2/FUvbkh3N2ePpdvflx4k646opROMCyUEzpkSZSV1a8 Rewg== X-Gm-Message-State: AOJu0YxQmuunO1WeqPEHfdImhXXREQf+lW7f8kTvPGCtBMmKGGBcs+Oy 4GmoS+FY7y/FaHX8kBXZ0XaqTU1MZSMWM01zzwlWKUTHszMCRNxKAsGmWifS X-Google-Smtp-Source: AGHT+IFTfRY87qlkRBBukcZE1o/1NvFIPRWTEvv/C3xgBnok++pv/f7GmDgztrVPbyw334gK1ga5eA== X-Received: by 2002:a05:6a21:1788:b0:1a7:3b4b:4153 with SMTP id nx8-20020a056a21178800b001a73b4b4153mr878239pzb.58.1712260719088; Thu, 04 Apr 2024 12:58:39 -0700 (PDT) Received: from kusa (2a01cb040b6872000000000000000afa.ipv6.abo.wanadoo.fr. [2a01:cb04:b68:7200::afa]) by smtp.gmail.com with ESMTPSA id a23-20020a62e217000000b006e71aec34a8sm19703pfi.167.2024.04.04.12.58.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 12:58:38 -0700 (PDT) Date: Thu, 4 Apr 2024 21:58:30 +0200 From: Matthieu Bouron To: FFmpeg development discussions and patches Message-ID: References: <20240327130619.273711-1-leo.izen@gmail.com> <20240327130619.273711-2-leo.izen@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH v2 1/1] avcodec, avformat/ffjni: fix duplicate JNI symbols X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Leo Izen Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: 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 > > > --- > > > 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 > > > + * > > > + * 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 > > > +#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".