build tweaks for fc30, glFinish fix
authorGood Guy <[email protected]>
Fri, 3 May 2019 01:50:29 +0000 (19:50 -0600)
committerGood Guy <[email protected]>
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 7c1eec8179b472adfafc9d70f6ebc473979543b7..b82c51692babc83f2519928bf6b3847f512f3db2 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 d536cb1f21a3f5afbce4d32154225f1b39e989d6..707c95c0412c8e95cf72ea85111b16d7099baba2 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 b62bd09bba03219887937855380c35394a8ed27d..7b3e919829b2edc1edc41c0d697ccd7745ccbc3c 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 e86eb4b8dfadeb9a9c1e23b3aec4659a1857470b..d563ca69d803faf141387cfd11323fb18c06343c 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 ebcaeb5109457310f75620c2ed57fe1406a90195..fc0ee88ed681c098b8eb70965ddc277f306f4a02 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 24f8cf7032fc6dc93a8a5c9fc24b5e40b646d8b5..0f5e84fe559000f7db3d9d938b349ce4ea1112d6 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 1f3dd59a4ef2f91c282e6cd119df76549af4e6c3..6a38d7aa57b93dc3c9f5e9cf75cba70df2e41dfa 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 52eab8b9e410068235ed347052389d289887e575..97fe7a27883eb136660f2466c32ac99180e9f6c7 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 c43f1c04de0374e81f8445278d4a6b1062fd8c4c..8cd64fe67f9ce485e7fe6b704c5c593daac2c5da 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 bb41ed93689666eba9182f6fe5d7cc2b329e9fba..408ed8e73c702c6cb5d078dd701c436030f612be 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"