From: Good Guy Date: Thu, 18 Nov 2021 15:24:05 +0000 (-0700) Subject: even more Termux related mods by Andrew + MatN configure improvement X-Git-Tag: 2021-11~7 X-Git-Url: https://cinelerra-gg.org/git/?a=commitdiff_plain;h=964a629cd40e9cf5ca64e7ec8c5f630830e9d11b;p=goodguy%2Fcinelerra.git even more Termux related mods by Andrew + MatN configure improvement --- diff --git a/cinelerra-5.1/blds/termux.bld b/cinelerra-5.1/blds/termux.bld new file mode 100755 index 00000000..455e23ff --- /dev/null +++ b/cinelerra-5.1/blds/termux.bld @@ -0,0 +1,6 @@ +#!/bin/bash +# Produced, tested, and used by Andrew-R on an Android tablet +export FFMPEG_EXTRA_CFG="--disable-debug --disable-ffprobe --enable-libdav1d" +export EXTRA_LIBS="-ldav1d" +./configure --without-lv2 --without-vdpau --without-vaapi --without-ladspa-build \ + --without-nv --with-single-user --with-clang --without-gl --disable-dav1d diff --git a/cinelerra-5.1/cinelerra/Makefile b/cinelerra-5.1/cinelerra/Makefile index 81d1acee..3fa58be7 100644 --- a/cinelerra-5.1/cinelerra/Makefile +++ b/cinelerra-5.1/cinelerra/Makefile @@ -56,7 +56,6 @@ OBJS := $(OVERLAYS) \ $(OBJDIR)/assets.o \ $(OBJDIR)/atrack.o \ $(OBJDIR)/attachmentpoint.o \ - $(OBJDIR)/audio1394.o \ $(OBJDIR)/audioalsa.o \ $(OBJDIR)/audiodevice.o \ $(OBJDIR)/audiodvb.o \ @@ -70,8 +69,6 @@ OBJS := $(OVERLAYS) \ $(OBJDIR)/automation.o \ $(OBJDIR)/auto.o \ $(OBJDIR)/autos.o \ - $(OBJDIR)/avc1394control.o \ - $(OBJDIR)/avc1394transport.o \ $(OBJDIR)/awindowgui.o \ $(OBJDIR)/awindow.o \ $(OBJDIR)/batch.o \ @@ -112,8 +109,6 @@ OBJS := $(OVERLAYS) \ $(OBJDIR)/cwindowtool.o \ $(OBJDIR)/dcoffset.o \ $(OBJDIR)/deleteallindexes.o \ - $(OBJDIR)/device1394input.o \ - $(OBJDIR)/device1394output.o \ $(OBJDIR)/devicedvbinput.o \ $(OBJDIR)/devicev4l2base.o \ $(OBJDIR)/devicev4l2input.o \ @@ -170,8 +165,6 @@ OBJS := $(OVERLAYS) \ $(OBJDIR)/garbage.o \ $(OBJDIR)/gwindowgui.o \ $(OBJDIR)/gwindow.o \ - $(OBJDIR)/iec61883input.o \ - $(OBJDIR)/iec61883output.o \ $(OBJDIR)/indexable.o \ $(OBJDIR)/indexfile.o \ $(OBJDIR)/indexstate.o \ @@ -339,7 +332,6 @@ OBJS := $(OVERLAYS) \ $(OBJDIR)/undostack.o \ $(OBJDIR)/vattachmentpoint.o \ $(OBJDIR)/vautomation.o \ - $(OBJDIR)/vdevice1394.o \ $(OBJDIR)/vdevicebase.o \ $(OBJDIR)/vdevicedvb.o \ $(OBJDIR)/vdeviceprefs.o \ @@ -378,6 +370,18 @@ OBJS := $(OVERLAYS) \ $(OBJDIR)/zwindow.o \ $(OBJDIR)/zwindowgui.o \ +ifneq ($(WANT_FIREWIRE),no) +OBJS += \ + $(OBJDIR)/audio1394.o \ + $(OBJDIR)/avc1394control.o \ + $(OBJDIR)/avc1394transport.o \ + $(OBJDIR)/vdevice1394.o \ + $(OBJDIR)/device1394input.o \ + $(OBJDIR)/device1394output.o \ + $(OBJDIR)/iec61883input.o \ + $(OBJDIR)/iec61883output.o \ + +endif ifneq ($(WANT_LIBZMPEG),no) OBJS += \ $(OBJDIR)/audiompeg.o \ diff --git a/cinelerra-5.1/cinelerra/fileac3.C b/cinelerra-5.1/cinelerra/fileac3.C index c6a94161..04994227 100644 --- a/cinelerra-5.1/cinelerra/fileac3.C +++ b/cinelerra-5.1/cinelerra/fileac3.C @@ -18,7 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ - +#ifdef HAVE_LIBZMPEG #include #include #include @@ -421,3 +421,4 @@ int AC3ConfigAudioBitrate::handle_event() } #endif +#endif //libzmpeg diff --git a/cinelerra-5.1/configure.ac b/cinelerra-5.1/configure.ac index 941a00d6..996054f3 100644 --- a/cinelerra-5.1/configure.ac +++ b/cinelerra-5.1/configure.ac @@ -142,7 +142,8 @@ AC_SUBST(MAK_INSTALLS) AC_SUBST(MAK_UNINSTALLS) if test "x$WANT_JOBS" = "xauto"; then - CPUS=`grep -c "^proc" /proc/cpuinfo` +# CPUS=`grep -c "^proc" /proc/cpuinfo` + CPUS=nproc WANT_JOBS=`expr $CPUS + $CPUS / 2 + 2` fi diff --git a/cinelerra-5.1/libzmpeg3/bthread.h b/cinelerra-5.1/libzmpeg3/bthread.h new file mode 100644 index 00000000..57a0c492 --- /dev/null +++ b/cinelerra-5.1/libzmpeg3/bthread.h @@ -0,0 +1,31 @@ +/* BThread main header + Copyright (C) 2002 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +# define PTHREAD_CANCEL_ENABLE 0x00000010 +# define PTHREAD_CANCEL_DISABLE 0x00000000 + +# define PTHREAD_CANCEL_ASYNCHRONOUS 0x00000020 +# define PTHREAD_CANCEL_DEFERRED 0x00000000 + +#define PTHREAD_CANCELED ((void *) -1) + +int pthread_setcancelstate (int , int *); +int pthread_setcanceltype (int , int *); +void pthread_testcancel (void); +int pthread_cancel (pthread_t t); diff --git a/cinelerra-5.1/libzmpeg3/libzmpeg3.h b/cinelerra-5.1/libzmpeg3/libzmpeg3.h index 430ebb4d..8ea33b15 100644 --- a/cinelerra-5.1/libzmpeg3/libzmpeg3.h +++ b/cinelerra-5.1/libzmpeg3/libzmpeg3.h @@ -5,7 +5,9 @@ /* for quicktime build */ #define MAXFRAMESAMPLES 65536 #define ZDVB +#if defined(__i386__) || defined(__x86_64__) #define USE_FUTEX +#endif #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS diff --git a/cinelerra-5.1/libzmpeg3/zio.C b/cinelerra-5.1/libzmpeg3/zio.C index cb6ce15d..2f6f6c58 100644 --- a/cinelerra-5.1/libzmpeg3/zio.C +++ b/cinelerra-5.1/libzmpeg3/zio.C @@ -1,4 +1,7 @@ #include "libzmpeg3.h" +#if defined(__TERMUX__) +#include "bthread.h" +#endif #ifdef USE_FUTEX typedef zmpeg3_t::zloc_t zzloc_t;