From: Good Guy Date: Sun, 19 Nov 2017 21:08:33 +0000 (-0700) Subject: sams last ladspa icons, libopus/vp9, mixer fixer, plugin resets, fmt frmsz, shm fixes X-Git-Url: https://git.cinelerra-gg.org/git/?a=commitdiff_plain;h=667ff598ae2a94f48c7056aee1d77d7cde39066b;p=goodguy%2Fhistory.git sams last ladspa icons, libopus/vp9, mixer fixer, plugin resets, fmt frmsz, shm fixes --- diff --git a/cinelerra-5.1/cinelerra/assetpopup.C b/cinelerra-5.1/cinelerra/assetpopup.C index 175494b5..47cc7f2a 100644 --- a/cinelerra-5.1/cinelerra/assetpopup.C +++ b/cinelerra-5.1/cinelerra/assetpopup.C @@ -271,6 +271,8 @@ AssetPopupMixer::~AssetPopupMixer() int AssetPopupMixer::handle_event() { + ArrayListnew_mixers; + mwindow->select_zwindow(0); for( int i=0; isession->drag_assets->total; ++i ) { Indexable *indexable = mwindow->session->drag_assets->values[i]; @@ -293,9 +295,14 @@ int AssetPopupMixer::handle_event() char *tp = strrchr(path, '/'); if( !tp ) tp = path; else ++tp; zwindow->set_title(tp); - zwindow->start(); + new_mixers.append(zwindow); } - mwindow->queue_mixers(mwindow->edl,CURRENT_FRAME,0,0,1,0); + + mwindow->tile_mixers(); + for( int i=0; istart(); + + mwindow->refresh_mixers(); mwindow->resync_guis(); return 1; } diff --git a/cinelerra-5.1/cinelerra/automation.C b/cinelerra-5.1/cinelerra/automation.C index 2a21dd4d..a407a489 100644 --- a/cinelerra-5.1/cinelerra/automation.C +++ b/cinelerra-5.1/cinelerra/automation.C @@ -41,6 +41,7 @@ int Automation::autogrouptypes_fixedrange[] = 0, 0, 0, + 0, 1 }; diff --git a/cinelerra-5.1/cinelerra/cwindow.C b/cinelerra-5.1/cinelerra/cwindow.C index c292d66d..7152f5a6 100644 --- a/cinelerra-5.1/cinelerra/cwindow.C +++ b/cinelerra-5.1/cinelerra/cwindow.C @@ -234,11 +234,7 @@ void CWindow::update(int position, if(position) { - mwindow->queue_mixers(mwindow->edl, CURRENT_FRAME,1,0,1,0); - playback_engine->que->send_command(CURRENT_FRAME, - CHANGE_NONE, - mwindow->edl, - 1); + refresh_frame(CHANGE_NONE); } gui->lock_window("CWindow::update 2"); @@ -309,8 +305,16 @@ int CWindow::update_position(double position) return 1; } +void CWindow::refresh_frame(int change_type, EDL *edl) +{ + mwindow->refresh_mixers(); + playback_engine->refresh_frame(change_type, edl); +} - +void CWindow::refresh_frame(int change_type) +{ + refresh_frame(change_type, mwindow->edl); +} CWindowRemoteHandler:: CWindowRemoteHandler(RemoteControl *remote_control) diff --git a/cinelerra-5.1/cinelerra/cwindow.h b/cinelerra-5.1/cinelerra/cwindow.h index 33c43a1d..04845095 100644 --- a/cinelerra-5.1/cinelerra/cwindow.h +++ b/cinelerra-5.1/cinelerra/cwindow.h @@ -27,6 +27,7 @@ #include "cplayback.inc" #include "ctracking.inc" #include "cwindowgui.inc" +#include "edl.inc" #include "floatauto.inc" #include "mwindow.inc" #include "remotecontrol.h" @@ -70,6 +71,8 @@ public: void hide_window(); int update_position(double position); void stop_playback(int wait); + void refresh_frame(int change_type); + void refresh_frame(int change_type, EDL *edl); int destination; MWindow *mwindow; diff --git a/cinelerra-5.1/cinelerra/cwindowgui.C b/cinelerra-5.1/cinelerra/cwindowgui.C index cb2dbac9..21e8e90f 100644 --- a/cinelerra-5.1/cinelerra/cwindowgui.C +++ b/cinelerra-5.1/cinelerra/cwindowgui.C @@ -3178,10 +3178,7 @@ int CWindowCanvas::cursor_motion_event() gui->unlock_window(); mwindow->restart_brender(); mwindow->sync_parameters(CHANGE_PARAMS); - gui->cwindow->playback_engine->que->send_command(CURRENT_FRAME, - CHANGE_NONE, - mwindow->edl, - 1); + mwindow->cwindow->refresh_frame(CHANGE_NONE); if(!redraw) gui->update_tool(); gui->lock_window("CWindowCanvas::cursor_motion_event 2"); } @@ -3270,10 +3267,7 @@ int CWindowCanvas::button_press_event() mwindow->restart_brender(); mwindow->sync_parameters(CHANGE_PARAMS); - gui->cwindow->playback_engine->que->send_command(CURRENT_FRAME, - CHANGE_NONE, - mwindow->edl, - 1); + mwindow->cwindow->refresh_frame(CHANGE_NONE); if(!redraw) gui->update_tool(); gui->lock_window("CWindowCanvas::button_press_event 2"); } diff --git a/cinelerra-5.1/cinelerra/cwindowtool.C b/cinelerra-5.1/cinelerra/cwindowtool.C index f3266356..bfb78560 100644 --- a/cinelerra-5.1/cinelerra/cwindowtool.C +++ b/cinelerra-5.1/cinelerra/cwindowtool.C @@ -794,8 +794,7 @@ void CWindowCameraGUI::update_preview() mwindow->gui->draw_overlays(1); mwindow->sync_parameters(CHANGE_PARAMS); mwindow->gui->unlock_window(); - mwindow->cwindow->playback_engine->que->send_command(CURRENT_FRAME, - CHANGE_NONE, mwindow->edl, 1); + mwindow->cwindow->refresh_frame(CHANGE_NONE); mwindow->cwindow->gui->lock_window("CWindowCameraGUI::update_preview"); mwindow->cwindow->gui->canvas->draw_refresh(); mwindow->cwindow->gui->unlock_window(); @@ -1239,8 +1238,7 @@ void CWindowProjectorGUI::update_preview() mwindow->sync_parameters(CHANGE_PARAMS); mwindow->gui->draw_overlays(1); mwindow->gui->unlock_window(); - mwindow->cwindow->playback_engine->que->send_command(CURRENT_FRAME, - CHANGE_NONE, mwindow->edl, 1); + mwindow->cwindow->refresh_frame(CHANGE_NONE); mwindow->cwindow->gui->lock_window("CWindowProjectorGUI::update_preview"); mwindow->cwindow->gui->canvas->draw_refresh(); mwindow->cwindow->gui->unlock_window(); @@ -2263,8 +2261,7 @@ void CWindowMaskGUI::update_preview() mwindow->sync_parameters(CHANGE_PARAMS); mwindow->gui->draw_overlays(1); mwindow->gui->unlock_window(); - mwindow->cwindow->playback_engine->que->send_command(CURRENT_FRAME, - CHANGE_NONE, mwindow->edl, 1); + mwindow->cwindow->refresh_frame(CHANGE_NONE); mwindow->cwindow->gui->lock_window("CWindowMaskGUI::update_preview"); mwindow->cwindow->gui->canvas->draw_refresh(); mwindow->cwindow->gui->unlock_window(); diff --git a/cinelerra-5.1/cinelerra/ffmpeg.C b/cinelerra-5.1/cinelerra/ffmpeg.C index 1b4e100d..c536a265 100644 --- a/cinelerra-5.1/cinelerra/ffmpeg.C +++ b/cinelerra-5.1/cinelerra/ffmpeg.C @@ -690,6 +690,7 @@ int FFAudioStream::decode_frame(AVFrame *frame) int FFAudioStream::encode_activate() { if( writing >= 0 ) return writing; + if( !avctx->codec ) return writing = 0; frame_sz = avctx->codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE ? 10000 : avctx->frame_size; return FFStream::encode_activate(); diff --git a/cinelerra-5.1/cinelerra/mainmenu.C b/cinelerra-5.1/cinelerra/mainmenu.C index 0bf2973d..d85ef6ba 100644 --- a/cinelerra-5.1/cinelerra/mainmenu.C +++ b/cinelerra-5.1/cinelerra/mainmenu.C @@ -257,6 +257,7 @@ void MainMenu::create_objects() windowmenu->add_item(split_x = new SplitX(mwindow)); windowmenu->add_item(split_y = new SplitY(mwindow)); windowmenu->add_item(mixer_viewer = new MixerViewer(mwindow)); + windowmenu->add_item(new TileMixers(mwindow)); windowmenu->add_item(new TileWindows(mwindow,_("Default positions"),-1,_("Ctrl-P"),'p')); windowmenu->add_item(new TileWindows(mwindow,_("Tile left"),0)); windowmenu->add_item(new TileWindows(mwindow,_("Tile right"),1)); @@ -1540,3 +1541,16 @@ int MixerViewer::handle_event() return 1; } +TileMixers::TileMixers(MWindow *mwindow) + : BC_MenuItem(_("Tile mixers"), "Alt-t", 't') +{ + this->mwindow = mwindow; + set_alt(); +} + +int TileMixers::handle_event() +{ + mwindow->tile_mixers(); + return 1; +} + diff --git a/cinelerra-5.1/cinelerra/mainmenu.h b/cinelerra-5.1/cinelerra/mainmenu.h index 8300bcb4..9baf2a3b 100644 --- a/cinelerra-5.1/cinelerra/mainmenu.h +++ b/cinelerra-5.1/cinelerra/mainmenu.h @@ -408,6 +408,14 @@ public: MWindow *mwindow; }; +class TileMixers : public BC_MenuItem +{ +public: + TileMixers(MWindow *mwindow); + int handle_event(); + MWindow *mwindow; +}; + // ======================================== audio class AddAudioTrack : public BC_MenuItem diff --git a/cinelerra-5.1/cinelerra/mwindow.C b/cinelerra-5.1/cinelerra/mwindow.C index ae471267..426421c3 100644 --- a/cinelerra-5.1/cinelerra/mwindow.C +++ b/cinelerra-5.1/cinelerra/mwindow.C @@ -250,6 +250,7 @@ MWindow::~MWindow() delete render; render = 0; commit_commercial(); if( commercials && !commercials->remove_user() ) commercials = 0; + close_mixers(); // Save defaults for open plugins plugin_gui_lock->lock("MWindow::~MWindow"); @@ -1129,7 +1130,7 @@ ZWindow *MWindow::get_mixer(Mixer *&mixer) if( !mixer ) mixer = edl->mixers.new_mixer(); ZWindow *zwindow = 0; for( int i=0; !zwindow && iis_running() ) zwindow = zwindows[i]; + if( zwindows[i]->idx < 0 ) zwindow = zwindows[i]; if( !zwindow ) zwindows.append(zwindow = new ZWindow(this)); zwindow->idx = mixer->idx; @@ -1175,7 +1176,7 @@ void MWindow::start_mixer() zwindow->set_title(title); zwindow->start(); - queue_mixers(edl,CURRENT_FRAME,0,0,1,0); + refresh_mixers(); } int MWindow::mixer_track_active(Track *track) @@ -1206,7 +1207,7 @@ void MWindow::queue_mixers(EDL *edl, int command, int wait_tracking, zwindows_lock->lock("MWindow::queue_mixers"); for( int vidx=0; vidxrunning() ) continue; + if( zwindow->idx < 0 ) continue; Mixer *mixer = edl->mixers.get_mixer(zwindow->idx); if( !mixer || !mixer->mixer_ids.size() ) continue; int k = -1; @@ -1238,15 +1239,39 @@ void MWindow::queue_mixers(EDL *edl, int command, int wait_tracking, zwindows_lock->unlock(); } +void MWindow::refresh_mixers() +{ + queue_mixers(edl,CURRENT_FRAME,0,0,1,0); +} + void MWindow::stop_mixers() { for( int vidx=0; vidxrunning() ) continue; + if( zwindow->idx < 0 ) continue; zwindow->issue_command(STOP, 0, 0, 0, 0); } } +void MWindow::close_mixers() +{ + zwindows_lock->lock("MWindow::close_mixers"); + for( int i=0; iidx < 0 ) continue; + ZWindowGUI *zgui = zwindow->zgui; + zgui->lock_window("MWindow::select_zwindow 0"); + zgui->set_done(0); + zgui->unlock_window(); + } + zwindows_lock->unlock(); + for( int i=0; iidx < 0 ) continue; + zwindow->close_window(); + } +} + int MWindow::select_zwindow(ZWindow *zwindow) { int ret = 0, n = zwindows.number_of(zwindow); @@ -1254,7 +1279,7 @@ int MWindow::select_zwindow(ZWindow *zwindow) session->selected_zwindow = n; for( int i=0; irunning() ) continue; + if( zwindow->idx < 0 ) continue; ZWindowGUI *zgui = zwindow->zgui; zgui->lock_window("MWindow::select_zwindow 0"); zwindow->highlighted = i == n ? 1 : 0; @@ -1270,6 +1295,61 @@ int MWindow::select_zwindow(ZWindow *zwindow) return ret; } +void MWindow::tile_mixers() +{ + int nz = 0; + for( int i=0; iidx < 0 ) continue; + ++nz; + } + if( !nz ) return; + int zn = ceil(sqrt(nz)); + int x1 = 1 + gui->get_x(), x2 = cwindow->gui->get_x(); + int y1 = 1, y2 = gui->get_y(); + int rw = gui->get_root_w(0), rh = gui->get_root_h(0); + if( x1 < 0 ) x1 = 0; + if( y1 < 0 ) y1 = 0; + if( x2 > rw ) x2 = rw; + if( y2 > rh ) y2 = rh; + int dx = x2 - x1, dy = y2 - y1; + int zw = dx / zn; + int lt = BC_DisplayInfo::get_left_border(); + int top = BC_DisplayInfo::get_top_border(); + int bw = lt + BC_DisplayInfo::get_right_border(); // borders + int bh = top + BC_DisplayInfo::get_bottom_border(); + int zx = 0, zy = 0; // window origins + int mw = 10+10, mh = 10+10; // canvas margins + int rsz = 0, n = 0, dz = 0; + int ow = edl->session->output_w, oh = edl->session->output_h; + for( int i=0; iidx < 0 ) continue; + int ww = zw - bw, hh = (ww - mw) * oh / ow + mh, zh = hh + bh; + if( rsz < hh ) rsz = hh; + int xx = zx + x1, yy = zy + y1; + int mx = x2 - zw, my = y2 - zh; + if( xx > mx ) xx = mx; + if( yy > my ) yy = my; + xx += lt + dz; yy += top + dz; + zwindow->reposition(xx,yy, ww,hh); + if( zwindow->running() ) { + ZWindowGUI *gui = (ZWindowGUI *)zwindow->get_gui(); + gui->lock_window("MWindow::tile_mixers"); + gui->BC_WindowBase::reposition_window(xx,yy, ww,hh); + gui->unlock_window(); + } + if( ++n >= zn ) { + n = 0; rsz += bh; + if( (zy += rsz) > (dy - rsz) ) dz += 10; + rsz = 0; + zx = 0; + } + else + zx += zw; + } +} + void MWindow::init_cache() { @@ -1572,7 +1652,7 @@ void MWindow::stop_playback(int wait) } for(int i = 0; i < zwindows.size(); i++) { ZWindow *zwindow = zwindows[i]; - if( !zwindow->is_running() ) continue; + if( zwindow->idx < 0 ) continue; zwindow->stop_playback(wait); } } @@ -2662,11 +2742,7 @@ void MWindow::sync_parameters(int change_type) } else { - queue_mixers(edl,CURRENT_FRAME,0,0,1,0); - cwindow->playback_engine->que->send_command(CURRENT_FRAME, - change_type, - edl, - 1); + cwindow->refresh_frame(change_type); } } @@ -3201,11 +3277,7 @@ void MWindow::update_project(int load_mode) } if(debug) PRINT_TRACE select_zwindow(0); - for( int i=0; iis_running() ) continue; - zwindow->close_window(); - } + close_mixers(); for( int i=0; imixers.size(); ++i ) { Mixer *mixer = edl->mixers[i]; @@ -3231,10 +3303,7 @@ void MWindow::update_project(int load_mode) cwindow->gui->unlock_window(); if(debug) PRINT_TRACE - cwindow->playback_engine->que->send_command(CURRENT_FRAME, - CHANGE_ALL, - edl, - 1); + cwindow->refresh_frame(CHANGE_ALL); awindow->gui->async_update_assets(); if(debug) PRINT_TRACE diff --git a/cinelerra-5.1/cinelerra/mwindow.h b/cinelerra-5.1/cinelerra/mwindow.h index f15081b6..271a4f89 100644 --- a/cinelerra-5.1/cinelerra/mwindow.h +++ b/cinelerra-5.1/cinelerra/mwindow.h @@ -206,13 +206,16 @@ public: void queue_mixers(EDL *edl, int command, int wait_tracking, int use_inout, int update_refresh, int toggle_audio); + void refresh_mixers(); void stop_mixers(); + void close_mixers(); ZWindow *get_mixer(Mixer *&mixer); void del_mixer(ZWindow *zwindow); int mixer_track_active(Track *track); void update_mixer_tracks(); void start_mixer(); int select_zwindow(ZWindow *zwindow); + void tile_mixers(); int load_filenames(ArrayList *filenames, int load_mode = LOADMODE_REPLACE, diff --git a/cinelerra-5.1/cinelerra/mwindowedit.C b/cinelerra-5.1/cinelerra/mwindowedit.C index e128a19b..84232955 100644 --- a/cinelerra-5.1/cinelerra/mwindowedit.C +++ b/cinelerra-5.1/cinelerra/mwindowedit.C @@ -96,8 +96,7 @@ void MWindow::add_audio_track_entry(int above, Track *dst) // gui->cursor->draw(1); // gui->canvas->flash(); // gui->canvas->activate(); - cwindow->playback_engine->que-> - send_command(CURRENT_FRAME, CHANGE_EDL, edl, 1); + cwindow->refresh_frame(CHANGE_EDL); } void MWindow::add_video_track_entry(Track *dst) @@ -116,8 +115,7 @@ void MWindow::add_video_track_entry(Track *dst) // gui->cursor->draw(1); // gui->canvas->flash(); // gui->canvas->activate(); - cwindow->playback_engine->que-> - send_command(CURRENT_FRAME, CHANGE_EDL, edl, 1); + cwindow->refresh_frame(CHANGE_EDL); save_backup(); } @@ -137,8 +135,7 @@ void MWindow::add_subttl_track_entry(Track *dst) // gui->cursor->draw(1); // gui->canvas->flash(); // gui->canvas->activate(); - cwindow->playback_engine->que-> - send_command(CURRENT_FRAME, CHANGE_EDL, edl, 1); + cwindow->refresh_frame(CHANGE_EDL); save_backup(); } @@ -311,8 +308,7 @@ void MWindow::clear_entry() update_plugin_guis(); gui->update(1, 2, 1, 1, 1, 1, 0); cwindow->update(1, 0, 0, 0, 1); - cwindow->playback_engine->que-> - send_command(CURRENT_FRAME, CHANGE_EDL, edl, 1); + cwindow->refresh_frame(CHANGE_EDL); } void MWindow::clear(int clear_handle) @@ -408,8 +404,7 @@ void MWindow::concatenate_tracks() restart_brender(); gui->update(1, 1, 0, 0, 1, 0, 0); - cwindow->playback_engine->que-> - send_command(CURRENT_FRAME, CHANGE_EDL, edl, 1); + cwindow->refresh_frame(CHANGE_EDL); } @@ -505,8 +500,7 @@ void MWindow::crop_video() undo->update_undo_after(_("crop"), LOAD_ALL); restart_brender(); - cwindow->playback_engine->que-> - send_command(CURRENT_FRAME, CHANGE_ALL, edl, 1); + cwindow->refresh_frame(CHANGE_ALL); save_backup(); } @@ -532,8 +526,7 @@ void MWindow::blade(double position) gui->update(1, 2, 1, 1, 1, 1, 0); cwindow->update(1, 0, 0, 0, 1); awindow->gui->async_update_assets(); - cwindow->playback_engine->que-> - send_command(CURRENT_FRAME, CHANGE_EDL, edl, 1); + cwindow->refresh_frame(CHANGE_EDL); } void MWindow::cut(double start, double end, double new_position) @@ -557,8 +550,7 @@ void MWindow::cut(double start, double end, double new_position) gui->update(1, 2, 1, 1, 1, 1, 0); cwindow->update(1, 0, 0, 0, 1); awindow->gui->async_update_assets(); - cwindow->playback_engine->que-> - send_command(CURRENT_FRAME, CHANGE_EDL, edl, 1); + cwindow->refresh_frame(CHANGE_EDL); } void MWindow::snap_left_edit() @@ -668,8 +660,7 @@ void MWindow::delete_tracks() update_plugin_states(); gui->update(1, 1, 1, 0, 1, 0, 0); - cwindow->playback_engine->que-> - send_command(CURRENT_FRAME, CHANGE_EDL, edl, 1); + cwindow->refresh_frame(CHANGE_EDL); } void MWindow::delete_track(Track *track) @@ -682,8 +673,7 @@ void MWindow::delete_track(Track *track) update_plugin_states(); gui->update(1, 1, 1, 0, 1, 0, 0); - cwindow->playback_engine->que-> - send_command(CURRENT_FRAME, CHANGE_EDL, edl, 1); + cwindow->refresh_frame(CHANGE_EDL); save_backup(); } @@ -941,8 +931,7 @@ void MWindow::move_edits(ArrayList *edits, undo->update_undo_after(_("move edit"), LOAD_ALL); restart_brender(); - cwindow->playback_engine->que-> - send_command(CURRENT_FRAME, CHANGE_EDL, edl, 1); + cwindow->refresh_frame(CHANGE_EDL); update_plugin_guis(); gui->update(1, 1, // 1 for incremental drawing. 2 for full refresh @@ -957,8 +946,7 @@ void MWindow::move_effect(Plugin *plugin, Track *track, int64_t position) undo->update_undo_after(_("paste effect"), LOAD_ALL); restart_brender(); - cwindow->playback_engine->que-> - send_command(CURRENT_FRAME, CHANGE_EDL, edl, 1); + cwindow->refresh_frame(CHANGE_EDL); update_plugin_guis(); gui->update(1, 1, // 1 for incremental drawing. 2 for full refresh 0, 0, 0, 0, 0); @@ -972,8 +960,7 @@ void MWindow::move_effect(Plugin *plugin, PluginSet *plugin_set, int64_t positio undo->update_undo_after(_("move effect"), LOAD_ALL); restart_brender(); - cwindow->playback_engine->que-> - send_command(CURRENT_FRAME, CHANGE_EDL, edl, 1); + cwindow->refresh_frame(CHANGE_EDL); update_plugin_guis(); gui->update(1, 1, // 1 for incremental drawing. 2 for full refresh 0, 0, 0, 0, 0); @@ -1078,8 +1065,7 @@ void MWindow::mute_selection() restart_brender(); update_plugin_guis(); gui->update(1, 2, 1, 1, 1, 1, 0); - cwindow->playback_engine->que-> - send_command(CURRENT_FRAME, CHANGE_EDL, edl, 1); + cwindow->refresh_frame(CHANGE_EDL); } } @@ -1643,8 +1629,7 @@ void MWindow::paste_silence() restart_brender(); gui->update(1, 2, 1, 1, 1, 1, 0); cwindow->update(1, 0, 0, 0, 1); - cwindow->playback_engine->que-> - send_command(CURRENT_FRAME, CHANGE_EDL, edl, 1); + cwindow->refresh_frame(CHANGE_EDL); } void MWindow::detach_transition(Transition *transition) @@ -1924,8 +1909,7 @@ void MWindow::redo_entry(BC_WindowBase *calling_window_gui) } } - cwindow->playback_engine->que-> - send_command(CURRENT_FRAME, CHANGE_ALL, edl, 1); + cwindow->refresh_frame(CHANGE_ALL); } @@ -2168,8 +2152,7 @@ void MWindow::trim_selection() cwindow->update(1, 0, 0, 0, 1); awindow->gui->async_update_assets(); restart_brender(); - cwindow->playback_engine->que-> - send_command(CURRENT_FRAME, CHANGE_EDL, edl, 1); + cwindow->refresh_frame(CHANGE_EDL); } @@ -2213,8 +2196,7 @@ void MWindow::undo_entry(BC_WindowBase *calling_window_gui) awindow->gui->async_update_assets(); - cwindow->playback_engine->que-> - send_command(CURRENT_FRAME, CHANGE_ALL, edl, 1); + cwindow->refresh_frame(CHANGE_ALL); calling_window_gui->lock_window("MWindow::undo_entry 4"); } @@ -2426,8 +2408,7 @@ void MWindow::cut_commercials() update_plugin_guis(); gui->update(1, 2, 1, 1, 1, 1, 0); cwindow->update(1, 0, 0, 0, 1); - cwindow->playback_engine->que-> - send_command(CURRENT_FRAME, CHANGE_EDL, edl, 1); + cwindow->refresh_frame(CHANGE_EDL); } diff --git a/cinelerra-5.1/cinelerra/mwindowmove.C b/cinelerra-5.1/cinelerra/mwindowmove.C index 06fb11cc..0cd6e455 100644 --- a/cinelerra-5.1/cinelerra/mwindowmove.C +++ b/cinelerra-5.1/cinelerra/mwindowmove.C @@ -178,10 +178,17 @@ void MWindow::fit_autos(int doall) switch (i) { case AUTOGROUPTYPE_AUDIO_FADE: + if (range < 1) { + min = MIN(min, edl->local_session->automation_mins[i]); + max = MAX(max, edl->local_session->automation_maxs[i]); + if( min >= max-0.1 ) { min = -80.0; min = 6.0; } + } + break; case AUTOGROUPTYPE_VIDEO_FADE: - if (range < 0.1) { + if (range < 1) { min = MIN(min, edl->local_session->automation_mins[i]); max = MAX(max, edl->local_session->automation_maxs[i]); + if( min >= max-0.1 ) { min = 0.0; min = 100.0; } } break; case AUTOGROUPTYPE_ZOOM: @@ -198,9 +205,10 @@ void MWindow::fit_autos(int doall) break; case AUTOGROUPTYPE_X: case AUTOGROUPTYPE_Y: - if (range < 5) { - min = floor((min+max)/2) - 50; - max = floor((min+max)/2) + 50; + if (range < 1) { + float scale = bmin(edl->session->output_w, edl->session->output_h); + min = floor((min+max)/2) - 0.5*scale; + max = floor((min+max)/2) + 0.5*scale; } break; } diff --git a/cinelerra-5.1/cinelerra/new.C b/cinelerra-5.1/cinelerra/new.C index d157d58a..9d7dea8e 100644 --- a/cinelerra-5.1/cinelerra/new.C +++ b/cinelerra-5.1/cinelerra/new.C @@ -601,7 +601,7 @@ int FrameRatePulldown::handle_event() FrameSizePulldown::FrameSizePulldown(Theme *theme, BC_TextBox *output_w, BC_TextBox *output_h, int x, int y) - : BC_ListBox(x, y, 150, 250, LISTBOX_TEXT, + : BC_ListBox(x, y, 180, 250, LISTBOX_TEXT, &theme->frame_sizes, 0, 0, 1, 0, 1) { this->theme = theme; diff --git a/cinelerra-5.1/cinelerra/playbackengine.C b/cinelerra-5.1/cinelerra/playbackengine.C index 2842377a..1d3a4115 100644 --- a/cinelerra-5.1/cinelerra/playbackengine.C +++ b/cinelerra-5.1/cinelerra/playbackengine.C @@ -490,3 +490,8 @@ void PlaybackEngine::issue_command(EDL *edl, int command, int wait_tracking, } } +void PlaybackEngine::refresh_frame(int change_type, EDL *edl) +{ + que->send_command(CURRENT_FRAME, change_type, edl, 1); +} + diff --git a/cinelerra-5.1/cinelerra/playbackengine.h b/cinelerra-5.1/cinelerra/playbackengine.h index 5d915877..2fd07167 100644 --- a/cinelerra-5.1/cinelerra/playbackengine.h +++ b/cinelerra-5.1/cinelerra/playbackengine.h @@ -84,6 +84,7 @@ public: void stop_playback(int wait); void issue_command(EDL *edl, int command, int wait_tracking, int use_inout, int update_refresh, int toggle_audio); + void refresh_frame(int change_type, EDL *edl); // Maintain caches through console changes CICache *audio_cache, *video_cache; diff --git a/cinelerra-5.1/cinelerra/preferencesthread.C b/cinelerra-5.1/cinelerra/preferencesthread.C index 3e4ac56f..9cca7fa5 100644 --- a/cinelerra-5.1/cinelerra/preferencesthread.C +++ b/cinelerra-5.1/cinelerra/preferencesthread.C @@ -317,10 +317,7 @@ int PreferencesThread::apply_settings() //printf("PreferencesThread::apply_settings 1\n"); // This doesn't stop and restart, only reloads the assets before // the next play command. - mwindow->cwindow->playback_engine->que->send_command(CURRENT_FRAME, - CHANGE_ALL, - mwindow->edl, - 1); + mwindow->cwindow->refresh_frame(CHANGE_ALL, mwindow->edl); //printf("PreferencesThread::apply_settings 10\n"); } diff --git a/cinelerra-5.1/cinelerra/theme.C b/cinelerra-5.1/cinelerra/theme.C index a04d01fe..9ed31959 100644 --- a/cinelerra-5.1/cinelerra/theme.C +++ b/cinelerra-5.1/cinelerra/theme.C @@ -265,22 +265,44 @@ void Theme::build_menus() aspect_ratios.append(new BC_ListBoxItem("2.35:1")); aspect_ratios.append(new BC_ListBoxItem("2.66:1")); - frame_sizes.append(new BC_ListBoxItem("128x96")); - frame_sizes.append(new BC_ListBoxItem("160x120")); - frame_sizes.append(new BC_ListBoxItem("320x240")); - frame_sizes.append(new BC_ListBoxItem("360x240")); - frame_sizes.append(new BC_ListBoxItem("400x300")); - frame_sizes.append(new BC_ListBoxItem("640x400")); - frame_sizes.append(new BC_ListBoxItem("640x480")); - frame_sizes.append(new BC_ListBoxItem("720x480")); - frame_sizes.append(new BC_ListBoxItem("800x600")); - frame_sizes.append(new BC_ListBoxItem("1024x768")); - frame_sizes.append(new BC_ListBoxItem("1280x720")); - frame_sizes.append(new BC_ListBoxItem("1280x1024")); - frame_sizes.append(new BC_ListBoxItem("1600x1200")); - frame_sizes.append(new BC_ListBoxItem("1920x1080")); - frame_sizes.append(new BC_ListBoxItem("3840x2160")); - frame_sizes.append(new BC_ListBoxItem("4096x1720")); + frame_sizes.append(new BC_ListBoxItem("128x96 ")); + frame_sizes.append(new BC_ListBoxItem("160x120 ")); + frame_sizes.append(new BC_ListBoxItem("320x240 ")); + frame_sizes.append(new BC_ListBoxItem("360x240 ")); + frame_sizes.append(new BC_ListBoxItem("400x300 ")); + frame_sizes.append(new BC_ListBoxItem("640x360 nHD")); + frame_sizes.append(new BC_ListBoxItem("640x400 ")); + frame_sizes.append(new BC_ListBoxItem("640x480 VGA")); + frame_sizes.append(new BC_ListBoxItem("720x480 NTSC")); + frame_sizes.append(new BC_ListBoxItem("720x576 PAL")); + frame_sizes.append(new BC_ListBoxItem("768x432 ")); + frame_sizes.append(new BC_ListBoxItem("800x450 ")); + frame_sizes.append(new BC_ListBoxItem("800x600 SVGA")); + frame_sizes.append(new BC_ListBoxItem("896x504 ")); + frame_sizes.append(new BC_ListBoxItem("960x540 qHD")); + frame_sizes.append(new BC_ListBoxItem("1024x576 ")); + frame_sizes.append(new BC_ListBoxItem("1024x768 XGA")); + frame_sizes.append(new BC_ListBoxItem("1152x648 ")); + frame_sizes.append(new BC_ListBoxItem("1280x720 HD")); + frame_sizes.append(new BC_ListBoxItem("1280x1024 SXGA")); + frame_sizes.append(new BC_ListBoxItem("1366x768 WXGA")); + frame_sizes.append(new BC_ListBoxItem("1600x900 HD+")); + frame_sizes.append(new BC_ListBoxItem("1600x1200 UXGA")); + frame_sizes.append(new BC_ListBoxItem("1920x1080 Full HD")); + frame_sizes.append(new BC_ListBoxItem("2048x1152 ")); + frame_sizes.append(new BC_ListBoxItem("2304x1296 ")); + frame_sizes.append(new BC_ListBoxItem("2560x1440 QHD")); + frame_sizes.append(new BC_ListBoxItem("2880x1620 ")); + frame_sizes.append(new BC_ListBoxItem("3200x1800 QHD+")); + frame_sizes.append(new BC_ListBoxItem("3520x1980 ")); + frame_sizes.append(new BC_ListBoxItem("3840x2160 4K UHD")); + frame_sizes.append(new BC_ListBoxItem("4096x2304 Full 4K UHD")); + frame_sizes.append(new BC_ListBoxItem("4480x2520 ")); + frame_sizes.append(new BC_ListBoxItem("5120x2880 5K UHD")); + frame_sizes.append(new BC_ListBoxItem("5760x3240 ")); + frame_sizes.append(new BC_ListBoxItem("6400x3600 ")); + frame_sizes.append(new BC_ListBoxItem("7040x3960 ")); + frame_sizes.append(new BC_ListBoxItem("7680x4320 8K UHD")); sample_rates.append(new BC_ListBoxItem("8000")); sample_rates.append(new BC_ListBoxItem("16000")); diff --git a/cinelerra-5.1/cinelerra/vwindow.C b/cinelerra-5.1/cinelerra/vwindow.C index 717972a1..897f21ec 100644 --- a/cinelerra-5.1/cinelerra/vwindow.C +++ b/cinelerra-5.1/cinelerra/vwindow.C @@ -328,10 +328,7 @@ void VWindow::update_position(int change_type, { //printf("VWindow::update_position %d\n", __LINE__); //edl->dump(); - playback_engine->que->send_command(CURRENT_FRAME, - change_type, - edl, - 1); + playback_engine->refresh_frame(change_type, edl); double position = edl->local_session->get_selectionstart(1); if(lock_window) gui->lock_window("VWindow::update_position"); diff --git a/cinelerra-5.1/cinelerra/zwindow.C b/cinelerra-5.1/cinelerra/zwindow.C index 46e00a91..c970f22f 100644 --- a/cinelerra-5.1/cinelerra/zwindow.C +++ b/cinelerra-5.1/cinelerra/zwindow.C @@ -206,6 +206,7 @@ BC_Window* ZWindow::new_gui() void ZWindow::handle_done_event(int result) { + mwindow->del_mixer(this); } void ZWindow::handle_close_event(int result) { @@ -218,7 +219,7 @@ void ZWindow::change_source(EDL *edl) this->edl->remove_user(); this->edl = edl; if( edl != 0 ) { - zgui->playback_engine->que->send_command(CURRENT_FRAME, CHANGE_ALL, edl, 1); + zgui->playback_engine->refresh_frame(CHANGE_ALL, edl); } } @@ -252,17 +253,18 @@ void ZWindow::update_mixer_ids() void ZWindow::set_title(const char *tp) { + Mixer *mixer = mwindow->edl->mixers.get_mixer(idx); + if( mixer ) mixer->set_title(tp); char *cp = title, *ep = cp + sizeof(title)-1; cp += snprintf(title, ep-cp, _("Mixer %d"), idx); if( tp ) cp += snprintf(cp, ep-cp, ": %s", tp); - else tp = title; - Mixer *mixer = mwindow->edl->mixers.get_mixer(idx); - if( mixer ) mixer->set_title(title); + *cp = 0; } void ZWindow::reposition(int x, int y, int w, int h) { Mixer *mixer = mwindow->edl->mixers.get_mixer(idx); - if( mixer ) mixer->reposition(x, y, w, h); + if( !mixer ) return; + mixer->reposition(x, y, w, h); } diff --git a/cinelerra-5.1/cinelerra/zwindowgui.C b/cinelerra-5.1/cinelerra/zwindowgui.C index b374c2de..d28e3e9e 100644 --- a/cinelerra-5.1/cinelerra/zwindowgui.C +++ b/cinelerra-5.1/cinelerra/zwindowgui.C @@ -38,8 +38,8 @@ #include "zwindowgui.h" ZWindowGUI::ZWindowGUI(MWindow *mwindow, ZWindow *zwindow, Mixer *mixer) - : BC_Window(mixer->title, mixer->x, mixer->y, mixer->w, mixer->h, - 100, 100, 1, 1, 0) + : BC_Window(zwindow->title, mixer->x, mixer->y, mixer->w, mixer->h, + 100, 75, 1, 1, 0) { this->mwindow = mwindow; this->zwindow = zwindow; @@ -76,16 +76,13 @@ int ZWindowGUI::resize_event(int w, int h) BC_WindowBase::resize_event(w, h); return 1; } - int ZWindowGUI::translation_event() { - zwindow->reposition(get_x(), get_y(), get_w(), get_h()); - return 0; + return resize_event(get_w(),get_h()); } int ZWindowGUI::close_event() { - mwindow->del_mixer(zwindow); set_done(0); return 1; } diff --git a/cinelerra-5.1/configure.ac b/cinelerra-5.1/configure.ac index 3ec19dfd..4fe5c0f0 100644 --- a/cinelerra-5.1/configure.ac +++ b/cinelerra-5.1/configure.ac @@ -453,6 +453,8 @@ CHECK_LIB([fdk], [fdk-aac], [faacDecInit]) CHECK_HEADERS([fdk], [fdk headers], [fdk-aac/genericStds.h]) CHECK_LIB([jbig], [jbig], [jbg_dec_init]) CHECK_LIB([vdpau], [vdpau], [vdp_device_create_x11]) +CHECK_LIB([opus], [opus], [opus_multistream_decoder_create]) +CHECK_HEADERS([opus], [libopus headers], [opus/opus_multistream.h]) #if test "x$HAVE_mjpegtools" = "xyes"; then #CFG_CFLAGS+=" -I/usr/include/mjpegtools" @@ -710,6 +712,12 @@ if test "x$HAVE_DL" = "xyes"; then EXTRA_LIBS+=' -ldl' FFMPEG_EXTRA_CFG+=' --extra-ldflags="-ldl"' fi +if test "x$HAVE_opus" = "xyes"; then + EXTRA_LIBS+=' -lopus' + CFG_CFLAGS+=' -I/usr/include/opus' + FFMPEG_EXTRA_CFG+=' --enable-libopus' +fi + AC_SUBST(EXTRA_LIBS) AC_SUBST(FFMPEG_EXTRA_CFG) AC_SUBST(WANT_X264_HIDEPTH) @@ -836,3 +844,6 @@ fi if test "x$WANT_GIT_FFMPEG" != "xno"; then echo "ffmpeg.git := $WANT_GIT_FFMPEG" fi +if test "x$HAVE_opus" = "xyes"; then +echo 'ffmpeg.cflags+=" -I/usr/include/opus"' +fi diff --git a/cinelerra-5.1/guicast/vframe.C b/cinelerra-5.1/guicast/vframe.C index 1cfeb58b..eaa1f078 100644 --- a/cinelerra-5.1/guicast/vframe.C +++ b/cinelerra-5.1/guicast/vframe.C @@ -131,6 +131,7 @@ VFrame::VFrame(VFrame &frame) { reset_parameters(1); params = new BC_Hash; + use_shm = frame.use_shm; allocate_data(0, -1, 0, 0, 0, frame.w, frame.h, frame.color_model, frame.bytes_per_line); copy_from(&frame); @@ -504,7 +505,8 @@ int VFrame::allocate_data(unsigned char *data, int shmid, this->data = 0; int size = calculate_data_size(this->w, this->h, this->bytes_per_line, this->color_model); - if(BC_WindowBase::get_resources()->use_vframe_shm() && use_shm) { + if( use_shm && size >= SHM_MIN_SIZE && + BC_WindowBase::get_resources()->use_vframe_shm() ) { this->shmid = shmget(IPC_PRIVATE, size, IPC_CREAT | 0777); if( this->shmid >= 0 ) { this->data = (unsigned char*)shmat(this->shmid, NULL, 0); @@ -520,7 +522,7 @@ int VFrame::allocate_data(unsigned char *data, int shmid, } } // Have to use malloc for libpng - if( !data ) { + if( !this->data ) { this->data = (unsigned char *)malloc(size); this->shmid = -1; } diff --git a/cinelerra-5.1/guicast/vframe.h b/cinelerra-5.1/guicast/vframe.h index 951e0364..45dbe11f 100644 --- a/cinelerra-5.1/guicast/vframe.h +++ b/cinelerra-5.1/guicast/vframe.h @@ -34,7 +34,7 @@ // Maximum number of prev or next effects to be pushed onto the stacks. #define MAX_STACK_ELEMENTS 255 - +#define SHM_MIN_SIZE 2048 // Scene graph for 3D models // Defined by the subclass diff --git a/cinelerra-5.1/picon/cinfinity/sc3_1427.png b/cinelerra-5.1/picon/cinfinity/sc3_1427.png index 4f31af97..2866c706 100644 Binary files a/cinelerra-5.1/picon/cinfinity/sc3_1427.png and b/cinelerra-5.1/picon/cinfinity/sc3_1427.png differ diff --git a/cinelerra-5.1/plugins/chromakey/chromakey.C b/cinelerra-5.1/plugins/chromakey/chromakey.C index 90934f3e..4eb39787 100644 --- a/cinelerra-5.1/plugins/chromakey/chromakey.C +++ b/cinelerra-5.1/plugins/chromakey/chromakey.C @@ -39,9 +39,13 @@ +ChromaKeyConfig::ChromaKeyConfig() +{ + reset(); +} +void ChromaKeyConfig::reset() -ChromaKeyConfig::ChromaKeyConfig() { red = 0.0; green = 0.0; @@ -147,6 +151,9 @@ void ChromaKeyWindow::create_objects() y += 30; add_subwindow(use_colorpicker = new ChromaKeyUseColorPicker(plugin, this, x1, y)); + y += use_colorpicker->get_h() + 10; + add_subwindow(new ChromaKeyReset(plugin, this, x, y)); + color_thread = new ChromaKeyColorThread(plugin, this); update_sample(); @@ -246,7 +253,6 @@ int ChromaKeySlope::handle_event() return 1; } - ChromaKeyUseValue::ChromaKeyUseValue(ChromaKey *plugin, int x, int y) : BC_CheckBox(x, y, plugin->config.use_value, _("Use value")) { @@ -259,6 +265,20 @@ int ChromaKeyUseValue::handle_event() return 1; } +ChromaKeyReset::ChromaKeyReset(ChromaKey *plugin, ChromaKeyWindow *gui, int x, int y) + : BC_GenericButton(x, y, _("Reset")) +{ + this->plugin = plugin; + this->gui = gui; +} + +int ChromaKeyReset::handle_event() +{ + plugin->config.reset(); + gui->update_gui(); + plugin->send_configure_change(); + return 1; +} ChromaKeyUseColorPicker::ChromaKeyUseColorPicker(ChromaKey *plugin, ChromaKeyWindow *gui, @@ -630,15 +650,20 @@ void ChromaKey::update_gui() { load_configuration(); thread->window->lock_window(); - ((ChromaKeyWindow*)thread->window)->threshold->update(config.threshold); - ((ChromaKeyWindow*)thread->window)->slope->update(config.slope); - ((ChromaKeyWindow*)thread->window)->use_value->update(config.use_value); - ((ChromaKeyWindow*)thread->window)->update_sample(); - + ((ChromaKeyWindow *)(thread->window))->update_gui(); thread->window->unlock_window(); } } +void ChromaKeyWindow::update_gui() +{ + ChromaKeyConfig &config = plugin->config; + threshold->update(config.threshold); + slope->update(config.slope); + use_value->update(config.use_value); + update_sample(); +} + int ChromaKey::handle_opengl() { #ifdef HAVE_GL diff --git a/cinelerra-5.1/plugins/chromakey/chromakey.h b/cinelerra-5.1/plugins/chromakey/chromakey.h index 8e1a1aaf..f282554f 100644 --- a/cinelerra-5.1/plugins/chromakey/chromakey.h +++ b/cinelerra-5.1/plugins/chromakey/chromakey.h @@ -39,7 +39,7 @@ class ChromaKeyConfig { public: ChromaKeyConfig(); - + void reset(); void copy_from(ChromaKeyConfig &src); int equivalent(ChromaKeyConfig &src); void interpolate(ChromaKeyConfig &prev, @@ -93,6 +93,15 @@ public: ChromaKey *plugin; }; +class ChromaKeyReset : public BC_GenericButton +{ +public: + ChromaKeyReset(ChromaKey *plugin, ChromaKeyWindow *gui, int x, int y); + int handle_event(); + ChromaKey *plugin; + ChromaKeyWindow *gui; +}; + class ChromaKeyUseColorPicker : public BC_GenericButton { public: @@ -120,6 +129,7 @@ public: ~ChromaKeyWindow(); void create_objects(); + void update_gui(); void update_sample(); void done_event(int result); @@ -128,6 +138,7 @@ public: ChromaKeyUseValue *use_value; ChromaKeyUseColorPicker *use_colorpicker; ChromaKeySlope *slope; + ChromaKeyReset *reset; BC_SubWindow *sample; ChromaKey *plugin; ChromaKeyColorThread *color_thread; diff --git a/cinelerra-5.1/plugins/chromakeyhsv/chromakey.C b/cinelerra-5.1/plugins/chromakeyhsv/chromakey.C index 5558606b..b0a09757 100644 --- a/cinelerra-5.1/plugins/chromakeyhsv/chromakey.C +++ b/cinelerra-5.1/plugins/chromakeyhsv/chromakey.C @@ -41,6 +41,12 @@ ChromaKeyConfig::ChromaKeyConfig () +{ + reset(); +} + +void ChromaKeyConfig::reset() + { red = 0.0; green = 1.0; @@ -187,6 +193,8 @@ ChromaKeyWindow::create_objects () add_subwindow (use_colorpicker = new ChromaKeyUseColorPicker (plugin, this, x, y)); y += use_colorpicker->get_h() + 10; + + add_subwindow (new ChromaKeyReset (plugin, this, x2+240, y)); add_subwindow (show_mask = new ChromaKeyShowMask (plugin, x2, y)); y += show_mask->get_h() + 5; @@ -465,6 +473,21 @@ ChromaKeyShowMask::handle_event () return 1; } +ChromaKeyReset::ChromaKeyReset (ChromaKeyHSV *plugin, ChromaKeyWindow *gui, int x, int y) + :BC_GenericButton(x, y, _("Reset")) +{ + this->plugin = plugin; + this->gui = gui; +} + +int ChromaKeyReset::handle_event () +{ + plugin->config.reset(); + gui->update_gui(); + plugin->send_configure_change(); + return 1; +} + ChromaKeyUseColorPicker::ChromaKeyUseColorPicker (ChromaKeyHSV * plugin, ChromaKeyWindow * gui, int x, int y) : BC_GenericButton (x, y, _ @@ -1003,22 +1026,27 @@ void ChromaKeyHSV::update_gui() load_configuration(); ChromaKeyWindow *window = (ChromaKeyWindow*)thread->window; window->lock_window(); - window->min_brightness->update(config.min_brightness); - window->max_brightness->update(config.max_brightness); - window->saturation->update(config.saturation); - window->min_saturation->update(config.min_saturation); - window->tolerance->update(config.tolerance); - window->in_slope->update(config.in_slope); - window->out_slope->update(config.out_slope); - window->alpha_offset->update(config.alpha_offset); - window->spill_threshold->update(config.spill_threshold); - window->spill_amount->update(config.spill_amount); - window->show_mask->update(config.show_mask); - window->update_sample(); + window->update_gui(); window->unlock_window(); } } +void ChromaKeyWindow::update_gui() +{ + ChromaKeyConfig &config = plugin->config; + min_brightness->update(config.min_brightness); + max_brightness->update(config.max_brightness); + saturation->update(config.saturation); + min_saturation->update(config.min_saturation); + tolerance->update(config.tolerance); + in_slope->update(config.in_slope); + out_slope->update(config.out_slope); + alpha_offset->update(config.alpha_offset); + spill_threshold->update(config.spill_threshold); + spill_amount->update(config.spill_amount); + show_mask->update(config.show_mask); + update_sample(); +} diff --git a/cinelerra-5.1/plugins/chromakeyhsv/chromakey.h b/cinelerra-5.1/plugins/chromakeyhsv/chromakey.h index 68fd8b3b..51bcbcf7 100644 --- a/cinelerra-5.1/plugins/chromakeyhsv/chromakey.h +++ b/cinelerra-5.1/plugins/chromakeyhsv/chromakey.h @@ -45,7 +45,7 @@ class ChromaKeyConfig { public: ChromaKeyConfig(); - + void reset(); void copy_from(ChromaKeyConfig &src); int equivalent(ChromaKeyConfig &src); void interpolate(ChromaKeyConfig &prev, @@ -90,6 +90,16 @@ public: ChromaKeyWindow *gui; }; +class ChromaKeyReset : public BC_GenericButton +{ +public: + ChromaKeyReset(ChromaKeyHSV *plugin, ChromaKeyWindow *gui, int x, int y); + int handle_event(); + ChromaKeyHSV *plugin; + ChromaKeyWindow *gui; +}; + + class ChromaKeyMinBrightness : public BC_FSlider { @@ -209,6 +219,7 @@ public: void create_objects(); void update_sample(); + void update_gui(); void done_event(int result); ChromaKeyColor *color; @@ -224,6 +235,7 @@ public: ChromaKeySpillThreshold *spill_threshold; ChromaKeySpillAmount *spill_amount; ChromaKeyShowMask *show_mask; + ChromaKeyReset *reset; BC_SubWindow *sample; ChromaKeyHSV *plugin; ChromaKeyColorThread *color_thread; diff --git a/cinelerra-5.1/thirdparty/src/ffmpeg-3.3.4.patch1 b/cinelerra-5.1/thirdparty/src/ffmpeg-3.3.4.patch1 index 295779d2..40d7eddc 100644 --- a/cinelerra-5.1/thirdparty/src/ffmpeg-3.3.4.patch1 +++ b/cinelerra-5.1/thirdparty/src/ffmpeg-3.3.4.patch1 @@ -1,6 +1,15 @@ diff -urN a/configure b/configure --- a/configure 2017-04-12 19:55:54.000000000 -0600 +++ b/configure 2017-04-16 16:12:23.518837543 -0600 +@@ -5812,7 +5812,7 @@ + { check_lib openjpeg.h opj_version -lopenjpeg -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } || + die "ERROR: libopenjpeg not found"; } + enabled libopenmpt && require_pkg_config "libopenmpt >= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create +-enabled libopus && require_pkg_config opus opus_multistream.h opus_multistream_decoder_create ++enabled libopus && use_pkg_config opus opus_multistream.h opus_multistream_decoder_create + enabled libpulse && require_pkg_config libpulse pulse/pulseaudio.h pa_context_new + enabled librtmp && require_pkg_config librtmp librtmp/rtmp.h RTMP_Socket + enabled librubberband && require_pkg_config "rubberband >= 1.8.1" rubberband/rubberband-c.h rubberband_new @@ -5871,7 +5871,9 @@ die "ERROR: libx264 must be installed and version must be >= 0.118."; } && { check_cpp_condition x264.h "X264_MPEG2" &&