1 diff --git a/cinelerra-5.1/Makefile.devel b/cinelerra-5.1/Makefile.devel
2 index a12d8f2b..9aac014a 100644
3 --- a/cinelerra-5.1/Makefile.devel
4 +++ b/cinelerra-5.1/Makefile.devel
5 @@ -4,7 +4,7 @@ TOPDIR := $(CURDIR)
7 export CFLAGS_ := $(CFLAGS)
9 -cpus:=$(shell grep -c "^proc" /proc/cpuinfo)
10 +cpus:=$(shell sysctl -n hw.ncpu)
11 jobs:=-j$(shell echo $$(($(cpus) + $(cpus)/2 +2)))
12 MAKEJ := $(MAKE) $(jobs)
14 diff --git a/cinelerra-5.1/cinelerra/Makefile b/cinelerra-5.1/cinelerra/Makefile
15 index 18590e3a..5eead290 100644
16 --- a/cinelerra-5.1/cinelerra/Makefile
17 +++ b/cinelerra-5.1/cinelerra/Makefile
18 @@ -395,6 +395,7 @@ LIBS += -lfontconfig -lfreetype
19 LIBS += -lavcodec -lavdevice -lavfilter -lavformat -lavresample -lavutil
20 LIBS += -lswresample -lswscale
21 LIBS += -lvpx -lwebp -lwebpmux
22 +LIBS += -lintl -liconv -lexecinfo
24 LIBS += $(if $(filter fftw,$(static_pkgs)), -lfftw3)
25 LIBS += $(if $(filter flac,$(static_pkgs)), -lFLAC)
26 @@ -414,7 +415,7 @@ LIBS += $(if $(filter x265,$(static_pkgs)), -lx265)
27 LIBS += $(if $(filter libvpx,$(static_pkgs)), -lvpx)
30 -LIBS += -lGL -lGLU -lGLX
33 ifneq ($(WANT_XFT),no)
35 @@ -476,6 +477,7 @@ LV2OBJS = \
39 + -I/usr/local/include \
43 @@ -523,15 +525,15 @@ all: $(OUTPUT) $(CUTADS) $(BDWRITE) $(LV2UI)
44 $(OUTPUT): $(OBJS) $(THEME_DATA) $(DCRAW) $(LIBRARIES)
45 $(LINKER) `cat $(OBJDIR)/objs`
46 $(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(OUTPUT) $(OUTPUT_G))
47 - $(if $(findstring -ggdb,$(CFLAGS)),,strip $(OUTPUT))
48 + #$(if $(findstring -ggdb,$(CFLAGS)),,strip $(OUTPUT))
49 ln -f -s ../bin/$(WANT_CIN) ci
51 ifneq ($(WANT_COMMERCIAL),no)
52 $(CUTADS): $(CUTOBJS) $(CUTLIBS) $(LIBRARIES)
53 - @echo g++ -o $@ $(CUTOBJS)
54 - @g++ $(CFLAGS) -pthread -o $@ $(CUTOBJS) $(CUTLIBS) $(LIBS)
55 + @echo $(CXX) -o $@ $(CUTOBJS)
56 + @$(CXX) $(CFLAGS) -pthread -o $@ $(CUTOBJS) $(CUTLIBS) $(LIBS)
57 $(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(CUTADS) $(CUTADS).debuginfo)
58 - $(if $(findstring -ggdb,$(CFLAGS)),,strip $(CUTADS))
59 + #$(if $(findstring -ggdb,$(CFLAGS)),,strip $(CUTADS))
62 cp -av $(OBJDIR)/cutads $(BINDIR)/.
63 @@ -540,18 +542,18 @@ install: install-cutads
66 $(BDWRITE): $(BDWOBJS) $(LIBRARIES)
67 - @echo g++ -o $@ $(BDWOBJS)
68 - @g++ $(CFLAGS) -pthread -o $@ $(BDWOBJS) $(LIBS)
69 + @echo $(CXX) -o $@ $(BDWOBJS)
70 + @$(CXX) $(CFLAGS) -pthread -o $@ $(BDWOBJS) $(LIBS)
71 $(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(BDWRITE) $(BDWRITE).debuginfo)
72 - $(if $(findstring -ggdb,$(CFLAGS)),,strip $(BDWRITE))
73 + #$(if $(findstring -ggdb,$(CFLAGS)),,strip $(BDWRITE))
76 cp -av $(OBJDIR)/bdwrite $(BINDIR)/.
77 install: install-bdwrite
79 ydiff: ydiff.C $(LIBRARIES)
80 - @echo g++ -o $@ ydiff.C
81 - @g++ $(CFLAGS) ydiff.C -o $@ $(LIBS)
82 + @echo $(CXX) -o $@ ydiff.C
83 + @$(CXX) $(CFLAGS) ydiff.C -o $@ $(LIBS)
87 @@ -585,7 +587,7 @@ $(OBJDIR)/lv2ui: $(LV2OBJS)
88 @echo $(CXX) \`cat $(OBJDIR)/c_flags\` $^ -o $@
89 @$(CXX) `cat $(OBJDIR)/c_flags` $^ -o $@ $(LIBS) $(GTK2_LIBS)
90 $(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(LV2UI) $(LV2UI).debuginfo)
91 - $(if $(findstring -ggdb,$(CFLAGS)),,strip $(LV2UI))
92 + #$(if $(findstring -ggdb,$(CFLAGS)),,strip $(LV2UI))
96 diff --git a/cinelerra-5.1/cinelerra/bdcreate.C b/cinelerra-5.1/cinelerra/bdcreate.C
97 index 27f728ad..9215090d 100644
98 --- a/cinelerra-5.1/cinelerra/bdcreate.C
99 +++ b/cinelerra-5.1/cinelerra/bdcreate.C
104 -#include <sys/stat.h>
105 -#include <sys/statfs.h>
106 +#include <sys/param.h>
107 +#include <sys/mount.h>
111 diff --git a/cinelerra-5.1/cinelerra/bdwrite.C b/cinelerra-5.1/cinelerra/bdwrite.C
112 index 6a2b4ca3..78cf9bef 100644
113 --- a/cinelerra-5.1/cinelerra/bdwrite.C
114 +++ b/cinelerra-5.1/cinelerra/bdwrite.C
120 +#include <sys/endian.h>
122 #include <sys/stat.h>
123 // work arounds (centos)
124 diff --git a/cinelerra-5.1/cinelerra/cutads.C b/cinelerra-5.1/cinelerra/cutads.C
125 index ac58d56a..f6690cf2 100644
126 --- a/cinelerra-5.1/cinelerra/cutads.C
127 +++ b/cinelerra-5.1/cinelerra/cutads.C
130 #define fail(s) do { printf("fail %s%s:%d\n",__func__,#s,__LINE__); return 1; } while(0)
132 -/* missing from system headers, no /usr/include <linux/ioprio.h>
133 - * IOPRIO_WHO_PROCESS, IOPRIO_CLASS_SHIFT, IOPRIO_CLASS_IDLE */
134 -enum { IOPRIO_CLASS_NONE, IOPRIO_CLASS_RT, IOPRIO_CLASS_BE, IOPRIO_CLASS_IDLE, };
135 -#define IO_CLASS(n) (((int)(n)) << 13)
136 -#define IO_WHO_PROCESS 1
137 -#include <sys/syscall.h>
138 -#include <asm/unistd.h>
140 // commercial edge detection:
141 // must have audio < min_audio
142 // and within +- check_margin seconds of low audio
143 @@ -55,11 +47,6 @@ class Video;
147 -static int ioprio_set(int which, int who, int ioprio)
149 - return syscall(SYS_ioprio_set, which, who, ioprio);
152 static inline int clip(int v, int mn, int mx)
154 return v<mn ? mn : v>mx ? mx : v;
155 @@ -617,7 +604,6 @@ class Scan
156 const char *asset_path;
157 static void set_priority(int pr, int io) {
158 setpriority(PRIO_PROCESS, 0, pr); // lowest cpu priority
159 - ioprio_set(IO_WHO_PROCESS, 0, IO_CLASS(io));
161 class low_priority { public:
162 low_priority() { set_priority(19, IOPRIO_CLASS_IDLE); }
163 diff --git a/cinelerra-5.1/cinelerra/dvdcreate.C b/cinelerra-5.1/cinelerra/dvdcreate.C
164 index 1014baf5..f38094e9 100644
165 --- a/cinelerra-5.1/cinelerra/dvdcreate.C
166 +++ b/cinelerra-5.1/cinelerra/dvdcreate.C
171 -#include <sys/stat.h>
172 -#include <sys/statfs.h>
173 +#include <sys/param.h>
174 +#include <sys/mount.h>
177 #define DVD_PAL_4x3 0
178 diff --git a/cinelerra-5.1/cinelerra/file.C b/cinelerra-5.1/cinelerra/file.C
179 index 03348e0a..552a140d 100644
180 --- a/cinelerra-5.1/cinelerra/file.C
181 +++ b/cinelerra-5.1/cinelerra/file.C
182 @@ -1584,7 +1584,10 @@ int File::record_fd()
183 void File::get_exe_path(char *result, char *bnp)
185 // Get executable path, basename
186 - int len = readlink("/proc/self/exe", result, BCTEXTLEN-1);
187 + char exe_path[BCTEXTLEN];
188 + sprintf(exe_path,"/proc/%d/file",getpid());
189 + int len = readlink(exe_path, result, BCTEXTLEN-1);
193 char *ptr = strrchr(result, '/');
194 diff --git a/cinelerra-5.1/cinelerra/indexfile.C b/cinelerra-5.1/cinelerra/indexfile.C
195 index 3d21d2af..f3064199 100644
196 --- a/cinelerra-5.1/cinelerra/indexfile.C
197 +++ b/cinelerra-5.1/cinelerra/indexfile.C
200 #include <sys/types.h>
201 #include <sys/stat.h>
202 -#include <linux/iso_fs.h>
203 +#include <isofs/cd9660/iso.h>
205 // check for isofs volume_id for dvd/cdrom
207 diff --git a/cinelerra-5.1/configure.ac b/cinelerra-5.1/configure.ac
208 index 94f9b382..4c4bee11 100644
209 --- a/cinelerra-5.1/configure.ac
210 +++ b/cinelerra-5.1/configure.ac
211 @@ -16,15 +16,26 @@ CFG_CFLAGS+=" -Wno-unused-result"
212 CFG_CFLAGS+=" -Wno-stringop-overflow"
213 CFG_CFLAGS+=" -Wno-format-truncation"
214 CFG_CFLAGS+=" -Wno-format-overflow"
215 +CFG_CFLAGS+=" -Wno-unknown-warning-option"
216 CFG_CFLAGS+=" -Wno-parentheses"
217 CFG_CFLAGS+=" -Wno-stringop-truncation"
218 +CFG_CFLAGS+=" -Wno-gnu-designator"
219 +CFG_CFLAGS+=" -Wno-missing-braces"
220 +CFG_CFLAGS+=" -Wno-overloaded-virtual"
221 +CFG_CFLAGS+=" -Wno-self-assign-field"
222 +CFG_CFLAGS+=" -Wno-sometimes-uninitialized"
223 +CFG_CFLAGS+=" -Wno-tautological-pointer-compare"
224 +CFG_CFLAGS+=" -Wno-unused-function"
225 +CFG_CFLAGS+=" -Wno-unused-private-field"
226 +CFG_CFLAGS+=" -Wno-infinite-recursion"
227 CFG_CFLAGS+=" -D__STDC_CONSTANT_MACROS"
228 CFG_CFLAGS+=" -D__STDC_LIMIT_MACROS"
229 CFG_CFLAGS+=" -DPNG_SKIP_SETJMP_CHECK=1"
230 CFG_CFLAGS+=" -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
231 -CFG_CFLAGS+=" -I/usr/include/freetype2"
232 -CFG_CFLAGS+=" -I/usr/include/uuid"
233 -CFG_CFLAGS+=" -I/usr/include/mjpegtools"
234 +CFG_CFLAGS+=" -I/usr/local/include"
235 +CFG_CFLAGS+=" -I/usr/local/include/freetype2 -I/usr/include/freetype2"
236 +CFG_CFLAGS+=" -I/usr/local/include/uuid -I/usr/include/uuid"
237 +CFG_CFLAGS+=" -I/usr/local/include/mjpegtools -I/usr/include/mjpegtools"
239 AC_DEFUN([CHECK_WITH], [
241 @@ -126,7 +137,7 @@ AC_SUBST(MAK_INSTALLS)
242 AC_SUBST(MAK_UNINSTALLS)
244 if test "x$WANT_JOBS" = "xauto"; then
245 - CPUS=`grep -c "^proc" /proc/cpuinfo`
246 + CPUS=`sysctl -n hw.ncpu`
247 WANT_JOBS=`expr $CPUS + $CPUS / 2 + 2`
250 diff --git a/cinelerra-5.1/db/tdb.h b/cinelerra-5.1/db/tdb.h
251 index 8ee88002..9a17091e 100644
252 --- a/cinelerra-5.1/db/tdb.h
253 +++ b/cinelerra-5.1/db/tdb.h
254 @@ -32,7 +32,7 @@ inline void operator delete[](void *t,size_t n) { free(t); }
263 diff --git a/cinelerra-5.1/guicast/bclistbox.h b/cinelerra-5.1/guicast/bclistbox.h
264 index f5994d53..c73169bb 100644
265 --- a/cinelerra-5.1/guicast/bclistbox.h
266 +++ b/cinelerra-5.1/guicast/bclistbox.h
267 @@ -185,7 +185,9 @@ public:
269 // take_focus - used by the suggestion box to keep it from taking focus from the
271 - int activate(int take_focus = 1);
272 + int activate() { return activate(1); }
273 + int activate(int take_focus);
275 int activate(int x, int y, int w=-1, int h=-1);
278 diff --git a/cinelerra-5.1/guicast/bcpan.h b/cinelerra-5.1/guicast/bcpan.h
279 index 40f5971f..73d47586 100644
280 --- a/cinelerra-5.1/guicast/bcpan.h
281 +++ b/cinelerra-5.1/guicast/bcpan.h
282 @@ -93,7 +93,8 @@ public:
285 static int rdtoxy(int &x, int &y, int a, int virtual_r);
286 - int activate(int popup_x = -1, int popup_y = -1);
287 + int activate(int popup_x, int popup_y);
288 + int activate() { return activate(-1,-1); }
292 diff --git a/cinelerra-5.1/guicast/bcresources.C b/cinelerra-5.1/guicast/bcresources.C
293 index e3400600..f201028c 100644
294 --- a/cinelerra-5.1/guicast/bcresources.C
295 +++ b/cinelerra-5.1/guicast/bcresources.C
300 +#include <sys/sysctl.h>
301 #include <X11/extensions/XShm.h>
302 #include <fontconfig/fontconfig.h>
303 #include <fontconfig/fcfreetype.h>
304 @@ -297,23 +298,12 @@ int BC_Resources::machine_cpus = 1;
306 int BC_Resources::get_machine_cpus()
309 - FILE *proc = fopen("/proc/cpuinfo", "r");
311 - char string[BCTEXTLEN], *cp;
312 - while(!feof(proc) && fgets(string, sizeof(string), proc) ) {
313 - if( !strncasecmp(string, "processor", 9) &&
314 - (cp = strchr(string, ':')) != 0 ) {
315 - int n = atol(cp+1) + 1;
316 - if( n > cpus ) cpus = n;
318 - else if( !strncasecmp(string, "cpus detected", 13) &&
319 - (cp = strchr(string, ':')) != 0 )
326 + size_t len = sizeof(ncpu);
329 + if( sysctl(mib, 2, &ncpu, &len, 0, 0) ) ncpu = 1;
333 void BC_Resources::new_vframes(int n, VFrame *vframes[], ...)
334 @@ -695,7 +685,7 @@ new_vframes(20,default_medium_7segment,
335 generic_button_margin = 15;
336 draw_clock_background=1;
343 @@ -1681,6 +1671,87 @@ BC_FontEntry *BC_Resources::find_fontentry(const char *displayname, int style,
349 + uint8_t *obfr, *out, *oend;
350 + uint8_t *ibfr, *inp, *iend;
352 + utf8conv(void *out, int olen, void *inp, int ilen) {
353 + this->obfr = this->out = (uint8_t*)out;
354 + this->oend = this->out + olen;
355 + this->ibfr = this->inp = (uint8_t*)inp;
356 + this->iend = this->inp + ilen;
358 + int cur() { return inp>=iend ? -1 : *inp; }
359 + int next() { return inp>=iend ? -1 : *inp++; }
360 + int next(int ch) { return out>=oend ? -1 : *out++ = ch; }
361 + int ilen() { return inp-ibfr; }
362 + int olen() { return out-obfr; }
364 + int wnext(unsigned int v);
368 +wnext(unsigned int v)
370 + if( v < 0x00000080 ) { next(v); return 1; }
371 + int n = v < 0x00000800 ? 2 : v < 0x00010000 ? 3 :
372 + v < 0x00200000 ? 4 : v < 0x04000000 ? 5 : 6;
373 + int m = (0xff00 >> n), i = n-1;
374 + next((v>>(6*i)) | m);
375 + while( --i >= 0 ) next(((v>>(6*i)) & 0x3f) | 0x80);
382 + int v = 0, n = 0, ch = next();
384 + switch( (ch=next()) ) {
385 + case 'n': return '\n';
386 + case 't': return '\t';
387 + case 'r': return '\r';
388 + case 'b': return '\b';
389 + case 'f': return '\f';
390 + case 'v': return '\v';
391 + case 'a': return '\a';
392 + case '0': case '1': case '2': case '3':
393 + case '4': case '5': case '6': case '7':
395 + for( int i=3; --i>0; v=v*8+ch, next() )
396 + if( (ch=cur()-'0') < 0 || ch >= 8 ) break;
398 + case 'x': n = 2; break;
399 + case 'u': n = 4; break;
400 + case 'U': n = 8; break;
401 + default: return ch;
403 + for( int i=n; --i>=0; v=v*16+ch, next() ) {
404 + if( (ch=cur()-'0')>=0 && ch<10 ) continue;
405 + if( (ch-='A'-'0'-10)>=10 && ch<16 ) continue;
406 + if( (ch-='a'-'A')<10 || ch>=16 ) break;
409 + else if( ch >= 0x80 ) {
410 + static const unsigned char byts[] = {
411 + 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 4, 5,
414 + n = i<0 ? 0 : byts[i/4];
415 + for( v=ch, i=n; --i>=0; v+=next() ) v <<= 6;
416 + static const unsigned int ofs[6] = {
417 + 0x00000000U, 0x00003080U, 0x000E2080U,
418 + 0x03C82080U, 0xFA082080U, 0x82082080U
428 size_t BC_Resources::encode(const char *from_enc, const char *to_enc,
429 char *input, int input_length, char *output, int output_length)
431 @@ -1688,10 +1759,12 @@ size_t BC_Resources::encode(const char *from_enc, const char *to_enc,
433 char *outbase = output;
435 - if(!from_enc || *from_enc == 0)
436 + if( !from_enc || *from_enc == 0 ||
437 + !strcmp(from_enc,"UTF8") || !strcmp(from_enc, "US-ASCII") )
440 - if(!to_enc || *to_enc == 0)
441 + if( !to_enc || *to_enc == 0 ||
442 + !strcmp(to_enc,"UTF8") || !strcmp(to_enc, "US-ASCII") )
446 @@ -1701,32 +1774,45 @@ size_t BC_Resources::encode(const char *from_enc, const char *to_enc,
448 if(strcmp(from_enc, to_enc) && inbytes)
450 - if((cd = iconv_open(to_enc, from_enc)) == (iconv_t)-1)
451 + if( !strcmp(from_enc, "UTF-8") && !strcmp(to_enc,"UTF32LE") ) {
452 + utf8conv uc(0,0, input,inbytes);
453 + uint32_t *op = (uint32_t *)output;
454 + uint32_t *ep = (uint32_t *)(output+output_length);
455 + for( int wch; op<ep && (wch=uc.wnext())>=0; *op++=wch );
456 + output = (char *)op;
457 + outbytes = (char*)ep - output;
459 + else if( !strcmp(from_enc, "UTF32LE") && !strcmp(to_enc,"UTF-8") ) {
460 + utf8conv uc(output,output_length, 0,0);
461 + uint32_t *ip = (uint32_t *)input;
462 + uint32_t *ep = (uint32_t *)(input+inbytes);
463 + for( ; ip<ep && uc.wnext(*ip)>=0; ++ip );
464 + output += uc.olen();
465 + outbytes = output_length-uc.olen();
467 + else if((cd = iconv_open(to_enc, from_enc)) == (iconv_t)-1)
469 printf(_("Conversion from %s to %s is not available\n"),
474 - outbytes = output_length - 1;
476 - iconv(cd, &input, &inbytes, &output, &outbytes);
479 - inbytes = output - outbase;
481 + outbytes = output_length - 1;
482 + iconv(cd, &input, &inbytes, &output, &outbytes);
488 memcpy(output, input, inbytes);
492 - for(int i = 0; i < 4; i++)
494 + if( outbytes > sizeof(uint32_t) )
495 + outbytes = sizeof(uint32_t);
496 + for(int i = 0; i < outbytes; i++)
498 - if(outbytes-- == 0)
502 + return output - outbase;
505 void BC_Resources::encode_to_utf8(char *buffer, int buflen)
506 diff --git a/cinelerra-5.1/guicast/bcsignals.C b/cinelerra-5.1/guicast/bcsignals.C
507 index ed50cfb1..f1b894ba 100644
508 --- a/cinelerra-5.1/guicast/bcsignals.C
509 +++ b/cinelerra-5.1/guicast/bcsignals.C
511 #include <sys/stat.h>
513 #include <sys/ioctl.h>
514 -#include <sys/prctl.h>
515 #include <sys/types.h>
517 +#define dirent64 dirent
518 +#define readdir64 readdir
520 BC_Signals* BC_Signals::global_signals = 0;
521 static int signal_done = 0;
523 @@ -279,18 +281,6 @@ static void handle_exit(int signum)
525 void BC_Signals::set_sighup_exit(int enable)
528 -// causes SIGHUP to be generated when parent dies
529 - signal(SIGHUP, handle_exit);
530 - prctl(PR_SET_PDEATHSIG, SIGHUP, 0,0,0);
531 -// prevents ^C from signalling child when attached to gdb
533 - if( isatty(0) ) ioctl(0, TIOCNOTTY, 0);
536 - signal(SIGHUP, signal_entry);
537 - prctl(PR_SET_PDEATHSIG, 0,0,0,0);
541 BC_Signals::BC_Signals()
542 @@ -383,11 +373,13 @@ const char* BC_Signals::sig_to_str(int number)
543 #include <sys/wait.h>
546 +#define SC_(r)sc_##r
558 @@ -473,26 +465,5 @@ static void handle_dump(int n, siginfo_t * info, void *sc)
561 if( fp != stdout ) fclose(fp);
562 - char cmd[1024], *cp = cmd;
563 - cp += sprintf(cp, "exec gdb /proc/%d/exe -p %d --batch --quiet "
564 - "-ex \"thread apply all info registers\" "
565 - "-ex \"thread apply all bt full\" "
566 - "-ex \"quit\"", pid, pid);
568 - cp += sprintf(cp," >> \"%s\"", fn);
569 - cp += sprintf(cp," 2>&1");
570 -//printf("handle_dump:: pid=%d, cmd='%s' fn='%s'\n",pid,cmd,fn);
573 - fprintf(stderr,"** can't start gdb, dump abondoned\n");
578 - fprintf(stderr,"** dump complete\n");
581 - char *const argv[4] = { (char*) "/bin/sh", (char*) "-c", cmd, 0 };
582 - execvp(argv[0], &argv[0]);
585 diff --git a/cinelerra-5.1/guicast/filesystem.C b/cinelerra-5.1/guicast/filesystem.C
586 index ebc2007d..9d6452cb 100644
587 --- a/cinelerra-5.1/guicast/filesystem.C
588 +++ b/cinelerra-5.1/guicast/filesystem.C
593 +#define dirent64 dirent
594 +#define readdir64 readdir
596 #include "filesystem.h"
598 diff --git a/cinelerra-5.1/guicast/thread.C b/cinelerra-5.1/guicast/thread.C
599 index dff53e61..321ab4fc 100644
600 --- a/cinelerra-5.1/guicast/thread.C
601 +++ b/cinelerra-5.1/guicast/thread.C
602 @@ -55,13 +55,6 @@ void* Thread::entrypoint(void *parameters)
603 pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
604 thread->cancel_enabled = false;
606 -// Set realtime here seince it doesn't work in start
607 - if( thread->realtime && getuid() == 0 ) {
608 - struct sched_param param = { sched_priority : 1 };
609 - if(pthread_setschedparam(thread->tid, SCHED_RR, ¶m) < 0)
610 - perror("Thread::entrypoint pthread_attr_setschedpolicy");
614 thread->finished = true;
615 if( !thread->synchronous ) {
616 diff --git a/cinelerra-5.1/guicast/thread.h b/cinelerra-5.1/guicast/thread.h
617 index 216ecd2b..8ebec237 100644
618 --- a/cinelerra-5.1/guicast/thread.h
619 +++ b/cinelerra-5.1/guicast/thread.h
622 #include <sys/syscall.h>
624 -static inline int gettid() { return syscall(SYS_gettid, 0, 0, 0); }
625 +static inline long gettid() { return (long)pthread_self(); }
627 // The thread does not autodelete by default.
628 // If autodelete is 1 the thread autodeletes.
629 diff --git a/cinelerra-5.1/plugins/Makefile b/cinelerra-5.1/plugins/Makefile
630 index 6ed357c7..56081181 100644
631 --- a/cinelerra-5.1/plugins/Makefile
632 +++ b/cinelerra-5.1/plugins/Makefile
633 @@ -31,7 +31,6 @@ DIRS = $(OPENCV_OBJS) \
641 @@ -161,6 +160,8 @@ DIRS = $(OPENCV_OBJS) \
648 PLUGIN_DIR = $(BINDIR)/plugins
649 DATA = $(PLUGIN_DIR)/fonts $(PLUGIN_DIR)/shapes
650 diff --git a/cinelerra-5.1/plugins/titler/titler.C b/cinelerra-5.1/plugins/titler/titler.C
651 index fefbbdb1..045e96d4 100644
652 --- a/cinelerra-5.1/plugins/titler/titler.C
653 +++ b/cinelerra-5.1/plugins/titler/titler.C
659 -#include <byteswap.h>
660 +#include <sys/endian.h>
662 #include <sys/stat.h>
663 #include <fontconfig/fontconfig.h>