even more Termux related mods by Andrew + MatN configure improvement
authorGood Guy <good1.2guy@gmail.com>
Thu, 18 Nov 2021 15:24:05 +0000 (08:24 -0700)
committerGood Guy <good1.2guy@gmail.com>
Thu, 18 Nov 2021 15:24:05 +0000 (08:24 -0700)
cinelerra-5.1/blds/termux.bld [new file with mode: 0755]
cinelerra-5.1/cinelerra/Makefile
cinelerra-5.1/cinelerra/fileac3.C
cinelerra-5.1/configure.ac
cinelerra-5.1/libzmpeg3/bthread.h [new file with mode: 0644]
cinelerra-5.1/libzmpeg3/libzmpeg3.h
cinelerra-5.1/libzmpeg3/zio.C

diff --git a/cinelerra-5.1/blds/termux.bld b/cinelerra-5.1/blds/termux.bld
new file mode 100755 (executable)
index 0000000..455e23f
--- /dev/null
@@ -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
index 81d1aceefd0027e05de04267e48fe738a7a2b6a2..3fa58be7ecb6dce9aa944df2daf60a7b4f2d2027 100644 (file)
@@ -56,7 +56,6 @@ OBJS := $(OVERLAYS) \
        $(OBJDIR)/assets.o \
        $(OBJDIR)/atrack.o \
        $(OBJDIR)/attachmentpoint.o \
        $(OBJDIR)/assets.o \
        $(OBJDIR)/atrack.o \
        $(OBJDIR)/attachmentpoint.o \
-       $(OBJDIR)/audio1394.o \
        $(OBJDIR)/audioalsa.o \
        $(OBJDIR)/audiodevice.o \
        $(OBJDIR)/audiodvb.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)/automation.o \
        $(OBJDIR)/auto.o \
        $(OBJDIR)/autos.o \
-       $(OBJDIR)/avc1394control.o \
-       $(OBJDIR)/avc1394transport.o \
        $(OBJDIR)/awindowgui.o \
        $(OBJDIR)/awindow.o \
        $(OBJDIR)/batch.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)/cwindowtool.o \
        $(OBJDIR)/dcoffset.o \
        $(OBJDIR)/deleteallindexes.o \
-       $(OBJDIR)/device1394input.o \
-       $(OBJDIR)/device1394output.o \
        $(OBJDIR)/devicedvbinput.o \
        $(OBJDIR)/devicev4l2base.o \
        $(OBJDIR)/devicev4l2input.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)/garbage.o \
        $(OBJDIR)/gwindowgui.o \
        $(OBJDIR)/gwindow.o \
-       $(OBJDIR)/iec61883input.o \
-       $(OBJDIR)/iec61883output.o \
        $(OBJDIR)/indexable.o \
        $(OBJDIR)/indexfile.o \
        $(OBJDIR)/indexstate.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)/undostack.o \
        $(OBJDIR)/vattachmentpoint.o \
        $(OBJDIR)/vautomation.o \
-       $(OBJDIR)/vdevice1394.o \
        $(OBJDIR)/vdevicebase.o \
        $(OBJDIR)/vdevicedvb.o \
        $(OBJDIR)/vdeviceprefs.o \
        $(OBJDIR)/vdevicebase.o \
        $(OBJDIR)/vdevicedvb.o \
        $(OBJDIR)/vdeviceprefs.o \
@@ -378,6 +370,18 @@ OBJS := $(OVERLAYS) \
        $(OBJDIR)/zwindow.o \
        $(OBJDIR)/zwindowgui.o \
 
        $(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 \
 ifneq ($(WANT_LIBZMPEG),no)
 OBJS += \
        $(OBJDIR)/audiompeg.o \
index c6a94161780871f935f497c8d35cb9e3b85accb8..0499422735a910fe70e178db926617eadfe69798 100644 (file)
@@ -18,7 +18,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  */
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  */
-
+#ifdef HAVE_LIBZMPEG
 #include <stdio.h>
 #include <stdint.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <stdint.h>
 #include <stdlib.h>
@@ -421,3 +421,4 @@ int AC3ConfigAudioBitrate::handle_event()
 }
 
 #endif
 }
 
 #endif
+#endif //libzmpeg
index 941a00d6ad9aa8e575d5fea63907d42dc2d3b385..996054f37991261d23604510ec99dc5dcae25f13 100644 (file)
@@ -142,7 +142,8 @@ AC_SUBST(MAK_INSTALLS)
 AC_SUBST(MAK_UNINSTALLS)
 
 if test "x$WANT_JOBS" = "xauto"; then
 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
 
   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 (file)
index 0000000..57a0c49
--- /dev/null
@@ -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);
index 430ebb4d79ed4b40cc80d415b72e7ecc797d0d8e..8ea33b1593828dd36141ee7bd9f8487cf713693c 100644 (file)
@@ -5,7 +5,9 @@
 /* for quicktime build */
 #define MAXFRAMESAMPLES 65536
 #define ZDVB
 /* for quicktime build */
 #define MAXFRAMESAMPLES 65536
 #define ZDVB
+#if defined(__i386__) || defined(__x86_64__)
 #define USE_FUTEX
 #define USE_FUTEX
+#endif
 
 #ifndef __STDC_LIMIT_MACROS
 #define __STDC_LIMIT_MACROS
 
 #ifndef __STDC_LIMIT_MACROS
 #define __STDC_LIMIT_MACROS
index cb6ce15de290b88e4bf1dd03f4c87a02d76f668c..2f6f6c583f3b3d0d07712cff1cb9d009de769a40 100644 (file)
@@ -1,4 +1,7 @@
 #include "libzmpeg3.h"
 #include "libzmpeg3.h"
+#if defined(__TERMUX__)
+#include "bthread.h"
+#endif
 
 #ifdef USE_FUTEX
 typedef zmpeg3_t::zloc_t zzloc_t;
 
 #ifdef USE_FUTEX
 typedef zmpeg3_t::zloc_t zzloc_t;