additional TERMUX related mods from Andrew
authorGood Guy <[email protected]>
Tue, 9 Nov 2021 01:27:46 +0000 (18:27 -0700)
committerGood Guy <[email protected]>
Tue, 9 Nov 2021 01:27:46 +0000 (18:27 -0700)
cinelerra-5.1/cinelerra/brender.C
cinelerra-5.1/cinelerra/commercials.h
cinelerra-5.1/cinelerra/dbwindow.h
cinelerra-5.1/cinelerra/mediadb.h
cinelerra-5.1/cinelerra/mwindow.C
cinelerra-5.1/cinelerra/virtualanode.C
cinelerra-5.1/db/tdb.h
cinelerra-5.1/plugins/livevideo/livevideo.C

index 9fc3355afe2848387d03d243240b5b6b757894a2..49580c9f041fbed049476333285ab46bc6d818b2 100644 (file)
@@ -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);
index b7b815c4716cdca0fb3aa41fd22497128b0b96c9..7869c3c3e2e1099c74ac6d1986590357aa32770c 100644 (file)
@@ -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
index 24a40df8c765fdd6eed99805457b37bf56c0d321..c8a12f663d09fc3a471050f0282b55dbef32ba04 100644 (file)
@@ -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
index 9bb970eed3228878f3bd173b0ad480b2aeae94d8..71e96bfbbc4d3170f7c24145414a40fc5c85d5a8 100644 (file)
@@ -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
index 9d71e561103f80a42d237bb66926232c5c83baf6..e4d02d23b7e61596d56054b8ea36343c5c0f19b1 100644 (file)
@@ -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
index a1ad5235c65841c413e88d309034820a5e3d7395..55a79d356c91bb18fb17444f42f937d83c69e206 100644 (file)
@@ -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
index 8ee88002ee2e8dc60f0e732ee82548fef14e3000..e4a0856526737010b7ea344144e997e0863cc3c0 100644 (file)
@@ -1,3 +1,4 @@
+#ifdef __I386__ || __x86-64__
 #ifndef __DB_H__
 #define __DB_H__
 #include <cstring>
@@ -1514,3 +1515,4 @@ public:
 };
 
 #endif
+#endif /* x86 */
\ No newline at end of file
index 1aa84222d2c8963b40a30e619d26bb4eb958c310..c30034ab64001fc8c81e1a043aff88e00ad4730e 100644 (file)
@@ -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(),