add auto zoombar/status color, fix 3 batchrender boobies, rotate plugin tweaks, add...
authorGood Guy <[email protected]>
Fri, 22 Feb 2019 23:07:20 +0000 (16:07 -0700)
committerGood Guy <[email protected]>
Fri, 22 Feb 2019 23:07:20 +0000 (16:07 -0700)
21 files changed:
cinelerra-5.1/blds/PKGBUILD
cinelerra-5.1/blds/bld_prepare.sh
cinelerra-5.1/cinelerra/affine.C
cinelerra-5.1/cinelerra/batchrender.C
cinelerra-5.1/cinelerra/localsession.C
cinelerra-5.1/cinelerra/localsession.h
cinelerra-5.1/cinelerra/mwindow.C
cinelerra-5.1/cinelerra/mwindowedit.C
cinelerra-5.1/cinelerra/render.C
cinelerra-5.1/cinelerra/render.h
cinelerra-5.1/cinelerra/trackcanvas.C
cinelerra-5.1/cinelerra/trackcanvas.h
cinelerra-5.1/cinelerra/wwindow.C
cinelerra-5.1/cinelerra/zoombar.C
cinelerra-5.1/cinelerra/zoombar.h
cinelerra-5.1/configure.ac
cinelerra-5.1/guicast/bcpopupmenu.C
cinelerra-5.1/guicast/bcpopupmenu.h
cinelerra-5.1/guicast/bctoggle.C
cinelerra-5.1/plugins/rotate/rotate.C
cinelerra-5.1/po/de.po

index d1b88827ae4f5b0d9c84a32656c20be035ad36e2..c1122712b4fca688e83b3fb2003aca47fbceb9bd 100644 (file)
@@ -10,7 +10,7 @@ DEPENDS=( 'alsa-lib' 'atk' 'bzip2' 'cairo' 'expat' 'fftw' 'flac'
  'fontconfig' 'freetype2' 'fribidi' 'gcc-libs' 'gdk-pixbuf2'
  'glib2' 'glibc' 'glu' 'graphite' 'gtk2' 'harfbuzz' 'libavc1394'
  'libdatrie' 'libdv' 'libffi' 'libglvnd' 'libiec61883' 'libjpeg-turbo'
- 'libogg' 'libpng' 'libraw1394' 'libsndfile' 'libthai'
+ 'libogg' 'libpng' 'libraw1394' 'libsndfile' 'libthai' 'libusb'
  'libtheora' 'libtiff' 'libutil-linux' 'libvdpau' 'libvorbis'
  'libvpx' 'libx11' 'libxau' 'libxcb' 'libxcomposite' 'libxcursor'
  'libxdamage' 'libxdmcp' 'libxext' 'libxfixes' 'libxft' 'libxi'
index 471ea7e9ca81d4790d257c9bfd89589a421074f0..c79c8ef545350763577db9611d19203a2893305c 100755 (executable)
@@ -15,7 +15,7 @@ dir="$1"
 
 case "$dir" in
 "centos")
-  yum -y install nasm libavc1394-devel libusb-devel flac-devel \
+  yum -y install nasm libavc1394-devel libusbx-devel flac-devel \
     libjpeg-devel libdv-devel libdvdnav-devel libdvdread-devel \
     libtheora-devel libiec61883-devel uuid-devel giflib-devel \
     ncurses-devel ilmbase-devel fftw-devel OpenEXR-devel \
@@ -38,7 +38,7 @@ case "$dir" in
 "fedora")
   dnf install groups "Development Tools"
   dnf -y --best --allowerasing \
-    install nasm yasm libavc1394-devel libusb-devel flac-devel \
+    install nasm yasm libavc1394-devel libusbx-devel flac-devel \
     libjpeg-devel libdv-devel libdvdnav-devel libdvdread-devel \
     libtheora-devel libiec61883-devel esound-devel uuid-devel \
     giflib-devel ncurses-devel ilmbase-devel fftw-devel OpenEXR-devel \
@@ -62,7 +62,8 @@ case "$dir" in
     libdvdnav-devel libdvdread-devel libiec61883-devel libuuid-devel \
     ilmbase-devel fftw3-devel libsndfile-devel libtheora-devel flac-devel \
     libtiff-devel inkscape cmake patch libnuma-devel lzma-devel udftools git \
-    yasm autoconf automake rpm-build libjbig-devel libvdpau-devel gtk2-devel
+    yasm autoconf automake rpm-build libjbig-devel libvdpau-devel gtk2-devel \
+    libusb-1_0-devel
     if [ ! -f /usr/lib64/libtermcap.so ]; then
       ln -s libtermcap.so.2 /usr/lib64/libtermcap.so
     fi
@@ -73,7 +74,7 @@ case "$dir" in
     texinfo libpng12-dev freeglut3-dev libxv-dev libasound2-dev libbz2-dev \
     libncurses5-dev libxinerama-dev libfreetype6-dev libxft-dev libgif-dev \
     libtiff5-dev exuberant-ctags ttf-bitstream-vera xfonts-75dpi xfonts-100dpi \
-    fonts-dejavu libopenexr-dev festival libfftw3-dev gdb \
+    fonts-dejavu libopenexr-dev festival libfftw3-dev gdb libusb-1.0-0-dev \
     libdc1394-22-dev libflac-dev libjbig-dev libvdpau-dev \
     inkscape libsndfile1-dev libtheora-dev cmake udftools libxml2-utils git \
     autoconf automake debhelper libgtk2.0-dev
@@ -86,7 +87,7 @@ case "$dir" in
     libncurses5-dev libxinerama-dev libfreetype6-dev libxft-dev libgif-dev \
     libtiff5-dev exuberant-ctags ttf-bitstream-vera xfonts-75dpi xfonts-100dpi \
     fonts-dejavu libopenexr-dev libavc1394-dev festival-dev fftw3-dev gdb \
-    libdc1394-22-dev libiec61883-dev libflac-dev libjbig-dev \
+    libdc1394-22-dev libiec61883-dev libflac-dev libjbig-dev libusb-1.0-0-dev \
     libvdpau-dev libsndfile1-dev libtheora-dev cmake udftools libxml2-utils \
     git inkscape autoconf automake debhelper libgtk2.0-dev
   ;;
index a59d6e3ee9997372f5b9c4eede18f44ac0d96a17..25af1c983a7d0493f429b8a5ee98bfa9d6411c04 100644 (file)
@@ -811,10 +811,10 @@ void AffineEngine::rotate(VFrame *output,
 
 // All subscripts are clockwise around the quadrangle
        angle = angle * 2 * M_PI / 360;
-       double angle1 = atan((double)(in_pivot_y - in_y) / (double)(in_pivot_x - in_x)) + angle;
-       double angle2 = atan((double)(in_x + in_w - in_pivot_x) / (double)(in_pivot_y - in_y)) + angle;
-       double angle3 = atan((double)(in_y + in_h - in_pivot_y) / (double)(in_x + in_w - in_pivot_x)) + angle;
-       double angle4 = atan((double)(in_pivot_x - in_x) / (double)(in_y + in_h - in_pivot_y)) + angle;
+       double angle1 = atan2((double)(in_pivot_y - in_y), (double)(in_pivot_x - in_x)) + angle;
+       double angle2 = atan2((double)(in_x + in_w - in_pivot_x), (double)(in_pivot_y - in_y)) + angle;
+       double angle3 = atan2((double)(in_y + in_h - in_pivot_y), (double)(in_x + in_w - in_pivot_x)) + angle;
+       double angle4 = atan2((double)(in_pivot_x - in_x), (double)(in_y + in_h - in_pivot_y)) + angle;
        double radius1 = DISTANCE(in_x, in_y, in_pivot_x, in_pivot_y);
        double radius2 = DISTANCE(in_x + in_w, in_y, in_pivot_x, in_pivot_y);
        double radius3 = DISTANCE(in_x + in_w, in_y + in_h, in_pivot_x, in_pivot_y);
index e8e5fc33a863b6448a0c8c991b34b002397dda2b..d67b6ad1a5342b921c61ad54476768c208dda304 100644 (file)
@@ -398,23 +398,26 @@ int BatchRenderThread::test_edl_files()
                FILE *fp = fopen(path, "r");
                if( fp ) {
                        if( warn && mwindow && !is_script ) {
-                               fseek(fp, 0, SEEK_END);
-                               int64_t sz = ftell(fp);
-                               fseek(fp, 0, SEEK_SET);
-                               char *bfr = new char[sz+1];
-                               int64_t len = fread(bfr, 1, sz+1, fp);
-                               if( len == sz ) {
-                                       FileXML file;
-                                       XMLBuffer data(bfr, len, 0);
-                                       file.set_shared_input(&data);
+                               char *bfr = 0;  size_t sz = 0;
+                               struct stat st;
+                               if( !fstat(fileno(fp), &st) ) {
+                                       sz = st.st_size;
+                                       bfr = new char[sz+1];
+                                       if( fread(bfr, 1, sz+1, fp) != sz )
+                                               ret = 1;
+                                       else
+                                               bfr[sz] = 0;
+                               }
+                               if( !ret ) {
                                        EDL *edl = new EDL; edl->create_objects();
-                                       edl->load_xml(&file, LOAD_ALL);
+                                       XMLBuffer data(bfr, sz, 0);
+                                       { FileXML file;
+                                       file.set_shared_input(&data);
+                                       edl->load_xml(&file, LOAD_ALL); }
                                        double pos = edl->equivalent_output(mwindow->edl);
                                        if( pos >= 0 ) ++not_equiv;
                                        edl->remove_user();
                                }
-                               else
-                                       ret = 1;
                                delete [] bfr;
                        }
                        fclose(fp);
@@ -1047,7 +1050,9 @@ void BatchRenderSaveList::run()
        int result2 = filewindow.run_window();
        if( !result2 ) {
                strcpy(thread->batch_path, filewindow.get_submitted_path());
+               thread->gui->lock_window("BatchRenderSaveList::run");
                thread->gui->batch_path->update(thread->batch_path);
+               thread->gui->unlock_window();
                thread->mwindow->defaults->update("DEFAULT_BATCHLOADPATH", thread->batch_path);
                thread->save_jobs(thread->batch_path);
        }
index 9556dce3d6ebd693e6b3d5dde01230e6d552d179..0465795f50dd7bdb12ebc88a9e5c66af58f28b83 100644 (file)
@@ -101,6 +101,7 @@ LocalSession::LocalSession(EDL *edl)
        automation_maxs[AUTOGROUPTYPE_INT255] = 255;
 
        zoombar_showautotype = AUTOGROUPTYPE_AUDIO_FADE;
+       zoombar_showautocolor = -1;
 
        floatauto_type = FloatAuto::SMOOTH;
 
index ecf48b620a259ee2f4aaaa0ea5bd59939c8c4ba5..d43b6353f0f90f3b31dd969df0c0c49c1709fd08 100644 (file)
@@ -102,7 +102,7 @@ public:
 
        float automation_mins[AUTOGROUPTYPE_COUNT];
        float automation_maxs[AUTOGROUPTYPE_COUNT];
-       int zoombar_showautotype;
+       int zoombar_showautotype, zoombar_showautocolor;
 // Default type of float keyframe
        int floatauto_type;
 
index e6a40ee551bb01059bb985e9a99f17c2b43f71f7..6d4c8fb81ff7a68d81b25f6462c980de6c6d07a2 100644 (file)
@@ -249,6 +249,10 @@ MWindow::~MWindow()
        run_lock->lock("MWindow::~MWindow");
        in_destructor = 1;
 //printf("MWindow::~MWindow %d\n", __LINE__);
+       if( wwindow && wwindow->is_running() )
+               wwindow->close_window();
+       if( twindow && twindow->is_running() )
+               twindow->close_window();
        gui->remote_control->deactivate();
        gui->record->stop();
 #ifdef HAVE_DVB
@@ -286,16 +290,12 @@ MWindow::~MWindow()
        if( cwindow && cwindow->gui ) cwindow->gui->close(0);
        if( lwindow && lwindow->gui ) lwindow->gui->close(0);
        if( gwindow && gwindow->gui ) gwindow->gui->close(0);
-       if( twindow && twindow->is_running() ) twindow->close_window();
-       if( wwindow && wwindow->is_running() ) wwindow->close_window();
        vwindows.remove_all_objects();
        zwindows.remove_all_objects();
        gui->close(0);
        if( awindow ) awindow->join();
        if( cwindow ) cwindow->join();
        if( lwindow ) lwindow->join();
-       if( twindow ) twindow->join();
-       if( wwindow ) wwindow->join();
        if( gwindow ) gwindow->join();
        join();
 #else
@@ -307,8 +307,6 @@ MWindow::~MWindow()
        close_gui(cwindow);
        close_gui(lwindow);
        close_gui(gwindow);
-       close_gui(twindow);
-       close_gui(wwindow);
        vwindows.remove_all_objects();
        zwindows.remove_all_objects();
        gui->close(0);
index 17e74a90869d2df3c2f0faf95c12e71063ea8b8b..64c54eb15c08e3997bda64e391e604a8ad371df9 100644 (file)
@@ -862,6 +862,9 @@ void MWindow::finish_modify_handles()
        double position = -1;
        switch( edit_mode ) {
        case MOVE_RIPPLE:
+               position = !session->drag_handle ?
+                       session->drag_start : session->drag_position;
+               break;
        case MOVE_ROLL:
        case MOVE_SLIDE:
                position = session->drag_position;
index 7bfb1f768beee8bf890ea537f187264684522a8b..0398ccf095854e5dbd77cc7b9eb286be03b490d7 100644 (file)
@@ -661,6 +661,7 @@ RenderThread::RenderThread(MWindow *mwindow, Render *render)
 {
        this->mwindow = mwindow;
        this->render = render;
+       render_frames = 0;
 }
 
 RenderThread::~RenderThread()
@@ -672,7 +673,7 @@ void RenderThread::render_single(int test_overwrite, Asset *asset, EDL *edl,
        int strategy, int range_type)
 {
 // Total length in seconds
-       double total_length;
+       double total_length = 0;
        RenderFarmServer *farm_server = 0;
        FileSystem fs;
        const int debug = 0;
@@ -737,6 +738,7 @@ void RenderThread::render_single(int test_overwrite, Asset *asset, EDL *edl,
                        render->result = 1;
                }
        }
+       render_frames = render->default_asset->frame_rate * total_length;
 
 // Generate packages
        if(!render->result)
@@ -807,26 +809,16 @@ void RenderThread::render_single(int test_overwrite, Asset *asset, EDL *edl,
 
 // Perform local rendering
 
-
        if(!render->result)
        {
                render->start_progress();
 
-
-
-
                MainPackageRenderer package_renderer(render);
                render->result = package_renderer.initialize(mwindow,
                                command->get_edl(),   // Copy of master EDL
                                render->preferences,
                                render->default_asset);
 
-
-
-
-
-
-
                while(!render->result)
                {
 // Get unfinished job
@@ -856,14 +848,8 @@ void RenderThread::render_single(int test_overwrite, Asset *asset, EDL *edl,
 
                } // file_number
 
-
-
 printf("Render::render_single: Session finished.\n");
 
-
-
-
-
                if( strategy == SINGLE_PASS_FARM ||
                    strategy == FILE_PER_LABEL_FARM ) {
                        if( !render->progress ) {
@@ -904,11 +890,9 @@ if(debug) printf("Render::render %d\n", __LINE__);
 
 // Delete the progress box
                render->stop_progress();
-
 if(debug) printf("Render::render %d\n", __LINE__);
        }
 
-
 // Paste all packages into timeline if desired
 
        if(!render->result &&
@@ -988,6 +972,8 @@ if(debug) printf("Render::render %d\n", __LINE__);
 
 void RenderThread::run()
 {
+       Timer render_timer;
+
        if( mwindow )
                render->preferences->copy_from(mwindow->preferences);
 
@@ -1071,6 +1057,10 @@ void RenderThread::run()
                }
        }
        render->completion->unlock();
+       double render_time = render_timer.get_difference() / 1000.0;
+       double render_rate = render_time > 0 ? render_frames / render_time : 0;
+       printf("** rendered %jd frames in %0.3f secs, %0.3f fps\n",
+               render_frames, render_time, render_rate);
 
        if( render->mode == Render::INTERACTIVE && render->beep )
                mwindow->beep(3000., 1.5, 0.5);
index aa7b652b18d107a274591528222f7b3c7b0b704f..d7f57d23ca8c92868aea42f2f0a784a21b6855bd 100644 (file)
@@ -228,6 +228,7 @@ public:
 
        MWindow *mwindow;
        Render *render;
+       int64_t render_frames;
 };
 
 class RenderToTracks;
index bc34475653aef2daed0a3e791f1fdd2df24097d6..b9dd38841d4c7562a92849b52632ffcdd4457bbb 100644 (file)
@@ -2227,10 +2227,9 @@ int TrackCanvas::do_keyframes(int cursor_x,
 
                                                if( !result && buttonpress && i == AUTOMATION_SPEED )
                                                        mwindow->speed_after(-1);
-                                               int current_grouptype = mwindow->edl->local_session->zoombar_showautotype;
-                                               if( result && buttonpress && grouptype != current_grouptype ) {
-                                                       mwindow->edl->local_session->zoombar_showautotype = grouptype;
-                                                       mwindow->gui->zoombar->update_autozoom();
+                                               if( result && buttonpress ) {
+                                                       int color = GWindowGUI::auto_colors[i];
+                                                       mwindow->gui->zoombar->update_autozoom(grouptype, color);
                                                }
                                                break; }
 
@@ -2337,7 +2336,6 @@ int TrackCanvas::do_keyframes(int cursor_x,
                new_cursor = UPRIGHT_ARROW_CURSOR;
        }
 
-
        return result;
 }
 
@@ -4035,7 +4033,8 @@ int TrackCanvas::update_drag_floatauto(int cursor_x, int cursor_y)
                        float change = value - old_value;
                        current->adjust_to_new_coordinates(position, value);
                        update_ganged_autos(change, current->autos->track, current);
-                       show_message(current, 1,", %.2f", current->get_value());
+                       int color = GWindowGUI::auto_colors[current->autos->autoidx];
+                       show_message(current, color, ", %.2f", current->get_value());
                }
                break;
 
@@ -4054,7 +4053,8 @@ int TrackCanvas::update_drag_floatauto(int cursor_x, int cursor_y)
                                value * levered_position(position - current->position,
                                                         current->get_control_in_position()));
                        update_ganged_autos(0, current->autos->track, current);
-                       show_message(current, 1,", %.2f", current->get_control_in_value());
+                       int color = GWindowGUI::auto_colors[current->autos->autoidx];
+                       show_message(current, color, ", %.2f", current->get_control_in_value());
                }
                break; }
 
@@ -4068,7 +4068,8 @@ int TrackCanvas::update_drag_floatauto(int cursor_x, int cursor_y)
                                value * levered_position(position - current->position,
                                                         current->get_control_out_position()));
                        update_ganged_autos(0, current->autos->track, current);
-                       show_message(current, 1,", %.2f", current->get_control_out_value());
+                       int color = GWindowGUI::auto_colors[current->autos->autoidx];
+                       show_message(current, color, ", %.2f", current->get_control_out_value());
                }
                break; }
        }
@@ -4088,7 +4089,7 @@ int TrackCanvas::update_drag_toggleauto(int cursor_x, int cursor_y)
                result = 1;
                current->value = value;
                current->position = position;
-               show_message(current, 0,", %d", current->value);
+               show_message(current, -1, ", %d", current->value);
        }
 
        return result;
@@ -4105,7 +4106,7 @@ int TrackCanvas::update_drag_auto(int cursor_x, int cursor_y)
        {
                result = 1;
                current->position = position;
-               show_message(current, 0,"");
+               show_message(current, -1, "");
 
                double position_f = current->autos->track->from_units(current->position);
                double center_f = (mwindow->edl->local_session->get_selectionstart(1) +
@@ -4169,7 +4170,7 @@ int TrackCanvas::update_drag_pluginauto(int cursor_x, int cursor_y)
                mwindow->session->track_highlighted = track;
                result = 1;
                current->position = position;
-               show_message(current, 0,"");
+               show_message(current, -1, "");
 
                double position_f = current->autos->track->from_units(current->position);
                double center_f = (mwindow->edl->local_session->get_selectionstart(1) +
@@ -4680,6 +4681,9 @@ int TrackCanvas::button_release_event()
                }
        }
 
+       if( mwindow->edl->local_session->zoombar_showautocolor >= 0 )
+               mwindow->gui->zoombar->update_autozoom(-1);
+
        if (result)
                cursor_update(0);
 
@@ -5275,7 +5279,7 @@ int TrackCanvas::button_press_event()
                        gui->stop_transport("TrackCanvas::button_press_event");
                }
 
-               int update_overlay = 0, update_cursor = 0, rerender = 0;
+               int update_overlay = 0, update_cursor = 0, rerender = 0, update_message = 0;
 
                if(get_buttonpress() == WHEEL_UP) {
                        if(shift_down())
@@ -5338,6 +5342,7 @@ int TrackCanvas::button_press_event()
 
                                if( do_tracks(cursor_x, cursor_y, 1) ) break;
 
+                               update_message = 1;
                                result = 0;
                        } while(0);
                        else if( ibeam_mode() ) do {
@@ -5370,6 +5375,7 @@ int TrackCanvas::button_press_event()
                                if( get_buttonpress() != LEFT_BUTTON ) break;
                                rerender = start_selection(position);
                                mwindow->session->current_operation = SELECT_REGION;
+                               update_message = 1;
                                update_cursor = 1;
                        } while(0);
                }
@@ -5383,9 +5389,12 @@ int TrackCanvas::button_press_event()
                        gui->update_patchbay();
                }
 
-               if( update_overlay ) {
+               if( update_message )
+                       gui->default_message();
+
+               if( update_overlay )
                        gui->draw_overlays(1);
-               }
+
                if( update_cursor < 0 ) {
 // double_click edit
                        gui->swindow->update_selection();
@@ -5462,11 +5471,11 @@ double TrackCanvas::time_visible()
 }
 
 
-void TrackCanvas::show_message(Auto *current, int show_curve_type, const char *fmt, ...)
+void TrackCanvas::show_message(Auto *current, int color, const char *fmt, ...)
 {
        char string[BCTEXTLEN];
        char *cp = string, *ep = cp + sizeof(string)-1;
-       if( show_curve_type ) {
+       if( color >= 0 ) {
                cp += snprintf(string, ep-cp, "%-8s ",
                        FloatAuto::curve_name(((FloatAuto*)current)->curve_mode));
        }
@@ -5482,7 +5491,7 @@ void TrackCanvas::show_message(Auto *current, int show_curve_type, const char *f
        va_start(ap, fmt);
        vsnprintf(cp, ep-cp, fmt, ap);
        va_end(ap);
-       gui->show_message(string);
+       gui->show_message(string, color);
 }
 
 // Patchbay* TrackCanvas::get_patchbay()
index 91641466069cbd5a2c8016b5da7ae98cd35ddc5b..578ebf26af1ead6aeecc0309486936a4ef8bc0df 100644 (file)
@@ -360,7 +360,7 @@ public:
        int update_drag_toggleauto(int cursor_x, int cursor_y);
        int update_drag_auto(int cursor_x, int cursor_y);
        int update_drag_pluginauto(int cursor_x, int cursor_y);
-       void show_message(Auto *current, int show_curve_type, const char *fmt, ...);
+       void show_message(Auto *current, int color, const char *fmt, ...);
 
 // Update status bar to reflect drag operation
        void update_drag_caption();
index 4f522f3179f099de3ee2622836771b6a3534a6eb..8bbc8352cf9a5ec33c4b1bcdbf7d2f2b1969e8b5 100644 (file)
@@ -32,6 +32,7 @@ WWindow::WWindow(MWindow *mwindow)
 {
        this->mwindow = mwindow;
        this->result = 0;
+       this->gui = 0;
 }
 
 WWindow::~WWindow()
@@ -59,7 +60,7 @@ BC_Window* WWindow::new_gui()
        BC_DisplayInfo display_info;
        int x = display_info.get_abs_cursor_x();
        int y = display_info.get_abs_cursor_y();
-       WWindowGUI *gui = new WWindowGUI(this, x, y);
+       gui = new WWindowGUI(this, x, y);
        gui->create_objects();
        return gui;
 }
index 38f18aeb4b5b8cde6b942f6b5d0ed6d19811ad54..79ecfd9cdf7da2bd319f77e06c9c3b93e22c954d 100644 (file)
@@ -148,9 +148,22 @@ int ZoomBar::draw()
 }
 
 void ZoomBar::update_autozoom()
+{
+       update_autozoom(mwindow->edl->local_session->zoombar_showautocolor);
+}
+
+void ZoomBar::update_autozoom(int grouptype, int color)
+{
+       mwindow->edl->local_session->zoombar_showautotype = grouptype;
+       update_autozoom(color);
+}
+
+void ZoomBar::update_autozoom(int color)
 {
        char string[BCTEXTLEN];
        int autogroup_type = mwindow->edl->local_session->zoombar_showautotype;
+       mwindow->edl->local_session->zoombar_showautocolor = color;
+       if( color < 0 ) color = get_resources()->default_text_color;
        switch( autogroup_type ) {
        case AUTOGROUPTYPE_AUDIO_FADE:
        case AUTOGROUPTYPE_VIDEO_FADE:
@@ -173,9 +186,10 @@ void ZoomBar::update_autozoom()
        }
        auto_zoom_text->update(string);
        const char *group_name = AutoTypeMenu::to_text(autogroup_type);
-       auto_type->set_text(group_name);
+       auto_type->set_text(group_name, color);
 }
 
+
 int ZoomBar::update()
 {
        sample_zoom->update(mwindow->edl->local_session->zoom_sample);
index 9026e31626731156cd30b6b6d7a186ff9fb4dece..6c95a3b1d1d7eec33a75d933e407ec86974a2dd5 100644 (file)
@@ -42,6 +42,8 @@ public:
        void redraw_time_dependancies();
        int update();          // redraw the current values
        void update_autozoom();
+       void update_autozoom(int grouptype, int color);
+       void update_autozoom(int color);
        int update_clocks();
        int update_playback(int64_t new_position);       // update the playback position
        int set_selection(int which_one);
index 0a6cd86b70efe0f95720ed8304bf5dd1fb17cb40..f3314df1044c14d503916e804c08a4617564a226 100644 (file)
@@ -54,7 +54,6 @@ CHECK_WITH([libzmpeg],[build libzmpeg],[LIBZMPEG],[yes])
 CHECK_WITH([commercial],[enable commercial capture],[COMMERCIAL],[yes])
 CHECK_WITH([thirdparty],[use thirdparty build],[CIN_3RDPARTY],[yes])
 CHECK_WITH([shuttle],[shuttle device],[SHUTTLE],[yes])
-CHECK_WITH([shuttle-usb],[use libusb for shuttle],[SHUTTLE_USB],[no])
 
 if test "x$WANT_LV2" != "xno"; then
   GTK2_LIBS=`pkg-config --libs gtk+-2.0`
@@ -577,12 +576,15 @@ CHECK_LIB([vdpau], [vdpau], [vdp_device_create_x11])
 AC_DEFUN([CHECK_WANT], [
 RESULT=yes
 # WANT_$1
-if test "x$WANT_$1" != "xyes" -a "x$WANT_$1" != "xno" ; then
+if test "x$WANT_$1" != "xno" ; then
 AC_ARG_WITH(m4_tolower([$1]),
  AC_HELP_STRING([m4_join([-],[--with],m4_tolower([$1]))], [$3] (auto)),
   [WANT_$1=$withval],[WANT_$1=$2])
  m4_quote($4)
  if test "x$RESULT" = "xno" -a "x$PKG_$1" = "x"; then
+  if test "x$WANT_$1" = "xyes" ; then
+    AC_MSG_ERROR([required for $1 support.])
+  fi
   echo "=== want $1 Failed."
   WANT_$1=no
  elif test "x$WANT_$1" = "xauto" ; then
@@ -638,6 +640,10 @@ CHECK_WANT([ESOUND], [no], [use esd], [
  CHECK_LIB([audiofile], [audiofile], [afOpenFile])
  CHECK_HEADERS([audiofile], [audiofile headers], [audiofile.h])])
 
+CHECK_WANT([SHUTTLE_USB], [yes], [use libusb-1.0], [
+ CHECK_LIB([libusbx], [usb-1.0], [libusb_init])
+ CHECK_HEADERS([libusbx], [libusb headers], [libusb-1.0/libusb.h])])
+
 CHECK_WANT([LV2], [auto], [use lv2], [
  saved_CFLAGS="$CFLAGS"
  CHECK_LIB([lilv], [lilv-0], [lilv_world_new])
@@ -850,8 +856,6 @@ echo "  using: with-noelision = $WANT_NOELISION"
 echo "  using: with-booby = $WANT_BOOBY"
 echo "  using: with-libzmpeg = $WANT_LIBZMPEG"
 echo "  using: with-commerical = $WANT_COMMERCIAL"
-echo "  using: with-shuttle = $WANT_SHUTTLE"
-echo "  using: with-shuttle-usb = $WANT_SHUTTLE_USB"
 echo ""
 echo "  using: thirdparty build = $WANT_CIN_3RDPARTY"
 echo "  using: single-user  = $WANT_CINBIN_BUILD"
@@ -875,9 +879,6 @@ fi
 if test "x$WANT_BOOBY" != "xno"; then
   CFG_CFLAGS+=" -DBOOBY"
 fi
-if test "x$WANT_SHUTTLE_USB" != "xno"; then
-  EXTRA_LIBS+=' -lusb-1.0'
-fi
 
 # intel lock elision bugs
 if test "x$WANT_NOELISION" != "xno"; then
index 2fb69d1cb2ecd8010a8b634a07691e8f6d0409d5..7ef71aec6d419ff487ace3979b0e4d7857e2fd84 100644 (file)
@@ -106,12 +106,12 @@ char* BC_PopupMenu::get_text()
        return text;
 }
 
-void BC_PopupMenu::set_text(const char *text)
+void BC_PopupMenu::set_text(const char *text, int color)
 {
        if(use_title)
        {
                strcpy(this->text, text);
-               draw_title(1);
+               draw_title(1, color);
        }
 }
 
@@ -230,7 +230,7 @@ BC_MenuItem* BC_PopupMenu::get_item(int i)
        return menu_popup->menu_items.values[i];
 }
 
-int BC_PopupMenu::draw_title(int flush)
+int BC_PopupMenu::draw_title(int flush, int color)
 {
        if(!use_title) return 0;
        BC_Resources *resources = get_resources();
@@ -240,7 +240,8 @@ int BC_PopupMenu::draw_title(int flush)
        draw_3segmenth(0, 0, w, images[status]);
 
 // Overlay text
-       set_color(get_resources()->popup_title_text);
+       if( color < 0 ) color = get_resources()->popup_title_text;
+       set_color(color);
        int offset = 0;
        if(status == BUTTON_DN)
                offset = 1;
index 1d683835c0d2f0020ae5e2904b0e79d22f6942ee..db79d20211d82aab797d50bd18c1e15eb052c292 100644 (file)
@@ -64,11 +64,11 @@ public:
        int total_items();
        BC_MenuItem* get_item(int i);
 // Set title of menu
-       void set_text(const char *text);
+       void set_text(const char *text, int color=-1);
 // Set icon of menu.  Disables text.
        void set_icon(BC_Pixmap *pixmap);
 // Draw title of menu
-       int draw_title(int flush);
+       int draw_title(int flush, int color=-1);
        int reposition_window(int x, int y);
        int deactivate();
        int activate_menu();
index 67af31ec4888534dd4b2c6332389b212e377938a..01832bd47d5a4ee37f2ce527ada1c1530dca175d 100644 (file)
@@ -97,7 +97,7 @@ void BC_Toggle::calculate_extents(BC_WindowBase *gui,
 
        if( caption ) {
                *text_w = gui->get_text_width(font, caption);
-               *text_h = gui->get_text_height(font);
+               *text_h = gui->get_text_height(font, caption);
 
                if( resources->toggle_highlight_bg ) {
                        *text_w += resources->toggle_text_margin * 2;
index de444618f1d51e9766ba96de16d037de2902c91c..7d578b7aabc4687f257631b0aac211a55e2e4470 100644 (file)
@@ -263,12 +263,7 @@ int RotateReset::handle_event()
 
 
 RotateWindow::RotateWindow(RotateEffect *plugin)
- : PluginClientWindow(plugin,
-       250,
-       230,
-       250,
-       230,
-       0)
+ : PluginClientWindow(plugin, 300, 230, 300, 230, 0)
 {
        this->plugin = plugin;
 }
@@ -279,59 +274,27 @@ void RotateWindow::create_objects()
 {
        int x = 10, y = 10;
        BC_Title *title;
-
-
-
        add_tool(new BC_Title(x, y, _("Rotate")));
-       x += 50;
-       y += 20;
-       add_tool(toggle0 = new RotateToggle(this,
-               plugin,
-               plugin->config.angle == 0,
-               x,
-               y,
-               0,
-               "0"));
-    x += RADIUS;
-    y += RADIUS;
-       add_tool(toggle90 = new RotateToggle(this,
-               plugin,
-               plugin->config.angle == 90,
-               x,
-               y,
-               90,
-               "90"));
-    x -= RADIUS;
-    y += RADIUS;
-       add_tool(toggle180 = new RotateToggle(this,
-               plugin,
-               plugin->config.angle == 180,
-               x,
-               y,
-               180,
-               "180"));
-    x -= RADIUS;
-    y -= RADIUS;
-       add_tool(toggle270 = new RotateToggle(this,
-               plugin,
-               plugin->config.angle == 270,
-               x,
-               y,
-               270,
-               "270"));
+       x += 50;  y += 20;
+       add_tool(toggle0 = new RotateToggle(this, plugin,
+               plugin->config.angle == 0, x, y, 0, "0"));
+    x += RADIUS;  y += RADIUS;
+       add_tool(toggle90 = new RotateToggle(this, plugin,
+               plugin->config.angle == 90, x, y, 90, "90"));
+    x -= RADIUS;  y += RADIUS;
+       add_tool(toggle180 = new RotateToggle(this, plugin,
+               plugin->config.angle == 180, x, y, 180, "180"));
+    x -= RADIUS;  y -= RADIUS;
+       add_tool(toggle270 = new RotateToggle(this, plugin,
+               plugin->config.angle == 270, x, y, 270, "270"));
 //     add_subwindow(bilinear = new RotateInterpolate(plugin, 10, y + 60));
-       x += 120;
-       y -= 50;
+       x += 150;  y -= 50;
        add_tool(fine = new RotateFine(this, plugin, x, y));
        y += fine->get_h() + 10;
        add_tool(text = new RotateText(this, plugin, x, y));
        y += 25;
        add_tool(new BC_Title(x, y, _("Degrees")));
 
-
-
-
-
        y += text->get_h() + 10;
        add_subwindow(title = new BC_Title(x, y, _("Pivot (x,y):")));
        y += title->get_h() + 10;
@@ -511,7 +474,7 @@ int RotateEffect::process_buffer(VFrame *frame,
 //printf("RotateEffect::process_buffer %d\n", __LINE__);
 
 
-       if(config.angle == 0)
+       if(config.angle == 0 && !config.draw_pivot)
        {
                read_frame(frame,
                        0,
@@ -574,13 +537,13 @@ int RotateEffect::process_buffer(VFrame *frame,
 #define DRAW_CENTER(components, type, max) \
 { \
        type **rows = (type**)get_output()->get_rows(); \
-       if( (center_x >= 0 && center_x < w) || (center_y >= 0 && center_y < h) ) \
+       if( (center_x >= 0 && center_x < w) && (center_y >= 0 && center_y < h) ) \
        { \
-               type *hrow = rows[center_y] + components * (center_x - CENTER_W / 2); \
                for(int i = center_x - CENTER_W / 2; i <= center_x + CENTER_W / 2; i++) \
                { \
                        if(i >= 0 && i < w) \
                        { \
+                               type *hrow = rows[center_y] + components * i; \
                                hrow[0] = max - hrow[0]; \
                                hrow[1] = max - hrow[1]; \
                                hrow[2] = max - hrow[2]; \
index 9f16c561be8c62a820a225b6f5d362a8318e8509..f9759d1e84987a62ac76ad17aee6f10701bde057 100644 (file)
@@ -11823,7 +11823,7 @@ msgstr "RGBShift"
 
 #: plugins/rotate/rotate.C:310
 msgid "Draw pivot"
-msgstr "Schwenkpunkt darstellen"
+msgstr "Schwenkpunkt\ndarstellen"
 
 #: plugins/rotate/rotate.C:503
 msgid "Degrees"