build tweaks for fc30, glFinish fix
authorGood Guy <good1.2guy@gmail.com>
Fri, 3 May 2019 01:50:29 +0000 (19:50 -0600)
committerGood Guy <good1.2guy@gmail.com>
Fri, 3 May 2019 01:50:29 +0000 (19:50 -0600)
cinelerra-5.1/blds/bld_prepare.sh
cinelerra-5.1/cinelerra/canvas.C
cinelerra-5.1/cinelerra/cwindowgui.C
cinelerra-5.1/cinelerra/mwindow.C
cinelerra-5.1/cinelerra/mwindowedit.C
cinelerra-5.1/cinelerra/playback3d.C
cinelerra-5.1/cinelerra/playback3d.h
cinelerra-5.1/cinelerra/trackcanvas.C
cinelerra-5.1/cinelerra/vdevicex11.C
cinelerra-5.1/configure.ac

index 7c1eec8..b82c516 100755 (executable)
@@ -35,6 +35,9 @@ case "$dir" in
     yum -y install /tmp/$yasm
     rm -f /tmp/$yasm
   ;;
+#"fedora30")
+#  dnf group install "Development Tools"
+#  ... lzma-sdk-devel ...
 "fedora")
   dnf install groups "Development Tools"
   dnf -y --best --allowerasing \
@@ -51,7 +54,7 @@ case "$dir" in
     ivtv-firmware libvorbis-devel texinfo xz-devel lzma-devel cmake git \
     ctags patch gcc-c++ perl-XML-XPath libtiff-devel python dvdauthor \
     gettext-devel inkscape udftools autoconf automake numactl-devel \
-    jbigkit-devel libvdpau-devel libva-devel gtk2-devel
+    jbigkit-devel libvdpau-devel libva-devel gtk2-devel mesa-vdpau-drivers
   ;;
 "suse" | "leap")
   zypper -n install nasm gcc gcc-c++ zlib-devel texinfo libpng16-devel \
index d536cb1..707c95c 100644 (file)
@@ -731,7 +731,6 @@ void Canvas::create_canvas()
        int video_on = 0;
        lock_canvas("Canvas::create_canvas");
 
-
        if(!get_fullscreen())
 // Enter windowed
        {
@@ -891,7 +890,6 @@ void Canvas::update_refresh(VideoDevice *device, VFrame *output_frame)
        if( use_opengl ) {
                get_canvas()->unlock_window();
                unlock_canvas();
-
                mwindow->playback_3d->copy_from(this, refresh_frame, output_frame, 0);
                lock_canvas(" Canvas::output_refresh");
                get_canvas()->lock_window(" Canvas::output_refresh");
index b62bd09..7b3e919 100644 (file)
@@ -1128,20 +1128,11 @@ void CWindowCanvas::draw_refresh(int flush)
        if( get_canvas() && !get_canvas()->get_video_on() ) {
                clear(0);
                if( mwindow->uses_opengl() ) {
-                       get_canvas()->unlock_window();
-                       get_canvas()->flush();
-                       get_canvas()->sync_display();
 // this code is to idle rendering before drawing overlays on refresh frame
 // if this is not done, occationally opengl finishs late, and overwrites
 // the x11 refresh frame and the overlay is not visible.  Rarely happens.
-// bug in gl libs may segv if glfinish is called, workaround is no finish
-                       static int cin_finish = -1;
-                       if( cin_finish < 0 ) {
-                               const char *cp = getenv("CIN_FINISH");
-                               cin_finish = !cp ? 1 : atoi(cp);
-                       }
-                       if( cin_finish )
-                               mwindow->playback_3d->finish_output();
+                       get_canvas()->unlock_window();
+                       mwindow->playback_3d->finish_output(this);
                        get_canvas()->lock_window("CWindowCanvas::draw_refresh");
                }
                if( refresh_frame && refresh_frame->get_w()>0 && refresh_frame->get_h()>0 ) {
index e86eb4b..d563ca6 100644 (file)
@@ -3629,9 +3629,7 @@ void MWindow::update_project(int load_mode)
        gui->unlock_window();
        init_brender();
 
-       cwindow->gui->lock_window("MWindow::update_project 1");
        cwindow->update(0, 0, 1, 1, 1);
-       cwindow->gui->unlock_window();
 
        if(debug) PRINT_TRACE
 
index ebcaeb5..fc0ee88 100644 (file)
@@ -1982,8 +1982,8 @@ void MWindow::redo_entry(BC_WindowBase *calling_window_gui)
        gui->update(1, FORCE_REDRAW, 1, 1, 1, 1, 1);
        gui->update_proxy_toggle();
        gui->unlock_window();
-       cwindow->update(1, 1, 1, 1, 1);
        cwindow->gui->unlock_window();
+       cwindow->update(1, 1, 1, 1, 1);
 
        for( int i=0; i < vwindows.size(); ++i ) {
                if( vwindows.get(i)->is_running() ) {
@@ -2257,8 +2257,8 @@ void MWindow::undo_entry(BC_WindowBase *calling_window_gui)
        gui->update(1, FORCE_REDRAW, 1, 1, 1, 1, 1);
        gui->update_proxy_toggle();
        gui->unlock_window();
-       cwindow->update(1, 1, 1, 1, 1);
        cwindow->gui->unlock_window();
+       cwindow->update(1, 1, 1, 1, 1);
 
        for( int i=0; i<vwindows.size(); ++i ) {
                if( vwindows.get(i)->is_running() ) {
index 24f8cf7..0f5e84f 100644 (file)
@@ -769,16 +769,24 @@ void Playback3D::init_frame(Playback3DCommand *command, int is_yuv)
 }
 
 
-void Playback3D::finish_output()
+void Playback3D::finish_output(Canvas *canvas)
 {
        Playback3DCommand command;
+       command.canvas = canvas;
        command.command = Playback3DCommand::FINISH_OUTPUT;
        send_command(&command);
 }
 
 void Playback3D::finish_output_sync(Playback3DCommand *command)
 {
-       glFinish();
+#ifdef HAVE_GL
+       command->canvas->lock_canvas("Playback3D::clear_output_sync");
+       if( command->canvas->get_canvas() ) {
+               command->canvas->get_canvas()->enable_opengl();
+               glFinish();
+       }
+       command->canvas->unlock_canvas();
+#endif
 }
 
 
index 1f3dd59..6a38d7a 100644 (file)
@@ -280,7 +280,7 @@ public:
        void clear_output(Canvas *canvas, VFrame *output);
 
 // Finish all active opengl requests
-       void finish_output();
+       void finish_output(Canvas *canvas);
 
        void do_fade(Canvas *canvas, VFrame *frame, float fade);
        void convert_cmodel(Canvas *canvas, VFrame *output, int dst_cmodel);
index 52eab8b..97fe7a2 100644 (file)
@@ -3880,7 +3880,6 @@ int TrackCanvas::render_handle_frame(EDL *edl, int64_t pos, int mode)
                delete video_cache;
                mwindow->cwindow->gui->lock_window("TrackCanvas::render_handle_frame 0");
                Canvas *canvas = mwindow->cwindow->gui->canvas;
-               canvas->lock_canvas("TrackCanvas::render_handle_frame 1");
                int w = canvas->w, h = canvas->h, w2 = w/2, h2 = h/2;
                int lx = 0, ly = h2/2, rx = w2, ry = h2/2;
                BC_WindowBase *window = canvas->get_canvas();
@@ -3889,7 +3888,6 @@ int TrackCanvas::render_handle_frame(EDL *edl, int64_t pos, int mode)
                window->draw_vframe(&vlt, lx,ly, w2,h2, 0,0,vlt.get_w(),vlt.get_h());
                window->draw_vframe(&vrt, rx,ry, w2,h2, 0,0,vrt.get_w(),vrt.get_h());
                window->flash(1);
-               canvas->unlock_canvas();
                mwindow->cwindow->gui->unlock_window();
                break; }
        case 1:
index c43f1c0..8cd64fe 100644 (file)
@@ -144,8 +144,11 @@ int VDeviceX11::close_all()
                if( output_frame ) {
                        output->update_refresh(device, output_frame);
 // if the last frame is good, don't draw over it
-                       if( !video_on || output->need_overlays() )
+                       if( !video_on || output->need_overlays() ) {
+                               output->unlock_canvas();
                                output->draw_refresh(1);
+                               output->lock_canvas("VDeviceX11::close_all 2");
+                       }
                }
        }
 
index bb41ed9..408ed8e 100644 (file)
@@ -11,7 +11,9 @@ AC_PROG_CXX
 CFG_CFLAGS+=" -fno-omit-frame-pointer -fno-math-errno -fno-signed-zeros"
 CFG_CFLAGS+=" -pthread -Wall"
 # misguided pedantic warnings
+#  this is extra work, not a gain...
 CFG_CFLAGS+=" -Wno-unknown-warning"
+CFG_CFLAGS+=" -Wno-attributes"
 CFG_CFLAGS+=" -Wno-unused-result"
 CFG_CFLAGS+=" -Wno-stringop-overflow"
 CFG_CFLAGS+=" -Wno-format-truncation"