From: Good Guy Date: Fri, 13 Sep 2019 00:50:37 +0000 (-0600) Subject: add configure with-clang, fix segv on asset_info nested edl, single frame preview... X-Git-Tag: 2019-09~9 X-Git-Url: https://cinelerra-gg.org/git/?a=commitdiff_plain;h=281532ab870d8f6ded35d8e8555bf974014ace77;p=goodguy%2Fcinelerra.git add configure with-clang, fix segv on asset_info nested edl, single frame preview on nested, vsplash image in viewer --- diff --git a/cinelerra-5.1/cinelerra/assetedit.C b/cinelerra-5.1/cinelerra/assetedit.C index 432b78c6..609bc0f6 100644 --- a/cinelerra-5.1/cinelerra/assetedit.C +++ b/cinelerra-5.1/cinelerra/assetedit.C @@ -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*)&mwindow->interlace_asset_modes, x2 + edit_ilace_mode->get_w(), y)); + } } add_subwindow(new BC_OKButton(this)); diff --git a/cinelerra-5.1/cinelerra/awindowgui.C b/cinelerra-5.1/cinelerra/awindowgui.C index 66e69c3b..c3147a46 100644 --- a/cinelerra-5.1/cinelerra/awindowgui.C +++ b/cinelerra-5.1/cinelerra/awindowgui.C @@ -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; iwrite_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, diff --git a/cinelerra-5.1/cinelerra/vwindowgui.C b/cinelerra-5.1/cinelerra/vwindowgui.C index bec67dc8..062989a2 100644 --- a/cinelerra-5.1/cinelerra/vwindowgui.C +++ b/cinelerra-5.1/cinelerra/vwindowgui.C @@ -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, diff --git a/cinelerra-5.1/configure.ac b/cinelerra-5.1/configure.ac index 20b82948..e31cb108 100644 --- a/cinelerra-5.1/configure.ac +++ b/cinelerra-5.1/configure.ac @@ -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" diff --git a/cinelerra-5.1/thirdparty/Makefile b/cinelerra-5.1/thirdparty/Makefile index 8cc0e36b..2562727f 100644 --- a/cinelerra-5.1/thirdparty/Makefile +++ b/cinelerra-5.1/thirdparty/Makefile @@ -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