[Cin] Compiling Cingg on termux (Linux userspace for Android devices)
Andrew Randrianasulu
randrianasulu at gmail.com
Fri May 7 02:23:02 CEST 2021
Update:
Found few more problems, most dangerously-looking in guicast/
Fixed compilation of guicast/cinelerra object files by adding this patch
New_cin_termux-3.diff
And placing bthread.h in guicast
bthread.h from
https://github.com/tux-mind/libbthread/blob/master/bthread.h
Config:
$ ./configure --without-lv2 --without-vaapi --without-vdpau
--without-shuttle_usb --with-clang --enable-static-build --with-single-user
--without-shuttle --without-libzmpeg --without-fireware --without-dv
--without-dvb --without-openexr
Without-fireware somewhat does not work, need to fix global-config by hand
After fixing sh to bash in configure I still was forced to fix
global-config by adding there
+CFLAGS += -DNO_BTRACE
+CFLAGS += -DNO_GDB
+CFLAGS += -DNO_CTX
Probably must be default on non-x86?
I still can't build cin more fully due to space constrains.
On Thursday, May 6, 2021, Andrew Randrianasulu <randrianasulu at gmail.com>
wrote:
> Hello all!
> So, because I only have this tablet:
>
> $ termux-info Packages CPU architecture: arm
> Subscribed repositories: # sources.list deb
> https://ipfs.io/ipns/k51qzi5uqu5dg9vawh923wejqffxiu9bhqlze5f
> 508msk0h7ylpac27fdgaskx stable main
> # science-repo (sources.list.d/science.list) deb
> https://grimler.se/science-packages-24 science stable
> # game-repo (sources.list.d/game.list) deb https://grimler.se/game-packag
> es-24 games stable
> # x11-repo (sources.list.d/x11.list) deb https://termux.com/x11-package
> s-bin x11 main
> Updatable packages: All packages up to date
> Android version: 10
> Kernel build information: Linux localhost 4.14.141+ #1 SMP PREEMPT Mon
> Mar 29 18:09:45 CST 2021 armv8l
> Android Device manufacturer: HUAWEI
> Device model: KOB2-L09
>
> I tried to do my best and compile Cingg on *that*
> Of course my attempt failed So far, but at least buildsystem unpack
> sources correctly and start to build them.
>
> I installed termux from so-called AppGallery (but termux actually exist
> for F-droid, libre/oss repo independent from Google play), and updated it,
> after installing few utilites and editing source list (it uses apt, like
> debian, while you can call it as 'pkg search blah, pkg install meh')
> because since mid-2020 they changed their way Of hosting binaries
>
> More about termux :
>
> https://github.com/termux/termux-app
> Works on Android 7+, provides X via Xsdl or vnc
> Does not require root priviledges on device
>
> In theory you can try to install more compatible arm distro but this Will
> eat more space So I tried Hard way!
>
> Packages with development files have '-static' added to their name.
> So, I tried to call configure in Cingg source tree with suitable argument.
>
> generated by GNU Autoconf 2.71. Invocation command line was
>
> $ ./configure --with-single-user --with-thirdparty --enable-static-build
> --without-vaapi --without-vdpau --without-shuttle_usb --without-libzmpeg
> --without-lv2 --with-clang
>
> device uses clang-12 currently (!)
>
> I tried to update configure.ac based on result of 'autoscan' invokation,
> it makes configure phase longer but more verbose.
>
> But main show breaker was difference between /bin/sh and bin/bash (with
> long termux path)
> Default was sh and it was barking at += statements in configure.ac like
> those
>
> CFG_CFLAGS+=" -pthread -Wall"
> # misguided pedantic warnings
> # this is extra work, not a gain...
> CFG_CFLAGS+=" -Wno-unknown-warning-option"
> CFG_CFLAGS+=" -Wno-attributes"
> CFG_CFLAGS+=" -Wno-unused-result"
> CFG_CFLAGS+=" -Wno-stringop-overflow"
> CFG_CFLAGS+=" -Wno-format-truncation"
> CFG_CFLAGS+=" -Wno-format-overflow"
> CFG_CFLAGS+=" -Wno-parentheses"
> CFG_CFLAGS+=" -Wno-stringop-truncation"
> CFG_CFLAGS+=" -D__STDC_CONSTANT_MACROS"
> CFG_CFLAGS+=" -D__STDC_LIMIT_MACROS"
>
> And as result configure was half-broken, failed to make thirdparty.. :/
>
> But by changing configure's first line manually to
>
> #! /data/data/com.termux/files/usr/bin/bash
>
> I overcome this error!
>
> Of course with less than 700 mb free out of 16 gb flash 'disk' (I have few
> huge navigator apps and Android was weighting 9 gb from very start!) build
> in thirdparty failed, and guicast/cinelerra dirs had their own problems
> related to missing shared mem support (!) and other problems but at least
> it started
>
> See my hacks attached
>
> Be aware about limited number of write cycles when it comes to flash
> memory! Big compiles can degrade internal storage prety quickly, I am afraid
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20210507/092bc1fc/attachment-0001.htm>
-------------- next part --------------
diff --git a/cinelerra-5.1/cinelerra/Makefile b/cinelerra-5.1/cinelerra/Makefile
index 81d1acee..b3d519ad 100644
--- a/cinelerra-5.1/cinelerra/Makefile
+++ b/cinelerra-5.1/cinelerra/Makefile
@@ -396,7 +396,7 @@ OBJS += \
endif
ifneq ($(WANT_CIN_3RDPARTY),no)
OBJS += \
- $(OBJDIR)/fileac3.o \
+# $(OBJDIR)/fileac3.o \
endif
diff --git a/cinelerra-5.1/cinelerra/ffmpeg.C b/cinelerra-5.1/cinelerra/ffmpeg.C
index df39763c..c32ae50e 100644
--- a/cinelerra-5.1/cinelerra/ffmpeg.C
+++ b/cinelerra-5.1/cinelerra/ffmpeg.C
@@ -29,7 +29,7 @@
#include "ffmpeg.h"
#include "indexfile.h"
#include "interlacemodes.h"
-#include "libdv.h"
+//#include "libdv.h"
#include "libmjpeg.h"
#include "mainerror.h"
#include "mwindow.h"
diff --git a/cinelerra-5.1/cinelerra/fileffmpeg.C b/cinelerra-5.1/cinelerra/fileffmpeg.C
index a71d692a..853e5839 100644
--- a/cinelerra-5.1/cinelerra/fileffmpeg.C
+++ b/cinelerra-5.1/cinelerra/fileffmpeg.C
@@ -159,7 +159,7 @@ void FFMpegPixelFormat::update_formats()
pixfmts.remove_all_objects();
char video_codec[BCSTRLEN]; video_codec[0] = 0;
const char *vcodec = vid_config->asset->vcodec;
- AVCodec *av_codec = !FFMPEG::get_codec(video_codec, "video", vcodec) ?
+ const AVCodec *av_codec = !FFMPEG::get_codec(video_codec, "video", vcodec) ?
avcodec_find_encoder_by_name(video_codec) : 0;
const AVPixelFormat *pix_fmts = av_codec ? av_codec->pix_fmts : 0;
if( pix_fmts ) {
@@ -190,7 +190,7 @@ void FFMpegSampleFormat::update_formats()
samplefmts.remove_all_objects();
char audio_codec[BCSTRLEN]; audio_codec[0] = 0;
const char *acodec = aud_config->asset->acodec;
- AVCodec *av_codec = !FFMPEG::get_codec(audio_codec, "audio", acodec) ?
+ const AVCodec *av_codec = !FFMPEG::get_codec(audio_codec, "audio", acodec) ?
avcodec_find_encoder_by_name(audio_codec) : 0;
const AVSampleFormat *sample_fmts = av_codec ? av_codec->sample_fmts : 0;
if( sample_fmts ) {
@@ -345,7 +345,7 @@ int FileFFMPEG::open_file(int rd, int wr)
asset->aspect_ratio = ff->ff_aspect_ratio(0);
if (!asset->interlace_mode) asset->interlace_mode = ff->ff_interlace(0);
if ( ff->ff_video_frames(0) > 1 ) {
-// ff->video_probe(1);
+ ff->video_probe(1);
if (!asset->interlace_mode && (ff->interlace_from_codec) ) asset->interlace_mode = ff->video_probe(1);
}
if( !asset->layers ) asset->layers = video_layers;
@@ -1844,7 +1844,7 @@ int FFOptionsViewAudio::handle_event()
const char *name = asset->acodec;
char audio_format[BCSTRLEN]; audio_format[0] = 0;
char audio_codec[BCSTRLEN]; audio_codec[0] = 0;
- AVCodec *codec = !ret &&
+ const AVCodec *codec = !ret &&
!FFMPEG::get_format(audio_format, "audio", name) &&
!FFMPEG::get_codec(audio_codec, "audio", name) ?
avcodec_find_encoder_by_name(audio_codec) : 0;
@@ -1882,7 +1882,7 @@ int FFOptionsViewVideo::handle_event()
const char *name = asset->vcodec;
char video_format[BCSTRLEN]; video_format[0] = 0;
char video_codec[BCSTRLEN]; video_codec[0] = 0;
- AVCodec *codec = !ret &&
+ const AVCodec *codec = !ret &&
!FFMPEG::get_format(video_format, "video", name) &&
!FFMPEG::get_codec(video_codec, "video", name) ?
avcodec_find_encoder_by_name(video_codec) : 0;
diff --git a/cinelerra-5.1/cinelerra/record.C b/cinelerra-5.1/cinelerra/record.C
index ad293f7b..17a75302 100644
--- a/cinelerra-5.1/cinelerra/record.C
+++ b/cinelerra-5.1/cinelerra/record.C
@@ -46,7 +46,7 @@
#include "keys.h"
#include "language.h"
#include "localsession.h"
-#include "libdv.h"
+//#include "libdv.h"
#include "libmjpeg.h"
#include "libzmpeg3.h"
#include "mainmenu.h"
@@ -217,7 +217,7 @@ int Record::load_defaults()
break;
case CAPTURE_FIREWIRE:
case CAPTURE_IEC61883:
- vcodec = CODEC_TAG_DVSD;
+ //vcodec = CODEC_TAG_DVSD;
break;
}
if( vcodec )
diff --git a/cinelerra-5.1/configure.ac b/cinelerra-5.1/configure.ac
index ceddac2a..f28120c1 100644
--- a/cinelerra-5.1/configure.ac
+++ b/cinelerra-5.1/configure.ac
@@ -1,11 +1,11 @@
-AC_PREREQ([2.69])
-AC_INIT([cinelerra], [5.1], [mail at lists.cinelerra-gg.org])
+AC_PREREQ([2.71])
+AC_INIT([cinelerra],[5.1],[mail at lists.cinelerra-gg.org])
AM_INIT_AUTOMAKE([foreign])
AM_PROG_AS
-AC_LANG_CPLUSPLUS
-AC_LANG_C
+AC_LANG([C++])
+AC_LANG([C])
AC_PROG_CXX
CFG_CFLAGS+=" -fno-omit-frame-pointer -fno-math-errno -fno-signed-zeros"
@@ -24,14 +24,15 @@ CFG_CFLAGS+=" -D__STDC_CONSTANT_MACROS"
CFG_CFLAGS+=" -D__STDC_LIMIT_MACROS"
CFG_CFLAGS+=" -DPNG_SKIP_SETJMP_CHECK=1"
CFG_CFLAGS+=" -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
-CFG_CFLAGS+=" -I/usr/include -I/usr/local/include"
+# CFG_CFLAGS+=" -I/usr/include -I/usr/local/include"
+CFG_CFLAGS+=" -I/data/data/com.termux/files/usr/include/freetype2"
CFG_CFLAGS+=" -I/usr/include/freetype2 -I/usr/local/include/freetype2"
-CFG_CFLAGS+=" -I/usr/include/uuid -I/usr/local/include/uuid"
+CFG_CFLAGS+=" -I/data/data/com.termux/files/usr/include/uuid -I/usr/local/include/uuid"
CFG_CFLAGS+=" -I/usr/include/mjpegtools -I/usr/local/include/mjpegtools"
AC_DEFUN([CHECK_WITH], [
AC_ARG_WITH([$1],
- AC_HELP_STRING([--with-[$1]], [$2 ($4)]),
+ AS_HELP_STRING([--with-[$1]],[$2 ($4)]),
[WANT_$3=$withval], [WANT_$3='$4'])
AC_SUBST([WANT_$3])
])
@@ -64,6 +65,45 @@ CHECK_WITH([nv],[nvenc/nvdec ffnvcodec api],[NV],[yes])
CHECK_WITH([cuda],[nv cuda plugins],[CUDA],[auto])
CHECK_WITH([clang],[use clang instead of gcc/g++],[CLANG],[no])
+# Checks for header files.
+AC_PATH_X
+AC_CHECK_HEADERS([arpa/inet.h fcntl.h fenv.h inttypes.h libintl.h malloc.h mntent.h netdb.h netinet/in.h stdint.h strings.h sys/file.h sys/ioctl.h sys/socket.h sys/statfs.h sys/time.h unistd.h utime.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_CHECK_HEADER_STDBOOL
+AC_C_INLINE
+AC_TYPE_INT16_T
+AC_TYPE_INT32_T
+AC_TYPE_INT64_T
+AC_TYPE_INT8_T
+AC_TYPE_OFF_T
+AC_TYPE_PID_T
+AC_TYPE_SIZE_T
+AC_TYPE_SSIZE_T
+AC_CHECK_MEMBERS([struct stat.st_blksize])
+AC_STRUCT_ST_BLOCKS
+AC_CHECK_MEMBERS([struct stat.st_rdev])
+AC_TYPE_UINT16_T
+AC_TYPE_UINT32_T
+AC_TYPE_UINT64_T
+AC_TYPE_UINT8_T
+
+# Checks for library functions.
+AC_FUNC_ALLOCA
+AC_FUNC_ERROR_AT_LINE
+AC_FUNC_FORK
+AC_FUNC_FSEEKO
+AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
+AC_FUNC_MALLOC
+AC_FUNC_MKTIME
+AC_FUNC_MMAP
+AC_FUNC_REALLOC
+AC_FUNC_STRERROR_R
+AC_FUNC_STRNLEN
+AC_FUNC_STRTOD
+AC_CHECK_FUNCS([atexit bzero dup2 endpwent floor ftruncate getcwd gethostbyname gettimeofday inet_ntoa localtime_r memmove memset mkdir mkfifo modf munmap nl_langinfo pow putenv realpath rint rmdir select setenv setlocale socket sqrt strcasecmp strchr strdup strerror strncasecmp strrchr strstr strtol strtoul tzset uname utime])
+
+
if test "x$WANT_LV2" != "xno"; then
GTK2_LIBS=`pkg-config --libs gtk+-2.0`
AC_CHECK_LIB([m], [gtk_init], [HAVE_gtk=yes], [HAVE_gtk=no], [$GTK2_LIBS])
@@ -153,7 +193,7 @@ inc_$1="$4"
AC_DEFUN([PKG_3RD],[
AC_ARG_ENABLE([$1],
- AC_HELP_STRING([--enable-$1],[build $1 ($2)]),
+ AS_HELP_STRING([--enable-$1],[build $1 ($2)]),
[PKG_$1=$enableval], [PKG_$1=$2])
PKG_DEF([$1],[$3],[$4],[$5])
])
@@ -432,7 +472,7 @@ AC_SUBST(STATIC_PKGS)
AC_DEFUN([CHECK_ENABLE], [
AC_ARG_ENABLE([$1],
- AC_HELP_STRING([--enable-[$1]], [$3 ([$4])]),
+ AS_HELP_STRING([--enable-[$1]],[$3 ([$4])]),
[WANT_$2=$enableval], [WANT_$2=[$4]])
])
@@ -615,7 +655,7 @@ AC_DEFUN([CHECK_WANT], [
RESULT=yes
# WANT_$1
AC_ARG_WITH(m4_tolower([$1]),
- AC_HELP_STRING([m4_join([-],[--with],m4_tolower([$1]))], [$3] (auto)),
+ AS_HELP_STRING([m4_join([-],[--with],m4_tolower([$1]))],[$3 (auto)]),
[WANT_$1=$withval],[WANT_$1=$2])
m4_quote($4)
if test "x$WANT_$1" = "xauto" ; then
@@ -821,14 +861,14 @@ HAVE_ilmbase=no \
OBJDIR=`uname -m`
AC_SUBST(OBJDIR)
-echo "AC_HELP_STRING([Reason],[Package])"
-echo "AC_HELP_STRING([------],[-------])"
+echo "AS_HELP_STRING([Reason],[Package])"
+echo "AS_HELP_STRING([------],[-------])"
AC_DEFUN([PKG_DISABLED],[
PKG_$1="no"
BUILD_$1=0
AC_SUBST(BUILD_$1)
- echo "AC_HELP_STRING([disabled],[$1])"
+ echo "AS_HELP_STRING([disabled],[$1])"
])
AC_DEFUN([PKG_SHARED],[
PKG_$1="shared"
@@ -843,7 +883,7 @@ AC_DEFUN([PKG_STATIC],[
BUILD_$1=1
AC_SUBST(BUILD_$1)
STATIC_BLDS+=" [$1]"
- echo "AC_HELP_STRING([$2],[$1])"
+ echo "AS_HELP_STRING([$2],[$1])"
fi
])
@@ -937,11 +977,11 @@ fi
AC_SUBST(STATIC_BLDS)
for f in $SHARED_LIBS; do
- echo "AC_HELP_STRING([shared],[$f])"
+ echo "AS_HELP_STRING([shared],[$f])"
done
AC_SUBST(SHARED_LIBS)
for f in $SYSTEM_LIBS; do
- echo "AC_HELP_STRING([system],[$f])"
+ echo "AS_HELP_STRING([system],[$f])"
done
AC_SUBST(SYSTEM_LIBS)
diff --git a/cinelerra-5.1/db/tdb.h b/cinelerra-5.1/db/tdb.h
index 8ee88002..d3f0a51a 100644
--- a/cinelerra-5.1/db/tdb.h
+++ b/cinelerra-5.1/db/tdb.h
@@ -223,32 +223,32 @@ public:
pageId id;
int offset;
};
-
+#if 1
static void zincr(volatile int &v) { /* atomic(++v) */
- asm ( " lock incl %1\n" : "+m" (v) :: );
+ //asm ( " lock incl %1\n" : "+m" (v) :: );
}
static void zdecr(volatile int &v) { /* atomic(--v) */
- asm ( " lock decl %1\n" : "+m" (v) :: );
+ //asm ( " lock decl %1\n" : "+m" (v) :: );
}
static char tdecr(volatile int &v) {
char ret; /* ret = atomic(--loc >= 0 ? 1 : 0) */
- asm ( " lock decl %1\n setge %0\n" : "=r" (ret), "+m" (v) :: );
+ //asm ( " lock decl %1\n setge %0\n" : "=r" (ret), "+m" (v) :: );
return ret;
}
static char tincr(volatile int &v) {
char ret; /* ret = atomic(++loc > 0 ? 1 : 0) */
- asm ( " lock incl %1\n setg %0\n" : "=r" (ret), "+m" (v) :: );
+ //asm ( " lock incl %1\n setg %0\n" : "=r" (ret), "+m" (v) :: );
return ret;
}
static int zcmpxchg(int old, int val, volatile int &v) {
int ret = old;
- asm volatile( " lock\n cmpxchgl %2,%1\n"
- : "+a" (ret), "+m" (v) : "r" (val) : "memory" );
+ // asm volatile( " lock\n cmpxchgl %2,%1\n"
+ // : "+a" (ret), "+m" (v) : "r" (val) : "memory" );
return ret;
}
static int zxchg(int val, volatile int &v) {
- asm volatile( " xchgl %0,%1\n"
- : "+r" (val), "+m" (v) :: "memory" );
+ //asm volatile( " xchgl %0,%1\n"
+ // : "+r" (val), "+m" (v) :: "memory" );
return val;
}
static int zadd(int n, volatile int &v) {
@@ -258,8 +258,9 @@ public:
return val;
}
static void zmfence() {
- asm volatile ( " mfence\n" ::: "memory" );
+ //asm volatile ( " mfence\n" ::: "memory" );
}
+#endif // asm
class zlock_t;
class zblock_t;
diff --git a/cinelerra-5.1/guicast/Makefile b/cinelerra-5.1/guicast/Makefile
index cf189dea..762e7ea8 100644
--- a/cinelerra-5.1/guicast/Makefile
+++ b/cinelerra-5.1/guicast/Makefile
@@ -12,6 +12,16 @@ ifeq ($(OBJDIR), amd64)
BOOTSTRAPFLAGS := -DBOOTSTRAP="\"objcopy -B i386 -I binary -O elf64-x86-64\""
endif
+ifeq ($(OBJDIR), armv8l)
+BOOTSTRAPFLAGS := -DBOOTSTRAP="\"objcopy -B arm -I binary -O elf32-littlearm\""
+endif
+
+
+
+
+
+
+
$(shell mkdir -p $(OBJDIR) )
OBJS = \
diff --git a/cinelerra-5.1/guicast/filesystem.C b/cinelerra-5.1/guicast/filesystem.C
index 6017f6ea..f45b562e 100644
--- a/cinelerra-5.1/guicast/filesystem.C
+++ b/cinelerra-5.1/guicast/filesystem.C
@@ -536,7 +536,7 @@ int FileSystem::parse_tildas(char *new_dir)
new_user[j] = new_dir[i];
}
new_user[j] = 0;
-
+#if 0
setpwent();
while( (pw = getpwent()) != 0 )
{
@@ -550,6 +550,7 @@ int FileSystem::parse_tildas(char *new_dir)
}
}
endpwent();
+#endif
return 0;
}
}
diff --git a/cinelerra-5.1/guicast/thread.C b/cinelerra-5.1/guicast/thread.C
index 50b52a47..e5874c7f 100644
--- a/cinelerra-5.1/guicast/thread.C
+++ b/cinelerra-5.1/guicast/thread.C
@@ -28,6 +28,7 @@
#include <string.h>
#include <typeinfo>
#include "thread.h"
+#include "bthread.h"
Thread::Thread(int synchronous, int realtime, int autodelete)
@@ -102,7 +103,7 @@ void Thread::start()
perror("Thread::start pthread_attr_setschedparam");
}
else {
- if(pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED) < 0)
+ //if(pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED) < 0)
perror("Thread::start pthread_attr_setinheritsched");
}
diff --git a/cinelerra-5.1/guicast/thread.h b/cinelerra-5.1/guicast/thread.h
index 79f3e713..bec2509d 100644
--- a/cinelerra-5.1/guicast/thread.h
+++ b/cinelerra-5.1/guicast/thread.h
@@ -29,13 +29,15 @@
#ifndef NO_TID
#include <sys/syscall.h>
+#if defined(__GLIBC__)
// glibc >= 2.30 provides gettid() in unistd
#if !defined(__GLIBC_PREREQ) || !__GLIBC_PREREQ(2, 30)
static inline int gettid() { return syscall(SYS_gettid, 0, 0, 0); }
#endif
#else
-static inline long gettid() { return (long)pthread_self(); }
+//static inline long gettid() { return (long)pthread_self(); }
#endif
+#endif // GLIBC
// The thread does not autodelete by default.
// If autodelete is 1 the thread autodeletes.
diff --git a/cinelerra-5.1/guicast/vframe.C b/cinelerra-5.1/guicast/vframe.C
index af0e52a8..44d7f97e 100644
--- a/cinelerra-5.1/guicast/vframe.C
+++ b/cinelerra-5.1/guicast/vframe.C
@@ -334,7 +334,7 @@ if( memory_type != VFrame::SHARED )
shmid = -1;
break;
- case VFrame::SHMGET:
+ case VFrame::SHM_GET:
if(data)
shmdt(data);
data = 0;
@@ -510,7 +510,7 @@ int VFrame::allocate_data(unsigned char *data, int shmid,
this->v_offset = v_offset;
}
else if( shmid >= 0 ) {
- memory_type = VFrame::SHMGET;
+ memory_type = VFrame::SHM_GET;
this->data = (unsigned char*)shmat(shmid, NULL, 0);
if( this->data == (unsigned char*)-1 ) {
printf("VFrame::allocate_data %d could not attach"
@@ -593,7 +593,7 @@ void VFrame::set_memory(unsigned char *data,
else
if(shmid >= 0)
{
- memory_type = VFrame::SHMGET;
+ memory_type = VFrame::SHM_GET;
this->data = (unsigned char*)shmat(shmid, NULL, 0);
this->shmid = shmid;
}
@@ -635,7 +635,7 @@ void VFrame::set_compressed_memory(unsigned char *data,
else
if(shmid >= 0)
{
- memory_type = VFrame::SHMGET;
+ memory_type = VFrame::SHM_GET;
this->data = (unsigned char*)shmat(shmid, NULL, 0);
this->shmid = shmid;
}
@@ -713,7 +713,7 @@ UNBUFFER(data);
else
free(data);
}
- else if( memory_type == VFrame::SHMGET ) {
+ else if( memory_type == VFrame::SHM_GET ) {
if( data ) shmdt(data);
}
diff --git a/cinelerra-5.1/guicast/vframe.h b/cinelerra-5.1/guicast/vframe.h
index 589fce1c..dbaf9fba 100644
--- a/cinelerra-5.1/guicast/vframe.h
+++ b/cinelerra-5.1/guicast/vframe.h
@@ -31,6 +31,8 @@
#include "bccmodels.h"
#include "vframe.inc"
+#include <sys/shm.h>
+
// Maximum number of prev or next effects to be pushed onto the stacks.
#define MAX_STACK_ELEMENTS 255
#define SHM_MIN_SIZE 2048
@@ -417,7 +419,7 @@ private:
{
PRIVATE,
SHARED,
- SHMGET
+ SHM_GET
};
// Data pointer is pointing to someone else's buffer.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cingg_CFG
Type: application/octet-stream
Size: 514 bytes
Desc: not available
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20210507/092bc1fc/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bthread.h
Type: text/x-chdr
Size: 1285 bytes
Desc: not available
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20210507/092bc1fc/attachment-0001.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Termux_global-config
Type: application/octet-stream
Size: 14334 bytes
Desc: not available
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20210507/092bc1fc/attachment-0003.obj>
More information about the Cin
mailing list