add configure with-clang, fix segv on asset_info nested edl, single frame preview...
authorGood Guy <[email protected]>
Fri, 13 Sep 2019 00:50:37 +0000 (18:50 -0600)
committerGood Guy <[email protected]>
Fri, 13 Sep 2019 00:50:37 +0000 (18:50 -0600)
cinelerra-5.1/cinelerra/assetedit.C
cinelerra-5.1/cinelerra/awindowgui.C
cinelerra-5.1/cinelerra/vwindowgui.C
cinelerra-5.1/configure.ac
cinelerra-5.1/thirdparty/Makefile

index 432b78c60dccdf08dcbdb9dea44de6a2f918d9db..609bc0f6f0d0d3a9d9c8fedcc5cbd1e9322463c2 100644 (file)
@@ -515,15 +515,16 @@ void AssetEditWindow::create_objects()
                        add_subwindow(title);
                        y += title->get_h() + 5;
                }
-
-               add_subwindow(title = new BC_Title(x1, y, _("Asset's interlacing:")));
-               ilacemode_to_text(string, asset->interlace_mode);
-               AssetEditILacemode *edit_ilace_mode;
-               add_subwindow(edit_ilace_mode = new AssetEditILacemode(this, string, x2, y, 160));
-               add_subwindow(new AssetEditInterlacemodePulldown(mwindow, edit_ilace_mode,
+               if( asset ) {
+                       add_subwindow(title = new BC_Title(x1, y, _("Asset's interlacing:")));
+                       ilacemode_to_text(string, asset->interlace_mode);
+                       AssetEditILacemode *edit_ilace_mode;
+                       add_subwindow(edit_ilace_mode = new AssetEditILacemode(this, string, x2, y, 160));
+                       add_subwindow(new AssetEditInterlacemodePulldown(mwindow, edit_ilace_mode,
                                &asset_edit->changed_params->interlace_mode,
                                (ArrayList<BC_ListBoxItem*>*)&mwindow->interlace_asset_modes,
                                x2 + edit_ilace_mode->get_w(), y));
+               }
        }
 
        add_subwindow(new BC_OKButton(this));
index 66e69c3bd873d769092624af39d32cfb95b377d1..c3147a462302cb646ee5c8b370365062894d8441 100644 (file)
@@ -912,17 +912,26 @@ void AssetPicon::create_objects()
        int picon_h = mwindow->preferences->awindow_picon_h;
        pixmap_h = picon_h * BC_WindowBase::get_resources()->icon_scale;
 
-       if( indexable ) {
+       Asset *asset = 0;
+       EDL *edl = 0;
+       int is_clip = 0;
+
+       if( this->indexable ) {
                fs.extract_name(name, indexable->path);
                set_text(name);
+               if( this->indexable->is_asset )
+                       asset = (Asset *)indexable;
+               else
+                       edl = (EDL *)indexable;
        }
-       else if( edl ) {
+       else if( this->edl ) {
+               edl = this->edl;
                set_text(strcpy(name, edl->local_session->clip_title));
                set_text(name);
+               is_clip = 1;
        }
 
-       if( indexable && indexable->is_asset ) {
-               Asset *asset = (Asset*)indexable;
+       if( asset ) {
                if( asset->video_data ) {
                        if( mwindow->preferences->use_thumbnails ) {
                                gui->unlock_window();
@@ -1067,13 +1076,7 @@ void AssetPicon::create_objects()
                comments_type = asset->format == FILE_FFMPEG ?
                                asset->vcodec : File::formattostr(asset->format);
        }
-       else
-       if( indexable && !indexable->is_asset ) {
-               icon = gui->video_icon;
-               icon_vframe = gui->video_vframe;
-       }
-       else
-       if( edl ) {
+       else if( edl ) {
                if( edl->tracks->playable_video_tracks() ) {
                        if( mwindow->preferences->use_thumbnails ) {
                                gui->unlock_window();
@@ -1081,7 +1084,7 @@ void AssetPicon::create_objects()
                                char clip_icon_path[BCTEXTLEN];
                                char *clip_icon = edl->local_session->clip_icon;
                                VFrame *vframe = 0;
-                               if( clip_icon[0] ) {
+                               if( is_clip && clip_icon[0] ) {
                                        snprintf(clip_icon_path, sizeof(clip_icon_path),
                                                "%s/%s", File::get_config_path(), clip_icon);
                                        vframe = VFramePng::vframe_png(clip_icon_path);
@@ -1107,7 +1110,7 @@ void AssetPicon::create_objects()
                                        close_render_engine();
                                        vframe = new VFrame(avt->vw, avt->vh, BC_RGB888);
                                        vframe->transfer_from(gui->temp_picon);
-                                       if( clip_icon[0] )
+                                       if( this->edl && clip_icon[0] )
                                                vframe->write_png(clip_icon_path);
                                }
                                pixmap_w = pixmap_h * width / height;
@@ -1121,10 +1124,14 @@ void AssetPicon::create_objects()
                                icon->draw_vframe(icon_vframe,
                                        0, 0, pixmap_w, pixmap_h, 0, 0);
                        }
-                       else {
+                       else if( is_clip ) {
                                icon = gui->clip_icon;
                                icon_vframe = gui->clip_vframe;
                        }
+                       else {
+                               icon = gui->video_icon;
+                               icon_vframe = gui->video_vframe;
+                       }
                }
                else
                if( edl->tracks->playable_audio_tracks() ) {
@@ -1132,7 +1139,7 @@ void AssetPicon::create_objects()
                                gui->unlock_window();
                                char clip_icon_path[BCTEXTLEN];
                                char *clip_icon = edl->local_session->clip_icon;
-                               if( clip_icon[0] ) {
+                               if( is_clip && clip_icon[0] ) {
                                        snprintf(clip_icon_path, sizeof(clip_icon_path),
                                                "%s/%s", File::get_config_path(), clip_icon);
                                        icon_vframe = VFramePng::vframe_png(clip_icon_path);
@@ -1168,7 +1175,8 @@ void AssetPicon::create_objects()
                                                        base_colors[i], line_colors[i]);
                                        }
                                        for( int i=0; i<channels; ++i ) delete samples[i];
-                                       if( clip_icon[0] ) icon_vframe->write_png(clip_icon_path);
+                                       if( is_clip && clip_icon[0] )
+                                               icon_vframe->write_png(clip_icon_path);
                                }
                                else {
                                        pixmap_w = icon_vframe->get_w();
@@ -1178,14 +1186,17 @@ void AssetPicon::create_objects()
                                icon->draw_vframe(icon_vframe,
                                        0, 0, pixmap_w, pixmap_h, 0, 0);
                        }
-                       else {
+                       else if( !indexable ) {
                                icon = gui->clip_icon;
                                icon_vframe = gui->clip_vframe;
                        }
+                       else {
+                               icon = gui->audio_icon;
+                               icon_vframe = gui->audio_vframe;
+                       }
                }
        }
-       else
-       if( plugin ) {
+       else if( plugin ) {
                strcpy(name, _(plugin->title));
                set_text(name);
                icon_vframe = plugin->get_picon();
@@ -1224,8 +1235,7 @@ void AssetPicon::create_objects()
                        }
                }
        }
-       else
-       if( label ) {
+       else if( label ) {
                Units::totext(name,
                              label->position,
                              mwindow->edl->session->time_format,
index bec67dc89c7c9b888678f71d8c51c6908541360e..062989a2523de2ed498ae69db891f6d4b36f15c6 100644 (file)
@@ -31,6 +31,7 @@
 #include "edl.h"
 #include "edlsession.h"
 #include "filesystem.h"
+#include "file.h"
 #include "filexml.h"
 #include "fonts.h"
 #include "keys.h"
@@ -241,8 +242,18 @@ void VWindowGUI::create_objects()
        canvas = new VWindowCanvas(mwindow, this);
        canvas->create_objects(mwindow->edl);
        canvas->use_vwindow();
-
-
+       char vsplash_path[BCTEXTLEN];
+       int vsplash_len = sizeof(vsplash_path)-1;
+       snprintf(vsplash_path, vsplash_len, "%s/vsplash.png", File::get_cindat_path());
+       VFrame *vsplash = VFramePng::vframe_png(vsplash_path);
+       if( vsplash ) {
+               BC_WindowBase *vcanvas = canvas->get_canvas();
+               vcanvas->draw_vframe(vsplash,
+                       0,0, vcanvas->get_w(), vcanvas->get_h(),
+                       0,0, vsplash->get_w(), vsplash->get_h(), 0);
+               vcanvas->flash(1);
+               delete vsplash;
+       }
 //printf("VWindowGUI::create_objects 1\n");
        add_subwindow(timebar = new VTimeBar(mwindow,
                this,
index 20b829485af3a6181983ad01380ed86934b9b60f..e31cb108eb3a6d1c1b3b49457a15244bc704cb22 100644 (file)
@@ -60,6 +60,7 @@ CHECK_WITH([vaapi],[video acceleration api],[VAAPI],[yes])
 CHECK_WITH([vdpau],[video decode+presentation api for unix],[VDPAU],[yes])
 CHECK_WITH([nv],[nvenc/nvdec ffnvcodec api],[NV],[yes])
 CHECK_WITH([cuda],[nv cuda plugins],[CUDA],[auto])
+CHECK_WITH([clang],[use clang instead of gcc/g++],[CLANG],[no])
 
 if test "x$WANT_LV2" != "xno"; then
   GTK2_LIBS=`pkg-config --libs gtk+-2.0`
@@ -907,6 +908,7 @@ echo "  using: with-vaapi = $WANT_VAAPI"
 echo "  using: with-vdpau = $WANT_VDPAU"
 echo "  using: with-nv = $WANT_NV"
 echo "  using: with-cuda = $WANT_CUDA"
+echo "  using: with-clang = $WANT_CLANG"
 echo ""
 echo "  using: thirdparty build = $WANT_CIN_3RDPARTY"
 echo "  using: single-user  = $WANT_CINBIN_BUILD"
@@ -915,6 +917,9 @@ echo "  using: ladspa-build = $WANT_LADSPA_BUILD"
 echo ""
 
 # build extras
+if test "x$WANT_CLANG" = "xyes" ; then
+  FFMPEG_EXTRA_CFG+=' --cc=clang --cxx=clang++'
+fi
 if test "x$HAVE_tiff" = "xyes"; then
   if test "x$HAVE_jbig" = "xyes"; then
     EXTRA_LIBS+=' -ljbig'
@@ -987,6 +992,11 @@ exec > global_config
 echo "SHELL := /bin/bash"
 echo "export SHELL"
 echo "WANT_JOBS := $WANT_JOBS"
+if test "x$WANT_CLANG" = "xyes" ; then
+  echo "CC = clang"
+  echo "CXX = clang++"
+  echo "export CC CXX"
+fi
 echo ""
 echo "OBJDIR := $OBJDIR"
 echo "BINDIR := \$(TOPDIR)/bin"
index 8cc0e36b2eca6ea1e4abfb1b712f62b13f1b3c55..2562727f8df90394bebcb8901fcd374af67082ed 100644 (file)
@@ -162,7 +162,7 @@ ffmpeg.cfg_params= \
                $(EXTRA_LIBS)" $(FFMPEG_EXTRA_CFG) \
 
 #cmake_config=echo "exec cmake \$$$$@ $(1)" > ./configure; chmod +x ./configure;
-cmake_config=echo "exec cmake $(1) \$$$$@" > ./configure; chmod +x ./configure;
+cmake_config=echo 'cmake "$$$$@" "$(1)"' > ./configure; chmod +x ./configure;
 a52dec.mak_params?= ; cd $(call bld_path,a52dec,include); ln -sf . a52dec
 a52dec.cfg_vars?= CFLAGS+=" -U__FreeBSD__ $(call inc_path,djbfft)" LIBS+=" $(call ld_path,djbfft)"
 a52dec.cfg_params?=--enable-djbfft