add zoom slider, fix stop_playback on quit, new msg.txt, rework filelist
authorGood Guy <good1.2guy@gmail.com>
Sun, 28 May 2017 20:41:06 +0000 (14:41 -0600)
committerGood Guy <good1.2guy@gmail.com>
Sun, 28 May 2017 20:41:06 +0000 (14:41 -0600)
27 files changed:
cinelerra-5.1/cinelerra/cpanel.C
cinelerra-5.1/cinelerra/cpanel.h
cinelerra-5.1/cinelerra/cpanel.inc
cinelerra-5.1/cinelerra/cwindowgui.C
cinelerra-5.1/cinelerra/cwindowgui.h
cinelerra-5.1/cinelerra/cwindowtool.C
cinelerra-5.1/cinelerra/dcraw.c
cinelerra-5.1/cinelerra/edl.C
cinelerra-5.1/cinelerra/filecr2.C
cinelerra-5.1/cinelerra/filelist.C
cinelerra-5.1/cinelerra/mwindow.C
cinelerra-5.1/cinelerra/playbackengine.C
cinelerra-5.1/cinelerra/playbackengine.h
cinelerra-5.1/cinelerra/preferencesthread.C
cinelerra-5.1/cinelerra/renderengine.C
cinelerra-5.1/cinelerra/renderengine.h
cinelerra-5.1/cinelerra/zoompanel.C
cinelerra-5.1/guicast/thread.C
cinelerra-5.1/msg.txt
cinelerra-5.1/plugins/theme_blond/blondtheme.C
cinelerra-5.1/plugins/theme_blond_cv/blondcvtheme.C
cinelerra-5.1/plugins/theme_blue/bluetheme.C
cinelerra-5.1/plugins/theme_bright/brighttheme.C
cinelerra-5.1/plugins/theme_hulk/hulktheme.C
cinelerra-5.1/plugins/theme_pinklady/pinkladytheme.C
cinelerra-5.1/plugins/theme_suv/suv.C
cinelerra-5.1/plugins/theme_unflat/unflattheme.C

index e6c5cff575997abb1fc635944ee535f883e31cc2..09c54b5ac34b2e90e46d508ddf07c2f7988cbe7b 100644 (file)
  *
  */
 
+#include "automation.h"
 #include "cpanel.h"
+#include "cwindow.h"
 #include "cwindowgui.h"
 #include "cwindowtool.h"
 #include "edl.h"
 #include "edlsession.h"
+#include "floatauto.h"
 #include "language.h"
 #include "mbuttons.h"
 #include "mwindow.h"
+#include "mwindowgui.h"
 #include "theme.h"
+#include "track.h"
 
 
 
@@ -73,6 +78,9 @@ void CPanel::create_objects()
        subwindow->add_subwindow(operation[CWINDOW_TOOL_WINDOW] = new CPanelToolWindow(mwindow, this, x, y));
        y += operation[CWINDOW_TOOL_WINDOW]->get_h();
        subwindow->add_subwindow(operation[CWINDOW_TITLESAFE] = new CPanelTitleSafe(mwindow, this, x, y));
+       y += operation[CWINDOW_TITLESAFE]->get_h();
+       x += (w - BC_Slider::get_span(1)) / 2;
+       subwindow->add_subwindow(cpanel_zoom = new CPanelZoom(mwindow, this, x, y+15, h-y-15));
 }
 
 void CPanel::reposition_buttons(int x, int y)
@@ -85,6 +93,8 @@ void CPanel::reposition_buttons(int x, int y)
                operation[i]->reposition_window(x, y);
                y += operation[i]->get_h();
        }
+       x += (w - BC_Slider::get_span(1)) / 2;
+       cpanel_zoom->reposition_window(x, y+15);
 }
 
 
@@ -114,6 +124,13 @@ void CPanel::set_operation(int value)
                                operation[i]->update(1);
                }
        }
+       if( operation[CWINDOW_ZOOM]->get_value() ||
+           operation[CWINDOW_CAMERA]->get_value() ||
+           operation[CWINDOW_PROJECTOR]->get_value() ) {
+               cpanel_zoom->set_shown(1);
+       }
+       else
+               cpanel_zoom->set_shown(0);
 }
 
 
@@ -347,3 +364,78 @@ int CPanelTitleSafe::handle_event()
        return 1;
 }
 
+CPanelZoom::CPanelZoom(MWindow *mwindow, CPanel *gui, int x, int y, int h)
+ : BC_FSlider(x, y, 1, h-30, h, -2., 2., 0, 0)
+{
+       this->mwindow = mwindow;
+       this->gui = gui;
+       set_precision(0.001);
+       set_tooltip(_("Zoom"));
+}
+CPanelZoom::~CPanelZoom()
+{
+}
+int CPanelZoom::handle_event()
+{
+       FloatAuto *z_auto = 0;
+       int aidx = -1;
+       float value = get_value();
+       BC_FSlider::update(value);
+       double zoom = pow(10.,value);
+       switch( mwindow->edl->session->cwindow_operation ) {
+       case CWINDOW_ZOOM:
+               gui->subwindow->zoom_canvas(0, zoom, 1);
+               break;
+       case CWINDOW_CAMERA:
+               aidx = AUTOMATION_CAMERA_Z;
+               break;
+       case CWINDOW_PROJECTOR:
+               aidx = AUTOMATION_PROJECTOR_Z;
+               break;
+       }
+       if( aidx < 0 ) return 1;
+       Track *track = mwindow->cwindow->calculate_affected_track();
+       if( !track ) return 1;
+       z_auto = (FloatAuto*)mwindow->cwindow->calculate_affected_auto(
+                       track->automation->autos[aidx], 1);
+       if( !z_auto ) return 1;
+       z_auto->set_value(zoom);
+       gui->subwindow->update_tool();
+       mwindow->gui->lock_window("CPanelZoom::handle_event 1");
+       mwindow->gui->draw_overlays(1);
+       mwindow->gui->unlock_window();
+       mwindow->sync_parameters(CHANGE_PARAMS);
+       return 1;
+}
+
+int CPanelZoom::set_shown(int shown)
+{
+       if( shown ) {
+               float zoom = gui->subwindow->canvas->get_zoom();
+               gui->subwindow->zoom_canvas(0, zoom, 1);
+               show_window();
+       }
+       else
+               hide_window();
+       return 1;
+}
+
+char *CPanelZoom::get_caption()
+{
+       double value = get_value();
+       int frac = value >= 0. ? 1 : value >= -1. ? 2 : 3;
+       double zoom = pow(10., value);
+       char *caption = BC_Slider::get_caption();
+       sprintf(caption, "%.*f", frac, zoom);
+       return caption;
+}
+
+void CPanelZoom::update(float zoom)
+{
+       if( !is_hidden() ) {
+               if( zoom < 0.01 ) zoom = 0.01;
+               float value = log(zoom) / log(10.);
+               BC_FSlider::update(value);
+       }
+}
+
index d78ae301ec8326ca69ae384f7e23aafe226fcb03..cbca255ac15298ffe001befd1881726bffdbcaa5 100644 (file)
@@ -23,6 +23,7 @@
 #define CPANEL_H
 
 #include "cwindowgui.inc"
+#include "cpanel.inc"
 #include "edl.inc"
 #include "guicast.h"
 #include "mwindow.inc"
@@ -39,6 +40,7 @@ public:
 
        MWindow *mwindow;
        CWindowGUI *subwindow;
+       CPanelZoom *cpanel_zoom;
 
        int x, y, w, h;
 
@@ -166,6 +168,17 @@ public:
        CPanel *gui;
 };
 
-
+class CPanelZoom : public BC_FSlider
+{
+public:
+       CPanelZoom(MWindow *mwindow, CPanel *gui, int x, int y, int h);
+       ~CPanelZoom();
+       char *get_caption();
+       int handle_event();
+       int set_shown(int shown);
+       void update(float zoom);
+       MWindow *mwindow;
+       CPanel *gui;
+};
 
 #endif
index f9febccc7929d1ff831132c2cfeea03a4cda2f3d..0c893074a4223f1c464d96cb027da095117e76fd 100644 (file)
 #define CPANEL_INC
 
 class CPanel;
+class CPanelMask;
+class CPanelRuler;
+class CPanelTitleSafe;
+class CPanelErase;
+class CPanelAntierase;
+class CPanelProtect;
+class CPanelMagnify;
+class CPanelCamera;
+class CPanelProj;
+class CPanelCrop;
+class CPanelEyedrop;
+class CPanelToolWindow;
+class CPanelZoom;
 
 #endif
index a5cee3517b579fa86795cb4015625b3093413a75..4f899c57e7e9ba0c0c8df1e65c107b8d99f83899 100644 (file)
@@ -359,44 +359,50 @@ void CWindowGUI::draw_status(int flush)
                flush);
 }
 
+float CWindowGUI::get_auto_zoom()
+{
+       float conformed_w, conformed_h;
+       mwindow->edl->calculate_conformed_dimensions(0, conformed_w, conformed_h);
+       float zoom_x = canvas->w / conformed_w;
+       float zoom_y = canvas->h / conformed_h;
+       return zoom_x < zoom_y ? zoom_x : zoom_y;
+}
 
 void CWindowGUI::zoom_canvas(int do_auto, double value, int update_menu)
 {
-       if(do_auto)
-               mwindow->edl->session->cwindow_scrollbars = 0;
-       else
-               mwindow->edl->session->cwindow_scrollbars = 1;
-
+       EDL *edl = mwindow->edl;
+       float x = 0, y = 0;
        float old_zoom = mwindow->edl->session->cwindow_zoom;
        float new_zoom = value;
-       float x = canvas->w / 2.0;
-       float y = canvas->h / 2.0;
-       canvas->canvas_to_output(mwindow->edl,
-                               0,
-                               x,
-                               y);
-       x -= canvas->w_visible / 2 * old_zoom / new_zoom;
-       y -= canvas->h_visible / 2 * old_zoom / new_zoom;
-       if(update_menu)
-       {
-               if(do_auto)
-               {
-                       zoom_panel->update(auto_zoom);
+       edl->session->cwindow_scrollbars = do_auto ? 0 : 1;
+       if( !do_auto && canvas->scrollbars_exist() ) {
+               float z = 1 - old_zoom / new_zoom;
+               x = canvas->get_xscroll() + 0.5f*canvas->w_visible * z;
+               y = canvas->get_yscroll() + 0.5f*canvas->h_visible * z;
+       }
+
+       if( update_menu ) {
+               if( !do_auto ) {
+                       int frac = new_zoom >= 1.0f ? 1 :
+                                  new_zoom >= 0.1f ? 2 :
+                                  new_zoom >= .01f ? 3 : 4;
+                       char string[BCSTRLEN];
+                       sprintf(string,"x %.*f", frac, new_zoom);
+                       zoom_panel->update(string);
                }
-               else
-               {
-                       zoom_panel->update(value);
+               else {
+                       zoom_panel->update(auto_zoom);
+                       composite_panel->cpanel_zoom->update(new_zoom);
                }
        }
+       else if( mwindow->edl->session->cwindow_operation == CWINDOW_ZOOM ) {
+               composite_panel->cpanel_zoom->update(new_zoom);
+       }
 
-       canvas->update_zoom((int)x,
-               (int)y,
-               new_zoom);
+       canvas->update_zoom((int)x, (int)y, new_zoom);
        canvas->reposition_window(mwindow->edl,
-               mwindow->theme->ccanvas_x,
-               mwindow->theme->ccanvas_y,
-               mwindow->theme->ccanvas_w,
-               mwindow->theme->ccanvas_h);
+               mwindow->theme->ccanvas_x, mwindow->theme->ccanvas_y,
+               mwindow->theme->ccanvas_w, mwindow->theme->ccanvas_h);
        canvas->draw_refresh();
 }
 
@@ -763,15 +769,8 @@ int CWindowMeters::change_status_event(int new_status)
 
 
 CWindowZoom::CWindowZoom(MWindow *mwindow, CWindowGUI *gui, int x, int y, int w)
- : ZoomPanel(mwindow,
-       gui,
-       (double)mwindow->edl->session->cwindow_zoom,
-       x,
-       y,
-       w,
-       my_zoom_table,
-       total_zooms,
-       ZOOM_PERCENTAGE)
+ : ZoomPanel(mwindow, gui, (double)mwindow->edl->session->cwindow_zoom,
+       x, y, w, my_zoom_table, total_zooms, ZOOM_PERCENTAGE)
 {
        this->mwindow = mwindow;
        this->gui = gui;
@@ -783,15 +782,9 @@ CWindowZoom::~CWindowZoom()
 
 int CWindowZoom::handle_event()
 {
-       if(!strcasecmp(gui->auto_zoom, get_text()))
-       {
-               gui->zoom_canvas(1, get_value(), 0);
-       }
-       else
-       {
-               gui->zoom_canvas(0, get_value(), 0);
-       }
-
+       int do_auto = !strcasecmp(gui->auto_zoom, get_text()) ? 1 : 0;
+       float zoom = do_auto ? gui->get_auto_zoom() : get_value();
+       gui->zoom_canvas(do_auto, zoom, 0);
        return 1;
 }
 
@@ -973,7 +966,7 @@ void CWindowCanvas::update_zoom(int x, int y, float zoom)
 
 void CWindowCanvas::zoom_auto()
 {
-       gui->zoom_canvas(1, 1.0, 1);
+       gui->zoom_canvas(1, gui->get_auto_zoom(), 1);
 }
 
 int CWindowCanvas::get_xscroll()
@@ -3018,6 +3011,9 @@ int CWindowCanvas::test_zoom(int &redraw)
 
 
        gui->zoom_panel->update(zoom);
+       if( gui->mwindow->edl->session->cwindow_operation == CWINDOW_ZOOM ) {
+               gui->composite_panel->cpanel_zoom->update(zoom);
+       }
 
        return result;
 }
index 931047e599f6d621a5ff38c26a86ee77dacfe017..a5d18926ca4b2911d71f623581b8710ee2eaa13f 100644 (file)
@@ -60,8 +60,10 @@ public:
        CWindowGUI(MWindow *mwindow, CWindow *cwindow);
        ~CWindowGUI();
 
-    void create_objects();
+       void create_objects();
        int resize_event(int w, int h);
+       void zoom_canvas(int do_auto, double value, int update_menu);
+       float get_auto_zoom();
 
 // Events for the fullscreen canvas fall through to here.
        int button_press_event();
@@ -70,9 +72,6 @@ public:
        int button_release_event();
        int cursor_motion_event();
 
-
-       void zoom_canvas(int do_auto, double value, int update_menu);
-
        int close_event();
        int keypress_event();
        int translation_event();
index 026aa32003c605075a1929435ab5370073a57d78..ee1c1044f2e34cec1871b278196ae66026ba4799 100644 (file)
@@ -812,9 +812,9 @@ void CWindowCameraGUI::handle_event()
                        if(z_auto)
                        {
                                float zoom = atof(z->get_text());
-                               if(zoom > 10) zoom = 10;
+                               if(zoom > 100.) zoom = 100.;
                                else
-                               if(zoom < 0) zoom = 0;
+                               if(zoom < 0.01) zoom = 0.01;
        // Doesn't allow user to enter from scratch
        //              if(zoom != atof(z->get_text()))
        //                      z->update(zoom);
@@ -855,8 +855,11 @@ void CWindowCameraGUI::update()
                x->update(x_auto->get_value());
        if(y_auto)
                y->update(y_auto->get_value());
-       if(z_auto)
-               z->update(z_auto->get_value());
+       if(z_auto) {
+               float value = z_auto->get_value();
+               z->update(value);
+               thread->gui->composite_panel->cpanel_zoom->update(value);
+       }
 
        if( x_auto && y_auto && z_auto )
        {
@@ -1257,9 +1260,8 @@ void CWindowProjectorGUI::handle_event()
                        if(z_auto)
                        {
                                float zoom = atof(z->get_text());
-                               if(zoom > 10000) zoom = 10000;
-                               else
-                               if(zoom < 0) zoom = 0;
+                               if(zoom > 100.) zoom = 100.;
+                               else if(zoom < 0.01) zoom = 0.01;
 //                     if (zoom != atof(z->get_text()))
 //                             z->update(zoom);
                                z_auto->set_value(zoom);
@@ -1299,8 +1301,11 @@ void CWindowProjectorGUI::update()
                x->update(x_auto->get_value());
        if(y_auto)
                y->update(y_auto->get_value());
-       if(z_auto)
-               z->update(z_auto->get_value());
+       if(z_auto) {
+               float value = z_auto->get_value();
+               z->update(value);
+               thread->gui->composite_panel->cpanel_zoom->update(value);
+       }
 
        if( x_auto && y_auto && z_auto )
        {
index 52c3f920d22804d0f4678ede066c0535759eb4ad..98106822cf9859eca5a0dae0de9c175fd4740cb9 100644 (file)
@@ -3325,7 +3325,8 @@ int CLASS foveon_fixed (void *ptr, int size, const char *name)
 {
   void *dp;
   unsigned dim[3];
-
+// CINELERRA
+  memset (ptr, 0, size*4);
   if (!name) return 0;
   dp = foveon_camf_matrix (dim, name);
   if (!dp) return 0;
index cf1d0968ae738b0105be07b122b1697e59f36e90..3dc2153e7c7d09cb6d83c5bec671842e0f7ed058 100644 (file)
@@ -1022,19 +1022,10 @@ int64_t EDL::get_tracks_width()
 // Get the total output size scaled to aspect ratio
 void EDL::calculate_conformed_dimensions(int single_channel, float &w, float &h)
 {
-       w = session->output_w;
-       h = session->output_h;
-
        if((float)session->output_w / session->output_h > get_aspect_ratio())
-       {
-               h = (float)h *
-                       (session->output_w / get_aspect_ratio() / session->output_h);
-       }
+               h = (w = session->output_w) / get_aspect_ratio();
        else
-       {
-               w = (float)w *
-                       (h * get_aspect_ratio() / session->output_w);
-       }
+               w = (h = session->output_h) * get_aspect_ratio();
 }
 
 float EDL::get_aspect_ratio()
index 0d36b26f26564c2abc038d12e29d77f40a827e36..fdd5b2c78cda9e0ab9d60a9415c6a7e17db0653f 100644 (file)
@@ -132,7 +132,7 @@ int FileCR2::check_sig(Asset *asset)
 int FileCR2::read_frame_header(char *path)
 {
        int argc = 3;
-printf("FileCR2::read_frame_header %d\n", __LINE__);
+//printf("FileCR2::read_frame_header %d\n", __LINE__);
        const char *argv[4] =
        {
                "dcraw",
@@ -144,7 +144,7 @@ printf("FileCR2::read_frame_header %d\n", __LINE__);
        int result = dcraw_run(argc, argv);
        if(!result) format_to_asset();
 
-printf("FileCR2::read_frame_header %d %d\n", __LINE__, result);
+//printf("FileCR2::read_frame_header %d %d\n", __LINE__, result);
        return result;
 }
 
@@ -216,7 +216,7 @@ int FileCR2::read_frame(VFrame *frame, char *path)
                argv[argc++] = (char*)"-d";
        }
 
-printf("FileCR2::read_frame %d %s\n", __LINE__, path);
+//printf("FileCR2::read_frame %d %s\n", __LINE__, path);
        argv[argc++] = path;
 
        dcraw_data = (float**)frame->get_rows();
@@ -270,7 +270,7 @@ int FileCR2::get_best_colormodel(Asset *asset, int driver)
 // int64_t FileCR2::get_memory_usage()
 // {
 //     int64_t result = asset->width * asset->height * sizeof(float) * 3;
-// //printf("FileCR2::get_memory_usage %d " _LD "\n", __LINE__, result);
+//printf("FileCR2::get_memory_usage %d " _LD "\n", __LINE__, result);
 //     return result;
 // }
 
index a7861e14d60b933524af1bb86ba525615ffe5139..e910e8e8ad057c599c51aecc921690d8bc01c246 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "asset.h"
 #include "bcsignals.h"
+#include "cstrdup.h"
 #include "file.h"
 #include "filelist.h"
 #include "guicast.h"
@@ -207,59 +208,51 @@ int FileList::write_list_header()
 
 int FileList::read_list_header()
 {
-       char string[BCTEXTLEN], *new_entry;
+       char string[BCTEXTLEN];
 
        FILE *stream = fopen(asset->path, "r");
-
-
-       if(stream)
-       {
+       if( !stream ) return 1;
 // Get information about the frames
-               do
-               {
-                       (void)fgets(string, BCTEXTLEN, stream);
-               }while(!feof(stream) && (string[0] == '#' || string[0] == ' ' || isalpha(string[0])));
+       do {
+               if( feof(stream) || !fgets(string, BCTEXTLEN, stream) ) return 1;
+       } while(string[0] == '#' || string[0] == ' ' || isalpha(string[0]));
 
 // Don't want a user configured frame rate to get destroyed
-               if(asset->frame_rate == 0)
-                       asset->frame_rate = atof(string);
-
-               do
-               {
-                       (void)fgets(string, BCTEXTLEN, stream);
-               }while(!feof(stream) && (string[0] == '#' || string[0] == ' '));
-               asset->width = atol(string);
-
-               do
-               {
-                       (void)fgets(string, BCTEXTLEN, stream);
-               }while(!feof(stream) && (string[0] == '#' || string[0] == ' '));
-               asset->height = atol(string);
-
-               asset->interlace_mode = ILACE_MODE_UNDETECTED;  // May be good to store the info in the list?
-               asset->layers = 1;
-               asset->audio_data = 0;
-               asset->video_data = 1;
+       if(asset->frame_rate == 0)
+               asset->frame_rate = atof(string);
+
+       do {
+               if( feof(stream) || !fgets(string, BCTEXTLEN, stream) ) return 1;
+       } while(string[0] == '#' || string[0] == ' ');
+       if( (asset->width = atol(string)) <= 0 ) return 1;
+
+       do {
+               if( feof(stream) || !fgets(string, BCTEXTLEN, stream) ) return 1;
+       } while(string[0] == '#' || string[0] == ' ');
+       if( (asset->height = atol(string)) <= 0 ) return 1;
+
+       asset->interlace_mode = ILACE_MODE_UNDETECTED;
+       asset->layers = 1;
+       asset->audio_data = 0;
+       asset->video_data = 1;
 
 // Get all the paths
-               while(!feof(stream))
-               {
-                       (void)fgets(string, BCTEXTLEN, stream);
-                       if(strlen(string) && string[0] != '#' && string[0] != ' ' && !feof(stream))
-                       {
-                               string[strlen(string) - 1] = 0;
-                               path_list.append(new_entry = new char[strlen(string) + 1]);
-                               strcpy(new_entry, string);
-                       }
-               }
-
-//for(int i = 0; i < path_list.total; i++) printf("%s\n", path_list.values[i]);
-               fclose(stream);
-               asset->video_length = path_list.total;
+       int missing = 0;
+       while(!feof(stream) && fgets(string, BCTEXTLEN, stream) ) {
+               int len = strlen(string);
+               if( !len || string[0] == '#' || string[0] == ' ') continue;
+               string[len-1] = 0;
+               if( access(string,R_OK) && !missing++ )
+                       eprintf(_("%s:no such file"), string);
+               path_list.append(cstrdup(string));
        }
-       else
-               return 1;
 
+//for(int i = 0; i < path_list.total; i++) printf("%s\n", path_list.values[i]);
+       fclose(stream);
+       if( !(asset->video_length = path_list.total) )
+               eprintf(_("%s:\nlist empty"), asset->path);
+       if( missing )
+               eprintf(_("%s:\n%d files not found"), asset->path, missing);
        return 0;
 }
 
index 3887a8daa887962dde2c3cb33e033cf37a2a625d..75dc29acaa32d70f80126e10c741c780e9620622 100644 (file)
@@ -231,6 +231,7 @@ MWindow::MWindow()
 MWindow::~MWindow()
 {
        run_lock->lock("MWindow::~MWindow");
+       stop_playback(1);
        in_destructor = 1;
 //printf("MWindow::~MWindow %d\n", __LINE__);
        gui->stop_drawing();
@@ -1334,17 +1335,12 @@ void MWindow::stop_playback(int wait)
        int locked  = gui->get_window_lock();
        if( locked ) gui->unlock_window();
 
-       cwindow->playback_engine->que->send_command(STOP,
-               CHANGE_NONE,
-               0,
-               0);
-       cwindow->playback_engine->interrupt_playback(wait);
+       cwindow->playback_engine->stop_playback();
 
        for(int i = 0; i < vwindows.size(); i++) {
                VWindow *vwindow = vwindows[i];
                if( !vwindow->is_running() ) continue;
-               vwindow->playback_engine->que->send_command(STOP, CHANGE_NONE, 0, 0);
-               vwindow->playback_engine->interrupt_playback(wait);
+               vwindow->playback_engine->stop_playback();
        }
        if( locked ) gui->lock_window("MWindow::stop_playback");
 }
index 27d177c562ef0b1971579221d126ae52db42a9c7..802b7b610c24e04ed931085319a6310d3d0fa4f4 100644 (file)
@@ -358,7 +358,6 @@ void PlaybackEngine::run()
 
                wait_render_engine();
 
-
 // Read the new command
                que->input_lock->lock("PlaybackEngine::run");
                if(done) return;
@@ -369,7 +368,6 @@ void PlaybackEngine::run()
 
 //printf("PlaybackEngine::run 1 %d\n", command->command);
 
-
                switch(command->command)
                {
 // Parameter change only
@@ -423,4 +421,13 @@ void PlaybackEngine::run()
 }
 
 
+void PlaybackEngine::stop_playback()
+{
+       que->send_command(STOP, CHANGE_NONE, 0, 0);
+       interrupt_playback(1);
+       renderengine_lock->lock("PlaybackEngine::stop_playback");
+       if(render_engine)
+               render_engine->wait_done();
+       renderengine_lock->unlock();
+}
 
index 1cbd24d32338ba308f907043c1144a0459785a1c..9d2d35e338f9f9e0708179042cc62ac5b28d89c2 100644 (file)
@@ -81,6 +81,7 @@ public:
        ChannelDB* get_channeldb();
 
        void run();
+       void stop_playback();
 
 // Maintain caches through console changes
        CICache *audio_cache, *video_cache;
index 4d1a41561c4e2896d5ad1bade1f68160a10187b0..9393d4359f7158802ffe3c9eab8f84096863e4a0 100644 (file)
@@ -63,7 +63,7 @@
 
 
 #define WIDTH 770
-#define HEIGHT 690
+#define HEIGHT 720
 
 
 PreferencesMenuitem::PreferencesMenuitem(MWindow *mwindow)
index 970a91b0571f9afff27e1ca68c57f71b819db584..6ad6629c00719f9bce155cff2a680e768ee3d34d 100644 (file)
@@ -76,6 +76,7 @@ RenderEngine::RenderEngine(PlaybackEngine *playback_engine,
        input_lock = new Condition(1, "RenderEngine::input_lock");
        start_lock = new Condition(1, "RenderEngine::start_lock");
        output_lock = new Condition(1, "RenderEngine::output_lock");
+       render_active = new Condition(1,"RenderEngine::render_active");
        interrupt_lock = new Mutex("RenderEngine::interrupt_lock");
        first_frame_lock = new Condition(1, "RenderEngine::first_frame_lock");
 }
@@ -503,6 +504,7 @@ void RenderEngine::get_module_levels(ArrayList<double> *module_levels, int64_t p
 
 void RenderEngine::run()
 {
+       render_active->lock("RenderEngine::run");
        start_render_threads();
        start_lock->unlock();
        interrupt_lock->unlock();
@@ -555,7 +557,13 @@ void RenderEngine::run()
 
        input_lock->unlock();
        interrupt_lock->unlock();
+       render_active->unlock();
 }
 
+void RenderEngine::wait_done()
+{
+       render_active->lock("RenderEngine::wait_done");
+       render_active->unlock();
+}
 
 
index fd400c2d3672b1d1d30f85368218a27107713f06..b34fbf60546f26457e713f3e916da363632c8e55 100644 (file)
@@ -58,6 +58,7 @@ public:
        void start_render_threads();
        void wait_render_threads();
        void interrupt_playback();
+       void wait_done();
        int get_output_w();
        int get_output_h();
        int brender_available(int position, int direction);
@@ -106,6 +107,7 @@ public:
 // Lock out interrupts until started
        Condition *start_lock;
        Condition *output_lock;
+       Condition *render_active;
 // Lock out audio and synchronization timers until first frame is done
        Condition *first_frame_lock;
 // Lock out interrupts before and after renderengine is active
index 8b58f1a651b2e091514b59082d84a5530df5edde..e826e30bd837e7f8f39d9ea869292a56ae9deb8b 100644 (file)
@@ -45,30 +45,8 @@ ZoomHash::~ZoomHash()
 }
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-ZoomPanel::ZoomPanel(MWindow *mwindow,
-       BC_WindowBase *subwindow,
-       double value,
-       int x,
-       int y,
-       int w,
-       double min,
-       double max,
-       int zoom_type)
+ZoomPanel::ZoomPanel(MWindow *mwindow, BC_WindowBase *subwindow, double value,
+               int x, int y, int w, double min, double max, int zoom_type)
 {
        this->mwindow = mwindow;
        this->subwindow = subwindow;
@@ -83,15 +61,8 @@ ZoomPanel::ZoomPanel(MWindow *mwindow,
        this->user_size = 0;
 }
 
-ZoomPanel::ZoomPanel(MWindow *mwindow,
-       BC_WindowBase *subwindow,
-       double value,
-       int x,
-       int y,
-       int w,
-       double *user_table,
-       int user_size,
-       int zoom_type)
+ZoomPanel::ZoomPanel(MWindow *mwindow, BC_WindowBase *subwindow, double value,
+               int x, int y, int w, double *user_table, int user_size, int zoom_type)
 {
        this->mwindow = mwindow;
        this->subwindow = subwindow;
index 6cde612dfdfbb853902f02e423bc39699817bf18..26ccf9a45918ce78b7147c4dc7bb6829b136da18 100644 (file)
@@ -127,9 +127,14 @@ int Thread::join()   // join this thread
 {
        if( !exists() ) return 0;
        if( synchronous ) {
-// NOTE: this does not do anything if the thread is not synchronous
+// NOTE: this fails if the thread is not synchronous or
+//  or another thread is already waiting to join.
                int ret = pthread_join(tid, 0);
-               if( ret ) strerror(ret);
+               if( ret ) {
+                       fflush(stdout);
+                       fprintf(stderr, "Thread %p: %s\n", (void*)tid, strerror(ret));
+                       fflush(stderr);
+               }
                CLEAR_LOCKS_TID(tid);
                TheList::dbg_del(tid);
                tid = ((pthread_t)-1);
index ca4de10a34a229758b8e83709f5ebdcb98fe45ba..036b40a382a944773be3be526d3c8e72c37bc963 100644 (file)
@@ -1,7 +1,49 @@
-Email cinelerra@lists.cinelerra-cv.org for bugs or help 
-Check the manual https://cinelerra-cv.org/docs/cinelerra_cv_manual_en.html 
-Testers are welcome to report and supply examples; join at cinelerra-cv.org
-If logged in as root, can capture crashes and email /tmp/cin*.dmp file 
-Volunteer to help with language translations which will help you
-Helpful videos: http://beccatoria.dreamwidth.org/144288.html#cutid2
-Also see: http://g-raffa.eu/Cinelerra/HOWTO/basics.html
+Email cinelerra@lists.cinelerra-cv.org 4 help.
+Join Mailing List at cinelerra-cv.org.  
+Testers/programmers/translators needed.
+Use root, to capture crashes in /tmp/cin*.dmp file.  
+For usage help, refer to the following:
+ https://cinelerra-cv.org/docs/cinelerra_cv_manual_en.html 
+ https://cinelerra-cv.org/five/Features5.pdf
+ http://beccatoria.dreamwidth.org/144288.html#cutid2
+ http://g-raffa.eu/Cinelerra/HOWTO/basics.html
+May 2017 Release/Changes of note:
+ Title plugin allows for 3071 characters now.
+ Horizontal scrollbar added to Title plugin. 
+ Number of chars. used/remaining show in Titler.
+ Faststart option added for Mp4/ffmpeg format.
+ Probe Order preference added for flexibility.
+ Dcraw program updated to latest Coffin version.
+  NOTE: to use raw mode, must enable CR2 probe.
+ Equalizer plugin lock problem fixed + others.
+ Gif files now correctly handled by ffmpeg.
+ Zoom bar in compositor handles any size.
+April 2017 Release/Changes of note:
+ Upgraded FFMPEG to 3.3 + other 3rd party libraries.
+ Blue Banana plugin improvements - End Mask +.
+ New OGG option file / Ubuntu 17 build added.
+ Fixed Background Rendering / added G HotKey.
+ Aspect Ratio when not 1 to 1, is now correct.
+March 2017 Release/Changes of note:
+ Title plugin major changes to include:
+  ColorPicker added, fast Font selection,
+  Stroker for fonts added, BC_FONT_PATH.
+ 32-bit Debian build now available.
+ New Quicktime options for v308/v410/16mmto264.
+ Added C_/D_ for ambiguous translations.
+ Fixed Fade/curve not copying correctly backward.
+February 2017 Release/Changes of note:
+ Title plugin major changes to include:
+  Drag with 9 different handles, Background 
+   video, individual character attributes of 
+   Color, Size, Font, Underline, Bold, Italic,
+   Caps, Blink, Alpha, Nudge, Sup(erscript,
+   subscript), and PNG inclusion + Rt. Click.
+ Text focus policy choice preference added.
+ Bluray creation allowing for non-root usage.
+January 2017 Release/Changes of note:
+ Motion51 plugin added with easier usage.
+ Unicode characters can be put into textbox.
+ Smooth Lines create near-perfect circles/curves.
+ Bluray creation improved to cover more area.
+ H265 options file added for mp4 rendering.
index bffbcdcbc28fe07a33e250b68a683dae6d124cb4..e208269add8bcaeb05a8acfaf6fc4c7c6eb3ac5c 100644 (file)
@@ -337,6 +337,16 @@ void BlondTheme::initialize()
                        "hslider_bg_up.png",
                        "hslider_bg_hi.png",
                        "hslider_bg_dn.png");
+       resources->vertical_slider_data = new_image_set(6,
+                       "hslider_fg_up.png",
+                       "hslider_fg_hi.png",
+                       "hslider_fg_dn.png",
+                       "hslider_bg_up.png",
+                       "hslider_bg_hi.png",
+                       "hslider_bg_dn.png");
+       for( int i=0; i<6; ++i )
+               resources->vertical_slider_data[i]->rotate90();
+
        resources->progress_images = new_image_set(2,
                        "progress_bg.png",
                        "progress_hi.png");
index e4e4460fa98201b8cfd4fac20dca103ddbbdf173..ff4bef774ed38a335cbb25799d59ea81d64f931e 100644 (file)
@@ -118,6 +118,16 @@ void BlondCVTheme::initialize()
                        "hslider_bg_up.png",
                        "hslider_bg_hi.png",
                        "hslider_bg_dn.png");
+       resources->vertical_slider_data = new_image_set(6,
+                       "hslider_fg_up.png",
+                       "hslider_fg_hi.png",
+                       "hslider_fg_dn.png",
+                       "hslider_bg_up.png",
+                       "hslider_bg_hi.png",
+                       "hslider_bg_dn.png");
+       for( int i=0; i<6; ++i )
+               resources->vertical_slider_data[i]->rotate90();
+
        resources->progress_images = new_image_set(2,
                        "progress_bg.png",
                        "progress_hi.png");
index 8bc27de92d2792920cd2b92cbc0c6343ba93509e..254a10b85bd4e2712363125ec8fa53ae6f3a169e 100644 (file)
@@ -337,6 +337,16 @@ void BlueDotTheme::initialize()
                        "hslider_bg_up.png",
                        "hslider_bg_hi.png",
                        "hslider_bg_dn.png");
+       resources->vertical_slider_data = new_image_set(6,
+                       "hslider_fg_up.png",
+                       "hslider_fg_hi.png",
+                       "hslider_fg_dn.png",
+                       "hslider_bg_up.png",
+                       "hslider_bg_hi.png",
+                       "hslider_bg_dn.png");
+       for( int i=0; i<6; ++i )
+               resources->vertical_slider_data[i]->rotate90();
+
        resources->progress_images = new_image_set(2,
                        "progress_bg.png",
                        "progress_hi.png");
index 2c6da4c67a8ba4f50ed3c1d4ac2cc3b4e82914bb..05388641594c6e6c87f9ab2a837a45d1356dccab 100644 (file)
@@ -340,6 +340,16 @@ void BrightTheme::initialize()
                        "hslider_bg_up.png",
                        "hslider_bg_hi.png",
                        "hslider_bg_dn.png");
+       resources->vertical_slider_data = new_image_set(6,
+                       "hslider_fg_up.png",
+                       "hslider_fg_hi.png",
+                       "hslider_fg_dn.png",
+                       "hslider_bg_up.png",
+                       "hslider_bg_hi.png",
+                       "hslider_bg_dn.png");
+       for( int i=0; i<6; ++i )
+               resources->vertical_slider_data[i]->rotate90();
+
        resources->progress_images = new_image_set(2,
                        "progress_bg.png",
                        "progress_hi.png");
index 90c94ae00817bcbe7403c66ca6ee129cdbfb1637..57ada334709ab0e6095128f7c67d0eeca38870d9 100644 (file)
@@ -338,6 +338,16 @@ void HULKTHEME::initialize()
                        "hslider_bg_up.png",
                        "hslider_bg_hi.png",
                        "hslider_bg_dn.png");
+       resources->vertical_slider_data = new_image_set(6,
+                       "hslider_fg_up.png",
+                       "hslider_fg_hi.png",
+                       "hslider_fg_dn.png",
+                       "hslider_bg_up.png",
+                       "hslider_bg_hi.png",
+                       "hslider_bg_dn.png");
+       for( int i=0; i<6; ++i )
+               resources->vertical_slider_data[i]->rotate90();
+
        resources->progress_images = new_image_set(2,
                        "progress_bg.png",
                        "progress_hi.png");
index 97234bc6140f8b6b7817515e5dfac436d3984e0c..926b94294dd444e8069e46157e426e436621411b 100644 (file)
@@ -323,6 +323,16 @@ void PINKLADY::initialize()
                        "hslider_bg_up.png",
                        "hslider_bg_hi.png",
                        "hslider_bg_dn.png");
+       resources->vertical_slider_data = new_image_set(6,
+                       "hslider_fg_up.png",
+                       "hslider_fg_hi.png",
+                       "hslider_fg_dn.png",
+                       "hslider_bg_up.png",
+                       "hslider_bg_hi.png",
+                       "hslider_bg_dn.png");
+       for( int i=0; i<6; ++i )
+               resources->vertical_slider_data[i]->rotate90();
+
        resources->progress_images = new_image_set(2,
                        "progress_bg.png",
                        "progress_hi.png");
index b45a18e434dd6230b7eb00c3a70fdf6d12e3efae..bd7a163fb284c2af2a53a1cc39fe2305f6e93994 100644 (file)
@@ -336,6 +336,16 @@ void SUV::initialize()
                        "hslider_bg_up.png",
                        "hslider_bg_hi.png",
                        "hslider_bg_dn.png");
+       resources->vertical_slider_data = new_image_set(6,
+                       "hslider_fg_up.png",
+                       "hslider_fg_hi.png",
+                       "hslider_fg_dn.png",
+                       "hslider_bg_up.png",
+                       "hslider_bg_hi.png",
+                       "hslider_bg_dn.png");
+       for( int i=0; i<6; ++i )
+               resources->vertical_slider_data[i]->rotate90();
+
        resources->progress_images = new_image_set(2,
                        "progress_bg.png",
                        "progress_hi.png");
index 27140de16ef1324d691ab633e1aa1e98885edb7b..699ae0b6df986119c97870e19bfcf4e5e9860d31 100644 (file)
@@ -332,6 +332,16 @@ void UNFLATTHEME::initialize()
                        "hslider_bg_up.png",
                        "hslider_bg_hi.png",
                        "hslider_bg_dn.png");
+       resources->vertical_slider_data = new_image_set(6,
+                       "hslider_fg_up.png",
+                       "hslider_fg_hi.png",
+                       "hslider_fg_dn.png",
+                       "hslider_bg_up.png",
+                       "hslider_bg_hi.png",
+                       "hslider_bg_dn.png");
+       for( int i=0; i<6; ++i )
+               resources->vertical_slider_data[i]->rotate90();
+
        resources->progress_images = new_image_set(2,
                        "progress_bg.png",
                        "progress_hi.png");