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 94F0E48F58 for ; Mon, 1 Apr 2024 08:04:07 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D68CA68CCD7; Mon, 1 Apr 2024 11:04:03 +0300 (EEST) Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 57A2368C0C3 for ; Mon, 1 Apr 2024 11:03:57 +0300 (EEST) Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-415446af364so18243595e9.0 for ; Mon, 01 Apr 2024 01:03:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711958636; x=1712563436; 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=oTosoGRhMZfoLsDepuumUeHKqWmosuyBH8StgZtZASY=; b=Du4ym7MMs55hDEX9hu/vfX8YHpmn6nt8wxtMKJ6fHBbGe7cqU5UrZ4t2IXSuksbZB4 OvKOkClPGpgigJ2F939uWbccMXAkIIDpmpnHXaxtippTjxHgeOC68FU/PlOeNClbFltj Uy76K7Al7i6U4NSkahFFJhBx+LCFZ4LOaLG5GVzonYU1uNsvgMCk+1VMph6wKojWizpt vwbsVjkP3OnTHC3m+DAbXZbybGz0mMUW12+C1Vn5YwchhtCMNOzoK5iM1Y/JtAYMajvH mfX/a3pvDv+Kl6y7+TnrisdvjHoAEiTmMREUYENili8sxZS+UQvcLHzESFYG+7ZMgf7c eAzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711958636; x=1712563436; 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=oTosoGRhMZfoLsDepuumUeHKqWmosuyBH8StgZtZASY=; b=RcwrYp3So0EyXhujlhj8PHXTq18u9w4Sa+F9wN/QJa7qxJoOt+yYPG0HY+J82w4Uzx tbxkArfn2KkXLplQTmxClwHuRmjVXVYTXHC4IzGyawSVKFlLUAutlICpbSCnld3Y7GbD ZY2aDZzSiNNjsBCpDgEvNLjhoDQ1eRQ+je+UPp28WzOPip+n5xgullA1/f3W9z+/DHPO r1P9GO/h+uTGrcWDjVE9k+dCTPKl+VstKtTSZGCirV9D0d4ok1mjGNib9tC670Sxom5E 5HYiW/B3626eN0qu77sUijsX0v8Vz0Kzt3b18jVCwJwEaPlgoGrcrtcSf+PxeN6m6Y5H MaeQ== X-Gm-Message-State: AOJu0YxlGotvXypWpa2ARm6ez1YKHRB9EXC0z1IVcT5w3MMH2wnEqK6t ApaDdAY9cbJ931dFBECMl7w3K0COgAjxGu9IfdPFawVFEh+ZDSBehmipXd5t X-Google-Smtp-Source: AGHT+IFv3bgyjuiDANOd0bwXg++fg0NH781r1Lpe2oZlGxKi374HQnuQmRYfScHH233gq86pcCCn+w== X-Received: by 2002:a05:600c:35d1:b0:415:431d:7747 with SMTP id r17-20020a05600c35d100b00415431d7747mr9354428wmq.7.1711958636158; Mon, 01 Apr 2024 01:03:56 -0700 (PDT) Received: from kusa (2a01cb040b6872000000000000000afa.ipv6.abo.wanadoo.fr. [2a01:cb04:b68:7200::afa]) by smtp.gmail.com with ESMTPSA id o41-20020a05600c512900b004149536479esm14031703wms.12.2024.04.01.01.03.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 01:03:55 -0700 (PDT) Date: Mon, 1 Apr 2024 10:03:54 +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: <20240327130619.273711-2-leo.izen@gmail.com> 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 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. -- 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".