From: Good Guy Date: Tue, 9 Nov 2021 01:27:46 +0000 (-0700) Subject: additional TERMUX related mods from Andrew X-Git-Tag: 2021-11~12 X-Git-Url: https://git.cinelerra-gg.org/git/?a=commitdiff_plain;h=9d54c23d957ea350c5ffd756ac2c1c221c94637b;p=goodguy%2Fcinelerra.git additional TERMUX related mods from Andrew --- diff --git a/cinelerra-5.1/cinelerra/brender.C b/cinelerra-5.1/cinelerra/brender.C index 9fc3355a..49580c9f 100644 --- a/cinelerra-5.1/cinelerra/brender.C +++ b/cinelerra-5.1/cinelerra/brender.C @@ -103,6 +103,9 @@ void BRender::initialize() // Create socket for background process. uuid_t socket_temp; sprintf(socket_path, "/tmp/cinelerra."); +#if defined(__TERMUX__) + sprintf(socket_path, "/data/data/com.termux/files/home/tmp/cinelerra."); +#endif uuid_generate(socket_temp); uuid_unparse(socket_temp, socket_path + strlen(socket_path)); SET_TEMP(socket_path); diff --git a/cinelerra-5.1/cinelerra/commercials.h b/cinelerra-5.1/cinelerra/commercials.h index b7b815c4..7869c3c3 100644 --- a/cinelerra-5.1/cinelerra/commercials.h +++ b/cinelerra-5.1/cinelerra/commercials.h @@ -1,3 +1,4 @@ +#ifdef __I386__ || __x86-64__ #ifndef _COMMERCIALS_H_ #define _COMMERCIALS_H_ @@ -202,3 +203,4 @@ public: #endif +#endif /* x86 */ \ No newline at end of file diff --git a/cinelerra-5.1/cinelerra/dbwindow.h b/cinelerra-5.1/cinelerra/dbwindow.h index 24a40df8..c8a12f66 100644 --- a/cinelerra-5.1/cinelerra/dbwindow.h +++ b/cinelerra-5.1/cinelerra/dbwindow.h @@ -1,3 +1,4 @@ +#ifdef __I386__ || __x86-64__ #ifndef _DBWINDOW_H_ #define _DBWINDOW_H_ @@ -296,3 +297,4 @@ public: #endif +#endif /* x86 */ \ No newline at end of file diff --git a/cinelerra-5.1/cinelerra/mediadb.h b/cinelerra-5.1/cinelerra/mediadb.h index 9bb970ee..71e96bfb 100644 --- a/cinelerra-5.1/cinelerra/mediadb.h +++ b/cinelerra-5.1/cinelerra/mediadb.h @@ -1,3 +1,4 @@ +#ifdef __I386__ || __x86-64__ #ifndef _MEDIA_DB_H_ #define _MEDIA_DB_H_ @@ -239,3 +240,4 @@ public: }; #endif +#endif /* x86 */ \ No newline at end of file diff --git a/cinelerra-5.1/cinelerra/mwindow.C b/cinelerra-5.1/cinelerra/mwindow.C index 9d71e561..e4d02d23 100644 --- a/cinelerra-5.1/cinelerra/mwindow.C +++ b/cinelerra-5.1/cinelerra/mwindow.C @@ -283,8 +283,10 @@ MWindow::~MWindow() delete convert_render; convert_render = 0; delete render; render = 0; delete mixers_align; mixers_align = 0; +#ifdef HAVE_COMMERCIALS commit_commercial(); if( commercials && !commercials->remove_user() ) commercials = 0; +#endif close_mixers(); if( speed_edl ) { speed_edl->remove_user(); speed_edl = 0; } // Save defaults for open plugins diff --git a/cinelerra-5.1/cinelerra/virtualanode.C b/cinelerra-5.1/cinelerra/virtualanode.C index a1ad5235..55a79d35 100644 --- a/cinelerra-5.1/cinelerra/virtualanode.C +++ b/cinelerra-5.1/cinelerra/virtualanode.C @@ -475,11 +475,11 @@ int VirtualANode::render_pan(double *input, // start of input fragment } } else if( EQUIV(intercept, 1) ) { - for(int j = 0; j < slope_len; j++, i++) + for(int64_t j = 0; j < slope_len; j++, i++) output[i] += input[i]; } else if( !EQUIV(intercept, 0) ) { - for(int j = 0; j < slope_len; j++, i++) + for(int64_t j = 0; j < slope_len; j++, i++) output[i] += input[i] * intercept; } else diff --git a/cinelerra-5.1/db/tdb.h b/cinelerra-5.1/db/tdb.h index 8ee88002..e4a08565 100644 --- a/cinelerra-5.1/db/tdb.h +++ b/cinelerra-5.1/db/tdb.h @@ -1,3 +1,4 @@ +#ifdef __I386__ || __x86-64__ #ifndef __DB_H__ #define __DB_H__ #include @@ -1514,3 +1515,4 @@ public: }; #endif +#endif /* x86 */ \ No newline at end of file diff --git a/cinelerra-5.1/plugins/livevideo/livevideo.C b/cinelerra-5.1/plugins/livevideo/livevideo.C index 1aa84222..c30034ab 100644 --- a/cinelerra-5.1/plugins/livevideo/livevideo.C +++ b/cinelerra-5.1/plugins/livevideo/livevideo.C @@ -31,7 +31,9 @@ #include "filexml.h" #include "guicast.h" #include "language.h" +#if HAVE_LIBDV #include "libdv.h" +#endif #include "libmjpeg.h" #include "mwindow.h" #include "picture.h" @@ -150,7 +152,9 @@ public: int prev_channel; int w, h; // Decompressors for different video drivers +#if HAVE_DV dv_t *dv; +#endif mjpeg_t *mjpeg; }; @@ -350,7 +354,9 @@ LiveVideo::LiveVideo(PluginServer *server) w = xS(320); h = yS(640); prev_channel = 0; +#if HAVE_DV dv = 0; +#endif mjpeg = 0; picture = 0; this->server = server; @@ -370,7 +376,9 @@ LiveVideo::~LiveVideo() delete channeldb; delete temp; +#if HAVE_DV if(dv) dv_delete(dv); +#endif if(mjpeg) mjpeg_delete(mjpeg); delete picture; } @@ -499,6 +507,7 @@ int LiveVideo::process_buffer(VFrame *frame, { switch(session->vconfig_in->driver) { +#if HAVE_DV case CAPTURE_FIREWIRE: case CAPTURE_IEC61883: // Decompress a DV frame from the driver @@ -511,7 +520,7 @@ int LiveVideo::process_buffer(VFrame *frame, frame->get_color_model()); frame->set_opengl_state(VFrame::RAM); break; - +#endif case VIDEO4LINUX2JPEG: if(!mjpeg) mjpeg = mjpeg_new(frame->get_w(),