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 AA01C4A650 for ; Tue, 2 Apr 2024 12:55:28 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5E69E68BE7C; Tue, 2 Apr 2024 15:55:25 +0300 (EEST) Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 56C3568CB86 for ; Tue, 2 Apr 2024 15:55:19 +0300 (EEST) Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-415db53d905so5584905e9.2 for ; Tue, 02 Apr 2024 05:55:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712062518; x=1712667318; 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=uTcexXBr5cWztlSqFZOHtF4WsP7064lgTdxejIfJdIk=; b=kWzuJ1GnLJM+qfJwTR1LivSd67v684cHtF1TqRMCiWscmA4MQLh0Jowq33jal8k78f h/NIMGA6qFLdzp6sc373Y6QAzfz9oP8iHCOa3lBaYUYm8hE6cKKViaZkZDr/ZTuHLf6i AJx9iEVJi6OQKbYPkM1t/UYe26+L2QNqUM4WJv8JZ7tYOz3l4V5TpX5kY2KWX0py34lt cAPdNrExsUDdLPmhzwcp0QPi+bkN3xuJobTeNcoYJoZQJBqpYSYAhF4RMOmTmYNeX9hf 86IvTabaT+pWPVOi/iRsCNYTPNjUsGS0byiUL6kQ0Ou8QJmb1bPOatiSF922zmd1JROX 3ngA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712062518; x=1712667318; 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=uTcexXBr5cWztlSqFZOHtF4WsP7064lgTdxejIfJdIk=; b=vhvktlKAp8obMrKQ+bfQFhOY2Qns3Wt8omWlwsokGRcmK0Yh9alIeUeMU/a1P1jcxU gU1DGPdiCV2Q7XDcxBeJ9dTdAHZMIAx23is7g6P1eklhpVse0sLPQMGacHomVW0myGu5 4RFCOXPYEZazbzZONwvcKnplVmi1eauvzl6zT7YWt8EZacxCI2KUr+d6L5hWSU+AY7Y8 /EyBCAgAmDBawqh/0mRY0hGwSciGqfyaX67OxFsfd/u/1gKK7AzKIlW4LcxPouK/El0L pyVM6DDy6g3Wx1JX+8xsIJn9s6U9pZNBF6sMZhev0GDc0okzvTDSvZe2UbrZa5JPtDn1 IKkg== X-Gm-Message-State: AOJu0YzRpyDyHEuAc09LRv5w5vi18FPn/zVrGmGRAdRfvGJfGsuBX6WN pvEkn7T58NWRKHYUbNtj4AmXoEg/whB8M8vReHMubtxmO8tbpRWMgZxMwLCb X-Google-Smtp-Source: AGHT+IGZoe724dTFXLddjz7qtMl63bIPGr3aEueofjM1wh/Sw7BhAiifN/ID10DCFoRuQ5lbDFjInw== X-Received: by 2002:a05:600c:4917:b0:415:6986:57ea with SMTP id f23-20020a05600c491700b00415698657eamr3289796wmp.33.1712062518289; Tue, 02 Apr 2024 05:55:18 -0700 (PDT) Received: from kusa (2a01cb040b6872000000000000000afa.ipv6.abo.wanadoo.fr. [2a01:cb04:b68:7200::afa]) by smtp.gmail.com with ESMTPSA id by7-20020a056000098700b0033ec94c6277sm14186769wrb.115.2024.04.02.05.55.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 05:55:17 -0700 (PDT) Date: Tue, 2 Apr 2024 14:55:16 +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 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, -- 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".