From: Good Guy Date: Sun, 4 Nov 2018 18:57:59 +0000 (-0700) Subject: lv2_blklst additions, ffmpeg est/bad times, proxy preview, cin.svg icon X-Git-Tag: 2019-08~188 X-Git-Url: https://git.cinelerra-gg.org/git/?a=commitdiff_plain;h=5a46f81a504562b7c8a0c4ff940e2b5b5c068ded;p=goodguy%2Fcinelerra.git lv2_blklst additions, ffmpeg est/bad times, proxy preview, cin.svg icon --- diff --git a/cinelerra-5.1/cinelerra/awindowgui.C b/cinelerra-5.1/cinelerra/awindowgui.C index 009647b3..f4a2474b 100644 --- a/cinelerra-5.1/cinelerra/awindowgui.C +++ b/cinelerra-5.1/cinelerra/awindowgui.C @@ -92,7 +92,7 @@ const char *AWindowGUI::folder_names[] = AssetVIcon::AssetVIcon(AssetPicon *picon, int w, int h, double framerate, int64_t length) - : VIcon(w, h, framerate) + : VIcon(w, h, framerate), Garbage("AssetVIcon") { this->picon = picon; this->length = length; @@ -101,6 +101,7 @@ AssetVIcon::AssetVIcon(AssetPicon *picon, int w, int h, double framerate, int64_ AssetVIcon::~AssetVIcon() { + picon->gui->vicon_thread->del_vicon(this); delete temp; } @@ -415,8 +416,7 @@ AssetPicon::AssetPicon(MWindow *mwindow, AssetPicon::~AssetPicon() { - if( vicon ) - gui->vicon_thread->del_vicon(vicon); + if( vicon ) vicon->remove_user(); delete vicon_frame; if( indexable ) indexable->remove_user(); if( edl ) edl->remove_user(); @@ -597,6 +597,24 @@ void AssetPicon::create_objects() } gui->vicon_thread->add_vicon(vicon); } + else if( asset->folder_no == AW_PROXY_FOLDER ) { + char unproxy_path[BCTEXTLEN]; + int proxy_scale = mwindow->edl->session->proxy_scale; + if( !ProxyRender::from_proxy_path(unproxy_path, asset, proxy_scale) ) { + Asset *unproxy = mwindow->edl->assets->get_asset(unproxy_path); + if( unproxy ) { + int i = gui->assets.total; + while( --i >= 0 ) { + AssetPicon *picon = (AssetPicon*)gui->assets[i]; + if( picon->id == unproxy->id ) { + vicon = picon->vicon; + if( vicon ) vicon->add_user(); + break; + } + } + } + } + } } else { @@ -1250,6 +1268,7 @@ void AWindowGUI::start_vicon_drawing() { if( !vicon_drawing || !vicon_thread->interrupted ) return; if( mwindow->edl->session->awindow_folder == AW_MEDIA_FOLDER || + mwindow->edl->session->awindow_folder == AW_PROXY_FOLDER || mwindow->edl->session->awindow_folder >= AWINDOW_USER_FOLDERS ) { switch( mwindow->edl->session->assetlist_format ) { case ASSETS_ICONS: @@ -1836,8 +1855,8 @@ void AWindowGUI::copy_picons(AssetPicon *picon, ArrayList *src) if( text && text[0] ) visible = bstrcasestr(picon->get_text(), text) ? 1 : 0; } - if( picon->vicon ) - picon->vicon->hidden = !visible ? 1 : 0; + if( visible && picon->vicon && picon->vicon->hidden ) + picon->vicon->hidden = 0; if( visible ) { BC_ListBoxItem *item2, *item1; dst[0].append(item1 = picon); @@ -2372,6 +2391,7 @@ int AWindowAssets::selection_changed() } else if( gui->vicon_drawing && get_button_down() && get_buttonpress() == 1 && ( mwindow->edl->session->awindow_folder == AW_MEDIA_FOLDER || + mwindow->edl->session->awindow_folder == AW_PROXY_FOLDER || mwindow->edl->session->awindow_folder >= AWINDOW_USER_FOLDERS ) && (item = (AssetPicon*)get_selection(0, 0)) != 0 ) { VIcon *vicon = 0; diff --git a/cinelerra-5.1/cinelerra/awindowgui.h b/cinelerra-5.1/cinelerra/awindowgui.h index d1351455..436965c9 100644 --- a/cinelerra-5.1/cinelerra/awindowgui.h +++ b/cinelerra-5.1/cinelerra/awindowgui.h @@ -35,6 +35,7 @@ #include "edl.inc" #include "effectlist.inc" #include "folderlistmenu.inc" +#include "garbage.h" #include "guicast.h" #include "labeledit.inc" #include "labelpopup.inc" @@ -107,7 +108,7 @@ public: double sort_key; PluginServer *plugin; Label *label; - VIcon *vicon; + AssetVIcon *vicon; RenderEngine *render_engine; }; @@ -130,7 +131,7 @@ public: int audio_pos; }; -class AssetVIcon : public VIcon { +class AssetVIcon : public VIcon, public Garbage { public: AssetPicon *picon; VFrame *temp; diff --git a/cinelerra-5.1/cinelerra/ffmpeg.C b/cinelerra-5.1/cinelerra/ffmpeg.C index 65e0c780..873abc2e 100644 --- a/cinelerra-5.1/cinelerra/ffmpeg.C +++ b/cinelerra-5.1/cinelerra/ffmpeg.C @@ -48,6 +48,9 @@ #define AUDIO_REFILL_THRESH 0x1000 #define AUDIO_MIN_FRAME_SZ 128 +#define FF_ESTM_TIMES 0x0001 +#define FF_BAD_TIMES 0x0002 + Mutex FFMPEG::fflock("FFMPEG::fflock"); static void ff_err(int ret, const char *fmt, ...) @@ -1325,6 +1328,7 @@ FFMPEG::FFMPEG(FileBase *file_base) opt_duration = -1; opt_video_filter = 0; opt_audio_filter = 0; + fflags = 0; char option_path[BCTEXTLEN]; set_option_path(option_path, "%s", "ffmpeg.opts"); read_options(option_path, opts); @@ -1999,10 +2003,10 @@ int FFMPEG::open_decoder() estimated = 1; } } - static int notified = 0; - if( !notified && estimated ) { - notified = 1; - printf("FFMPEG::open_decoder: some stream times estimated\n"); + if( estimated && !(fflags & FF_ESTM_TIMES) ) { + fflags |= FF_ESTM_TIMES; + printf("FFMPEG::open_decoder: some stream times estimated: %s\n", + fmt_ctx->url); } ff_lock("FFMPEG::open_decoder"); @@ -2058,8 +2062,11 @@ int FFMPEG::open_decoder() default: break; } } - if( bad_time ) - printf("FFMPEG::open_decoder: some stream have bad times\n"); + if( bad_time && !(fflags & FF_BAD_TIMES) ) { + fflags |= FF_BAD_TIMES; + printf("FFMPEG::open_decoder: some stream have bad times: %s\n", + fmt_ctx->url); + } ff_unlock(); return ret < 0 ? -1 : 0; } diff --git a/cinelerra-5.1/cinelerra/ffmpeg.h b/cinelerra-5.1/cinelerra/ffmpeg.h index 5c9b1ea1..ec17c9b2 100644 --- a/cinelerra-5.1/cinelerra/ffmpeg.h +++ b/cinelerra-5.1/cinelerra/ffmpeg.h @@ -315,6 +315,7 @@ public: char *opt_video_filter; char *opt_audio_filter; char file_format[BCTEXTLEN]; + int fflags; class ffidx { public: diff --git a/cinelerra-5.1/guicast/vicon.C b/cinelerra-5.1/guicast/vicon.C index f9978b26..e9a23f4a 100644 --- a/cinelerra-5.1/guicast/vicon.C +++ b/cinelerra-5.1/guicast/vicon.C @@ -222,13 +222,12 @@ void VIconThread::add_vicon(VIcon *vip) t_heap[i] = vip; } -int VIconThread::del_vicon(VIcon *&vicon) +int VIconThread::del_vicon(VIcon *vicon) { int i = t_heap.size(); while( --i >= 0 && t_heap[i] != vicon ); if( i < 0 ) return 0; remove_vicon(i); - delete vicon; vicon = 0; return 1; } diff --git a/cinelerra-5.1/guicast/vicon.h b/cinelerra-5.1/guicast/vicon.h index 6ffe3b17..274051fa 100644 --- a/cinelerra-5.1/guicast/vicon.h +++ b/cinelerra-5.1/guicast/vicon.h @@ -84,7 +84,7 @@ public: ArrayListt_heap; VIcon *low_vicon(); void add_vicon(VIcon *vicon); - int del_vicon(VIcon *&vicon); + int del_vicon(VIcon *vicon); void run(); void flash(); int draw(VIcon *vicon); diff --git a/cinelerra-5.1/image/cin.svg b/cinelerra-5.1/image/cin.svg index 955a4282..5b3ee248 100644 --- a/cinelerra-5.1/image/cin.svg +++ b/cinelerra-5.1/image/cin.svg @@ -15,11 +15,11 @@ viewBox="0 0 47.999998 54.515269" version="1.1" id="svg124" - sodipodi:docname="cin-app-icon.svg" + sodipodi:docname="cin_icon.svg" inkscape:version="0.92.3 (2405546, 2018-03-11)" inkscape:export-filename="/home/spc/Bilder/Cinfinity_new_buttons/cin-app-icon.png" - inkscape:export-xdpi="960" - inkscape:export-ydpi="960"> + inkscape:export-xdpi="128" + inkscape:export-ydpi="128"> Cinelerra GG Uifiy app icon - - C - C - I + + + style="opacity:1;fill:url(#a-3-9);stroke-width:0.11328788" + d="m 28.829091,13.391467 3.44935,12.967784 c 2.294075,-2.071951 3.777561,-5.012222 3.93958,-8.311715 z" + id="path122-4" /> + style="opacity:1;fill:url(#f-7-1);stroke-width:0.11328788" + d="m 33.136898,9.3964309 -8.524667,1.9342981 11.60579,6.727898 c 0.01011,-0.202766 0.03105,-0.402478 0.03105,-0.607796 0,-3.104939 -1.183832,-5.923627 -3.112179,-8.0544001 z" + id="path112-4" /> + style="opacity:1;fill:url(#e-7-3);stroke-width:0.11328788" + d="M 24.829619,5.4679419 20.175767,12.856872 33.143552,9.4053038 C 31.070755,7.1106986 28.130072,5.6288625 24.829619,5.4679419 Z" + id="path114-4" /> + style="opacity:1;fill:url(#c-3-8);stroke-width:0.11328788" + d="m 24.23735,5.4368867 c -3.10576,3e-7 -5.92565,1.1846861 -8.056619,3.1143978 l 1.936517,8.5202295 6.72568,-11.6035721 C 24.64089,5.457868 24.441921,5.4368864 24.23735,5.4368867 Z" + id="path118-7" /> + style="opacity:1;fill:url(#b-2-8);stroke-width:0.11328788" + d="M 16.191823,8.5424116 C 13.897364,10.615264 12.415954,13.55642 12.254461,16.856345 l 7.386712,4.653851 z" + id="path120-6" /> + style="opacity:1;fill:url(#d-8-8);stroke-width:0.11328788" + d="m 12.254461,16.843036 c -0.01011,0.202769 -0.03105,0.402478 -0.03105,0.607795 10e-7,3.104912 1.18341,5.921871 3.11218,8.052183 l 8.522443,-1.932081 z" + id="path116-3" /> + style="opacity:1;fill:url(#h-0-8);stroke-width:0.11328788" + d="m 27.837541,22.173448 -12.510829,3.320693 c 2.070323,2.291438 5.007604,3.772846 8.302843,3.937361 z" + id="path108-1" /> + + + - + inkscape:label="I" /> + + + diff --git a/cinelerra-5.1/lv2_blacklist.txt b/cinelerra-5.1/lv2_blacklist.txt index 795f8b3c..5e57df09 100644 --- a/cinelerra-5.1/lv2_blacklist.txt +++ b/cinelerra-5.1/lv2_blacklist.txt @@ -1,4 +1,4 @@ -# last updated 2018/06/13 gg/pys +# last updated 2018/11/03 gg/pys/andrea http:*midi* http:*MIDI* @@ -24,6 +24,17 @@ http://lsp-plug.in/plugins/lv2/sc_dyna_processor_lr http://lsp-plug.in/plugins/lv2/sc_dyna_processor_mono http://lsp-plug.in/plugins/lv2/sc_dyna_processor_ms http://lsp-plug.in/plugins/lv2/sc_dyna_processor_stereo +# +# Andrea Paz tested and bad for at least Arch +# +http://lsp-plug.in/plugins/lv2/mb_compressor_lr +http://lsp-plug.in/plugins/lv2/mb_compressor_ms +http://lsp-plug.in/plugins/lv2/mb_compressor_stereo +http://lsp-plug.in/plugins/lv2/sc_mb_compressor_lr +http://lsp-plug.in/plugins/lv2/sc_mb_compressor_mono +http://lsp-plug.in/plugins/lv2/sc_mb_compressor_ms +http://lsp-plug.in/plugins/lv2/sc_mb_compressor_stereo +# http://plugin.org.uk/swh-plugins/bandpass_a_iir http://plugin.org.uk/swh-plugins/bandpass_iir http://plugin.org.uk/swh-plugins/butthigh_iir diff --git a/cinelerra-5.1/plugins/histogram/histogram.C b/cinelerra-5.1/plugins/histogram/histogram.C index 33091111..da67c208 100644 --- a/cinelerra-5.1/plugins/histogram/histogram.C +++ b/cinelerra-5.1/plugins/histogram/histogram.C @@ -321,11 +321,13 @@ float HistogramMain::calculate_level(float input, void HistogramMain::calculate_histogram(VFrame *data, int do_value) { - - if(!engine) engine = new HistogramEngine(this, - get_project_smp() + 1, - get_project_smp() + 1); - + if( !engine ) + { + int cpus = data->get_w() * data->get_h() / 0x80000 + 2; + int smps = get_project_smp(); + if( cpus > smps ) cpus = smps; + engine = new HistogramEngine(this, cpus, cpus); + } if(!accum[0]) { for(int i = 0; i < HISTOGRAM_MODES; i++) @@ -446,11 +448,15 @@ int HistogramMain::process_buffer(VFrame *frame, // Apply histogram in hardware if(use_opengl) return run_opengl(); - if(!engine) engine = new HistogramEngine(this, - get_project_smp() + 1, - get_project_smp() + 1); this->input = frame; this->output = frame; + if( !engine ) + { + int cpus = input->get_w() * input->get_h() / 0x80000 + 2; + int smps = get_project_smp(); + if( cpus > smps ) cpus = smps; + engine = new HistogramEngine(this, cpus, cpus); + } // Always plot to set the curves if automatic if(config.plot || config.automatic) send_render_gui(frame);