1 diff --git a/cinelerra-5.1/Makefile.devel b/cinelerra-5.1/Makefile.devel
2 index a12d8f2b..f892f648 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..a60c71d1 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 @@ -476,6 +477,7 @@ LV2OBJS = \
30 + -I/usr/local/include \
34 @@ -523,15 +525,15 @@ all: $(OUTPUT) $(CUTADS) $(BDWRITE) $(LV2UI)
35 $(OUTPUT): $(OBJS) $(THEME_DATA) $(DCRAW) $(LIBRARIES)
36 $(LINKER) `cat $(OBJDIR)/objs`
37 $(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(OUTPUT) $(OUTPUT_G))
38 - $(if $(findstring -ggdb,$(CFLAGS)),,strip $(OUTPUT))
39 + #$(if $(findstring -ggdb,$(CFLAGS)),,strip $(OUTPUT))
40 ln -f -s ../bin/$(WANT_CIN) ci
42 ifneq ($(WANT_COMMERCIAL),no)
43 $(CUTADS): $(CUTOBJS) $(CUTLIBS) $(LIBRARIES)
44 - @echo g++ -o $@ $(CUTOBJS)
45 - @g++ $(CFLAGS) -pthread -o $@ $(CUTOBJS) $(CUTLIBS) $(LIBS)
46 + @echo $(CXX) -o $@ $(CUTOBJS)
47 + @$(CXX) $(CFLAGS) -pthread -o $@ $(CUTOBJS) $(CUTLIBS) $(LIBS)
48 $(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(CUTADS) $(CUTADS).debuginfo)
49 - $(if $(findstring -ggdb,$(CFLAGS)),,strip $(CUTADS))
50 + #$(if $(findstring -ggdb,$(CFLAGS)),,strip $(CUTADS))
53 cp -av $(OBJDIR)/cutads $(BINDIR)/.
54 @@ -540,18 +542,18 @@ install: install-cutads
57 $(BDWRITE): $(BDWOBJS) $(LIBRARIES)
58 - @echo g++ -o $@ $(BDWOBJS)
59 - @g++ $(CFLAGS) -pthread -o $@ $(BDWOBJS) $(LIBS)
60 + @echo $(CXX) -o $@ $(BDWOBJS)
61 + @$(CXX) $(CFLAGS) -pthread -o $@ $(BDWOBJS) $(LIBS)
62 $(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(BDWRITE) $(BDWRITE).debuginfo)
63 - $(if $(findstring -ggdb,$(CFLAGS)),,strip $(BDWRITE))
64 + #$(if $(findstring -ggdb,$(CFLAGS)),,strip $(BDWRITE))
67 cp -av $(OBJDIR)/bdwrite $(BINDIR)/.
68 install: install-bdwrite
70 ydiff: ydiff.C $(LIBRARIES)
71 - @echo g++ -o $@ ydiff.C
72 - @g++ $(CFLAGS) ydiff.C -o $@ $(LIBS)
73 + @echo $(CXX) -o $@ ydiff.C
74 + @$(CXX) $(CFLAGS) ydiff.C -o $@ $(LIBS)
78 @@ -585,7 +587,7 @@ $(OBJDIR)/lv2ui: $(LV2OBJS)
79 @echo $(CXX) \`cat $(OBJDIR)/c_flags\` $^ -o $@
80 @$(CXX) `cat $(OBJDIR)/c_flags` $^ -o $@ $(LIBS) $(GTK2_LIBS)
81 $(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(LV2UI) $(LV2UI).debuginfo)
82 - $(if $(findstring -ggdb,$(CFLAGS)),,strip $(LV2UI))
83 + #$(if $(findstring -ggdb,$(CFLAGS)),,strip $(LV2UI))
87 diff --git a/cinelerra-5.1/cinelerra/bdcreate.C b/cinelerra-5.1/cinelerra/bdcreate.C
88 index 27f728ad..9215090d 100644
89 --- a/cinelerra-5.1/cinelerra/bdcreate.C
90 +++ b/cinelerra-5.1/cinelerra/bdcreate.C
95 -#include <sys/stat.h>
96 -#include <sys/statfs.h>
97 +#include <sys/param.h>
98 +#include <sys/mount.h>
102 diff --git a/cinelerra-5.1/cinelerra/bdwrite.C b/cinelerra-5.1/cinelerra/bdwrite.C
103 index 6a2b4ca3..78cf9bef 100644
104 --- a/cinelerra-5.1/cinelerra/bdwrite.C
105 +++ b/cinelerra-5.1/cinelerra/bdwrite.C
111 +#include <sys/endian.h>
113 #include <sys/stat.h>
114 // work arounds (centos)
115 diff --git a/cinelerra-5.1/cinelerra/cutads.C b/cinelerra-5.1/cinelerra/cutads.C
116 index ac58d56a..f6690cf2 100644
117 --- a/cinelerra-5.1/cinelerra/cutads.C
118 +++ b/cinelerra-5.1/cinelerra/cutads.C
121 #define fail(s) do { printf("fail %s%s:%d\n",__func__,#s,__LINE__); return 1; } while(0)
123 -/* missing from system headers, no /usr/include <linux/ioprio.h>
124 - * IOPRIO_WHO_PROCESS, IOPRIO_CLASS_SHIFT, IOPRIO_CLASS_IDLE */
125 -enum { IOPRIO_CLASS_NONE, IOPRIO_CLASS_RT, IOPRIO_CLASS_BE, IOPRIO_CLASS_IDLE, };
126 -#define IO_CLASS(n) (((int)(n)) << 13)
127 -#define IO_WHO_PROCESS 1
128 -#include <sys/syscall.h>
129 -#include <asm/unistd.h>
131 // commercial edge detection:
132 // must have audio < min_audio
133 // and within +- check_margin seconds of low audio
134 @@ -55,11 +47,6 @@ class Video;
138 -static int ioprio_set(int which, int who, int ioprio)
140 - return syscall(SYS_ioprio_set, which, who, ioprio);
143 static inline int clip(int v, int mn, int mx)
145 return v<mn ? mn : v>mx ? mx : v;
146 @@ -617,7 +604,6 @@ class Scan
147 const char *asset_path;
148 static void set_priority(int pr, int io) {
149 setpriority(PRIO_PROCESS, 0, pr); // lowest cpu priority
150 - ioprio_set(IO_WHO_PROCESS, 0, IO_CLASS(io));
152 class low_priority { public:
153 low_priority() { set_priority(19, IOPRIO_CLASS_IDLE); }
154 diff --git a/cinelerra-5.1/cinelerra/dvdcreate.C b/cinelerra-5.1/cinelerra/dvdcreate.C
155 index 1014baf5..f38094e9 100644
156 --- a/cinelerra-5.1/cinelerra/dvdcreate.C
157 +++ b/cinelerra-5.1/cinelerra/dvdcreate.C
162 -#include <sys/stat.h>
163 -#include <sys/statfs.h>
164 +#include <sys/param.h>
165 +#include <sys/mount.h>
168 #define DVD_PAL_4x3 0
169 diff --git a/cinelerra-5.1/cinelerra/file.C b/cinelerra-5.1/cinelerra/file.C
170 index 03348e0a..552a140d 100644
171 --- a/cinelerra-5.1/cinelerra/file.C
172 +++ b/cinelerra-5.1/cinelerra/file.C
173 @@ -1584,7 +1584,10 @@ int File::record_fd()
174 void File::get_exe_path(char *result, char *bnp)
176 // Get executable path, basename
177 - int len = readlink("/proc/self/exe", result, BCTEXTLEN-1);
178 + char exe_path[BCTEXTLEN];
179 + sprintf(exe_path,"/proc/%d/file",getpid());
180 + int len = readlink(exe_path, result, BCTEXTLEN-1);
184 char *ptr = strrchr(result, '/');
185 diff --git a/cinelerra-5.1/cinelerra/indexfile.C b/cinelerra-5.1/cinelerra/indexfile.C
186 index 3d21d2af..f3064199 100644
187 --- a/cinelerra-5.1/cinelerra/indexfile.C
188 +++ b/cinelerra-5.1/cinelerra/indexfile.C
191 #include <sys/types.h>
192 #include <sys/stat.h>
193 -#include <linux/iso_fs.h>
194 +#include <isofs/cd9660/iso.h>
196 // check for isofs volume_id for dvd/cdrom
198 diff --git a/cinelerra-5.1/configure.ac b/cinelerra-5.1/configure.ac
199 index 6fba32bb..ccdb683b 100644
200 --- a/cinelerra-5.1/configure.ac
201 +++ b/cinelerra-5.1/configure.ac
202 @@ -16,15 +16,26 @@ CFG_CFLAGS+=" -Wno-unused-result"
203 CFG_CFLAGS+=" -Wno-stringop-overflow"
204 CFG_CFLAGS+=" -Wno-format-truncation"
205 CFG_CFLAGS+=" -Wno-format-overflow"
206 +CFG_CFLAGS+=" -Wno-unknown-warning-option"
207 CFG_CFLAGS+=" -Wno-parentheses"
208 CFG_CFLAGS+=" -Wno-stringop-truncation"
209 +CFG_CFLAGS+=" -Wno-gnu-designator"
210 +CFG_CFLAGS+=" -Wno-missing-braces"
211 +CFG_CFLAGS+=" -Wno-overloaded-virtual"
212 +CFG_CFLAGS+=" -Wno-self-assign-field"
213 +CFG_CFLAGS+=" -Wno-sometimes-uninitialized"
214 +CFG_CFLAGS+=" -Wno-tautological-pointer-compare"
215 +CFG_CFLAGS+=" -Wno-unused-function"
216 +CFG_CFLAGS+=" -Wno-unused-private-field"
217 +CFG_CFLAGS+=" -Wno-infinite-recursion"
218 CFG_CFLAGS+=" -D__STDC_CONSTANT_MACROS"
219 CFG_CFLAGS+=" -D__STDC_LIMIT_MACROS"
220 CFG_CFLAGS+=" -DPNG_SKIP_SETJMP_CHECK=1"
221 CFG_CFLAGS+=" -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
222 -CFG_CFLAGS+=" -I/usr/include/freetype2"
223 -CFG_CFLAGS+=" -I/usr/include/uuid"
224 -CFG_CFLAGS+=" -I/usr/include/mjpegtools"
225 +CFG_CFLAGS+=" -I/usr/local/include"
226 +CFG_CFLAGS+=" -I/usr/local/include/freetype2 -I/usr/include/freetype2"
227 +CFG_CFLAGS+=" -I/usr/local/include/uuid -I/usr/include/uuid"
228 +CFG_CFLAGS+=" -I/usr/local/include/mjpegtools -I/usr/include/mjpegtools"
230 AC_DEFUN([CHECK_WITH], [
232 @@ -126,7 +137,7 @@ AC_SUBST(MAK_INSTALLS)
233 AC_SUBST(MAK_UNINSTALLS)
235 if test "x$WANT_JOBS" = "xauto"; then
236 - CPUS=`grep -c "^proc" /proc/cpuinfo`
237 + CPUS=`sysctl -n hw.ncpu`
238 WANT_JOBS=`expr $CPUS + $CPUS / 2 + 2`
241 diff --git a/cinelerra-5.1/db/tdb.h b/cinelerra-5.1/db/tdb.h
242 index 8ee88002..9a17091e 100644
243 --- a/cinelerra-5.1/db/tdb.h
244 +++ b/cinelerra-5.1/db/tdb.h
245 @@ -32,7 +32,7 @@ inline void operator delete[](void *t,size_t n) { free(t); }
254 diff --git a/cinelerra-5.1/guicast/bclistbox.h b/cinelerra-5.1/guicast/bclistbox.h
255 index f5994d53..c73169bb 100644
256 --- a/cinelerra-5.1/guicast/bclistbox.h
257 +++ b/cinelerra-5.1/guicast/bclistbox.h
258 @@ -185,7 +185,9 @@ public:
260 // take_focus - used by the suggestion box to keep it from taking focus from the
262 - int activate(int take_focus = 1);
263 + int activate() { return activate(1); }
264 + int activate(int take_focus);
266 int activate(int x, int y, int w=-1, int h=-1);
269 diff --git a/cinelerra-5.1/guicast/bcpan.h b/cinelerra-5.1/guicast/bcpan.h
270 index 40f5971f..73d47586 100644
271 --- a/cinelerra-5.1/guicast/bcpan.h
272 +++ b/cinelerra-5.1/guicast/bcpan.h
273 @@ -93,7 +93,8 @@ public:
276 static int rdtoxy(int &x, int &y, int a, int virtual_r);
277 - int activate(int popup_x = -1, int popup_y = -1);
278 + int activate(int popup_x, int popup_y);
279 + int activate() { return activate(-1,-1); }
283 diff --git a/cinelerra-5.1/guicast/bcresources.C b/cinelerra-5.1/guicast/bcresources.C
284 index e3400600..b32d0a6f 100644
285 --- a/cinelerra-5.1/guicast/bcresources.C
286 +++ b/cinelerra-5.1/guicast/bcresources.C
291 +#include <sys/sysctl.h>
292 #include <X11/extensions/XShm.h>
293 #include <fontconfig/fontconfig.h>
294 #include <fontconfig/fcfreetype.h>
295 @@ -297,23 +298,12 @@ int BC_Resources::machine_cpus = 1;
297 int BC_Resources::get_machine_cpus()
300 - FILE *proc = fopen("/proc/cpuinfo", "r");
302 - char string[BCTEXTLEN], *cp;
303 - while(!feof(proc) && fgets(string, sizeof(string), proc) ) {
304 - if( !strncasecmp(string, "processor", 9) &&
305 - (cp = strchr(string, ':')) != 0 ) {
306 - int n = atol(cp+1) + 1;
307 - if( n > cpus ) cpus = n;
309 - else if( !strncasecmp(string, "cpus detected", 13) &&
310 - (cp = strchr(string, ':')) != 0 )
317 + size_t len = sizeof(ncpu);
320 + if( sysctl(mib, 2, &ncpu, &len, 0, 0) ) ncpu = 1;
324 void BC_Resources::new_vframes(int n, VFrame *vframes[], ...)
325 @@ -695,7 +685,7 @@ new_vframes(20,default_medium_7segment,
326 generic_button_margin = 15;
327 draw_clock_background=1;
334 @@ -1681,6 +1671,87 @@ BC_FontEntry *BC_Resources::find_fontentry(const char *displayname, int style,
340 + uint8_t *obfr, *out, *oend;
341 + uint8_t *ibfr, *inp, *iend;
343 + utf8conv(void *out, int olen, void *inp, int ilen) {
344 + this->obfr = this->out = (uint8_t*)out;
345 + this->oend = this->out + olen;
346 + this->ibfr = this->inp = (uint8_t*)inp;
347 + this->iend = this->inp + ilen;
349 + int cur() { return inp>=iend ? -1 : *inp; }
350 + int next() { return inp>=iend ? -1 : *inp++; }
351 + int next(int ch) { return out>=oend ? -1 : *out++ = ch; }
352 + int ilen() { return inp-ibfr; }
353 + int olen() { return out-obfr; }
355 + int wnext(unsigned int v);
359 +wnext(unsigned int v)
361 + if( v < 0x00000080 ) { next(v); return 1; }
362 + int n = v < 0x00000800 ? 2 : v < 0x00010000 ? 3 :
363 + v < 0x00200000 ? 4 : v < 0x04000000 ? 5 : 6;
364 + int m = (0xff00 >> n), i = n-1;
365 + next((v>>(6*i)) | m);
366 + while( --i >= 0 ) next(((v>>(6*i)) & 0x3f) | 0x80);
373 + int v = 0, n = 0, ch = next();
375 + switch( (ch=next()) ) {
376 + case 'n': return '\n';
377 + case 't': return '\t';
378 + case 'r': return '\r';
379 + case 'b': return '\b';
380 + case 'f': return '\f';
381 + case 'v': return '\v';
382 + case 'a': return '\a';
383 + case '0': case '1': case '2': case '3':
384 + case '4': case '5': case '6': case '7':
386 + for( int i=3; --i>0; v=v*8+ch, next() )
387 + if( (ch=cur()-'0') < 0 || ch >= 8 ) break;
389 + case 'x': n = 2; break;
390 + case 'u': n = 4; break;
391 + case 'U': n = 8; break;
392 + default: return ch;
394 + for( int i=n; --i>=0; v=v*16+ch, next() ) {
395 + if( (ch=cur()-'0')>=0 && ch<10 ) continue;
396 + if( (ch-='A'-'0'-10)>=10 && ch<16 ) continue;
397 + if( (ch-='a'-'A')<10 || ch>=16 ) break;
400 + else if( ch >= 0x80 ) {
401 + static const unsigned char byts[] = {
402 + 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 4, 5,
405 + n = i<0 ? 0 : byts[i/4];
406 + for( v=ch, i=n; --i>=0; v+=next() ) v <<= 6;
407 + static const unsigned int ofs[6] = {
408 + 0x00000000U, 0x00003080U, 0x000E2080U,
409 + 0x03C82080U, 0xFA082080U, 0x82082080U
419 size_t BC_Resources::encode(const char *from_enc, const char *to_enc,
420 char *input, int input_length, char *output, int output_length)
422 @@ -1688,10 +1759,12 @@ size_t BC_Resources::encode(const char *from_enc, const char *to_enc,
424 char *outbase = output;
426 - if(!from_enc || *from_enc == 0)
427 + if( !from_enc || *from_enc == 0 ||
428 + !strcmp(from_enc,"UTF8") || !strcmp(from_enc, "US-ASCII") )
431 - if(!to_enc || *to_enc == 0)
432 + if( !to_enc || *to_enc == 0 ||
433 + !strcmp(to_enc,"UTF8") || !strcmp(to_enc, "US-ASCII") )
437 @@ -1701,32 +1774,45 @@ size_t BC_Resources::encode(const char *from_enc, const char *to_enc,
439 if(strcmp(from_enc, to_enc) && inbytes)
441 - if((cd = iconv_open(to_enc, from_enc)) == (iconv_t)-1)
442 + if( !strcmp(from_enc, "UTF-8") && !strcmp(to_enc,"UTF32LE") ) {
443 + utf8conv uc(0,0, input,inbytes);
444 + uint32_t *op = (uint32_t *)output;
445 + uint32_t *ep = (uint32_t *)(output+output_length);
446 + for( int wch; op<ep && (wch=uc.wnext())>=0; *op++=wch );
447 + output = (char *)op;
448 + outbytes = (char*)ep - output;
450 + else if( !strcmp(from_enc, "UTF32LE") && !strcmp(to_enc,"UTF-8") ) {
451 + utf8conv uc(output,output_length, 0,0);
452 + uint32_t *ip = (uint32_t *)input;
453 + uint32_t *ep = (uint32_t *)(input+inbytes);
454 + for( ; ip<ep && uc.wnext(*ip)>=0; ++ip );
455 + output += uc.olen();
456 + outbytes = output_length-uc.olen();
458 + else if((cd = iconv_open(to_enc, from_enc)) == (iconv_t)-1)
460 printf(_("Conversion from %s to %s is not available\n"),
465 - outbytes = output_length - 1;
467 - iconv(cd, &input, &inbytes, &output, &outbytes);
470 - inbytes = output - outbase;
472 + outbytes = output_length - 1;
473 + iconv(cd, &input, &inbytes, &output, &outbytes);
479 memcpy(output, input, inbytes);
483 - for(int i = 0; i < 4; i++)
485 + if( outbytes > sizeof(uint32_t) )
486 + outbytes = sizeof(uint32_t);
487 + for(int i = 0; i < outbytes; i++)
489 - if(outbytes-- == 0)
493 + return output - outbase;
496 void BC_Resources::encode_to_utf8(char *buffer, int buflen)
497 diff --git a/cinelerra-5.1/guicast/bcsignals.C b/cinelerra-5.1/guicast/bcsignals.C
498 index ed50cfb1..f1b894ba 100644
499 --- a/cinelerra-5.1/guicast/bcsignals.C
500 +++ b/cinelerra-5.1/guicast/bcsignals.C
502 #include <sys/stat.h>
504 #include <sys/ioctl.h>
505 -#include <sys/prctl.h>
506 #include <sys/types.h>
508 +#define dirent64 dirent
509 +#define readdir64 readdir
511 BC_Signals* BC_Signals::global_signals = 0;
512 static int signal_done = 0;
514 @@ -279,18 +281,6 @@ static void handle_exit(int signum)
516 void BC_Signals::set_sighup_exit(int enable)
519 -// causes SIGHUP to be generated when parent dies
520 - signal(SIGHUP, handle_exit);
521 - prctl(PR_SET_PDEATHSIG, SIGHUP, 0,0,0);
522 -// prevents ^C from signalling child when attached to gdb
524 - if( isatty(0) ) ioctl(0, TIOCNOTTY, 0);
527 - signal(SIGHUP, signal_entry);
528 - prctl(PR_SET_PDEATHSIG, 0,0,0,0);
532 BC_Signals::BC_Signals()
533 @@ -383,11 +373,13 @@ const char* BC_Signals::sig_to_str(int number)
534 #include <sys/wait.h>
537 +#define SC_(r)sc_##r
549 @@ -473,26 +465,5 @@ static void handle_dump(int n, siginfo_t * info, void *sc)
552 if( fp != stdout ) fclose(fp);
553 - char cmd[1024], *cp = cmd;
554 - cp += sprintf(cp, "exec gdb /proc/%d/exe -p %d --batch --quiet "
555 - "-ex \"thread apply all info registers\" "
556 - "-ex \"thread apply all bt full\" "
557 - "-ex \"quit\"", pid, pid);
559 - cp += sprintf(cp," >> \"%s\"", fn);
560 - cp += sprintf(cp," 2>&1");
561 -//printf("handle_dump:: pid=%d, cmd='%s' fn='%s'\n",pid,cmd,fn);
564 - fprintf(stderr,"** can't start gdb, dump abondoned\n");
569 - fprintf(stderr,"** dump complete\n");
572 - char *const argv[4] = { (char*) "/bin/sh", (char*) "-c", cmd, 0 };
573 - execvp(argv[0], &argv[0]);
576 diff --git a/cinelerra-5.1/guicast/filesystem.C b/cinelerra-5.1/guicast/filesystem.C
577 index ebc2007d..9d6452cb 100644
578 --- a/cinelerra-5.1/guicast/filesystem.C
579 +++ b/cinelerra-5.1/guicast/filesystem.C
584 +#define dirent64 dirent
585 +#define readdir64 readdir
587 #include "filesystem.h"
589 diff --git a/cinelerra-5.1/guicast/thread.C b/cinelerra-5.1/guicast/thread.C
590 index dff53e61..321ab4fc 100644
591 --- a/cinelerra-5.1/guicast/thread.C
592 +++ b/cinelerra-5.1/guicast/thread.C
593 @@ -55,13 +55,6 @@ void* Thread::entrypoint(void *parameters)
594 pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
595 thread->cancel_enabled = false;
597 -// Set realtime here seince it doesn't work in start
598 - if( thread->realtime && getuid() == 0 ) {
599 - struct sched_param param = { sched_priority : 1 };
600 - if(pthread_setschedparam(thread->tid, SCHED_RR, ¶m) < 0)
601 - perror("Thread::entrypoint pthread_attr_setschedpolicy");
605 thread->finished = true;
606 if( !thread->synchronous ) {
607 diff --git a/cinelerra-5.1/guicast/thread.h b/cinelerra-5.1/guicast/thread.h
608 index 216ecd2b..8ebec237 100644
609 --- a/cinelerra-5.1/guicast/thread.h
610 +++ b/cinelerra-5.1/guicast/thread.h
613 #include <sys/syscall.h>
615 -static inline int gettid() { return syscall(SYS_gettid, 0, 0, 0); }
616 +static inline long gettid() { return (long)pthread_self(); }
618 // The thread does not autodelete by default.
619 // If autodelete is 1 the thread autodeletes.
620 diff --git a/cinelerra-5.1/plugins/Makefile b/cinelerra-5.1/plugins/Makefile
621 index 6ed357c7..56081181 100644
622 --- a/cinelerra-5.1/plugins/Makefile
623 +++ b/cinelerra-5.1/plugins/Makefile
624 @@ -31,7 +31,6 @@ DIRS = $(OPENCV_OBJS) \
632 @@ -161,6 +160,8 @@ DIRS = $(OPENCV_OBJS) \
639 PLUGIN_DIR = $(BINDIR)/plugins
640 DATA = $(PLUGIN_DIR)/fonts $(PLUGIN_DIR)/shapes
641 diff --git a/cinelerra-5.1/plugins/titler/titler.C b/cinelerra-5.1/plugins/titler/titler.C
642 index fefbbdb1..045e96d4 100644
643 --- a/cinelerra-5.1/plugins/titler/titler.C
644 +++ b/cinelerra-5.1/plugins/titler/titler.C
650 -#include <byteswap.h>
651 +#include <sys/endian.h>
653 #include <sys/stat.h>
654 #include <fontconfig/fontconfig.h>