From: Good Guy Date: Thu, 26 Dec 2019 02:57:42 +0000 (-0700) Subject: add haupauge-1657 dual usb capture support, add deinterlace to recordmonitor, asset... X-Git-Tag: 2019-12~5 X-Git-Url: https://cinelerra-gg.org/git/?a=commitdiff_plain;h=3b4b6f588c4f2643316afcbc486ca6a35c16a431;p=goodguy%2Fcinelerra.git add haupauge-1657 dual usb capture support, add deinterlace to recordmonitor, asset/clip close_edl and note fixes --- diff --git a/cinelerra-5.1/cinelerra/assetpopup.C b/cinelerra-5.1/cinelerra/assetpopup.C index d8142f02..f4364542 100644 --- a/cinelerra-5.1/cinelerra/assetpopup.C +++ b/cinelerra-5.1/cinelerra/assetpopup.C @@ -77,6 +77,7 @@ void AssetPopup::create_objects() add_item(info = new AssetPopupInfo(mwindow, this)); add_item(format = new AWindowListFormat(mwindow, gui)); add_item(open_edl = new AssetPopupOpenEDL(mwindow, this)); + add_item(close_edl = new AssetPopupCloseEDL(mwindow, gui)); add_item(to_clip = new AssetPopupToClip(mwindow, this)); add_item(sort = new AssetPopupSort(mwindow, this)); add_item(index = new AssetPopupBuildIndex(mwindow, this)); @@ -207,6 +208,26 @@ int AssetPopupOpenEDL::handle_event() return 1; } +AssetPopupCloseEDL::AssetPopupCloseEDL(MWindow *mwindow, AWindowGUI *gui) + : BC_MenuItem(_("Close EDL")) +{ + this->mwindow = mwindow; + this->gui = gui; +} +AssetPopupCloseEDL::~AssetPopupCloseEDL() +{ +} + +int AssetPopupCloseEDL::handle_event() +{ + gui->unlock_window(); + mwindow->gui->lock_window("AssetPopupCloseEDL::handle_event"); + mwindow->stack_pop(); + mwindow->gui->unlock_window(); + gui->lock_window("AssetPopupCloseEDL::handle_event"); + return 1; +} + AssetPopupToClip::AssetPopupToClip(MWindow *mwindow, AssetPopup *popup) : BC_MenuItem(_("EDL to clip")) @@ -473,6 +494,7 @@ void AssetListMenu::create_objects() { add_item(load_file = new AssetPopupLoadFile(mwindow, gui)); add_item(format = new AWindowListFormat(mwindow, gui)); + add_item(close_edl = new AssetPopupCloseEDL(mwindow, gui)); add_item(select_used = new AssetSelectUsed(mwindow, gui)); BC_SubMenu *submenu; select_used->add_submenu(submenu = new BC_SubMenu()); diff --git a/cinelerra-5.1/cinelerra/assetpopup.h b/cinelerra-5.1/cinelerra/assetpopup.h index 22624e47..5620e561 100644 --- a/cinelerra-5.1/cinelerra/assetpopup.h +++ b/cinelerra-5.1/cinelerra/assetpopup.h @@ -53,6 +53,7 @@ public: AssetPopupInfo *info; AWindowListFormat *format; AssetPopupOpenEDL *open_edl; + AssetPopupCloseEDL *close_edl; AssetPopupToClip *to_clip; AssetPopupSort *sort; AssetPopupBuildIndex *index; @@ -88,6 +89,18 @@ public: AssetPopup *popup; }; +class AssetPopupCloseEDL : public BC_MenuItem +{ +public: + AssetPopupCloseEDL(MWindow *mwindow, AWindowGUI *gui); + ~AssetPopupCloseEDL(); + + int handle_event(); + + MWindow *mwindow; + AWindowGUI *gui; +}; + class AssetPopupToClip : public BC_MenuItem { public: @@ -256,6 +269,7 @@ public: AWindowGUI *gui; AssetPopupLoadFile *load_file; AWindowListFormat *format; + AssetPopupCloseEDL *close_edl; AssetSnapshot *asset_snapshot; AssetGrabshot *asset_grabshot; AssetSelectUsed *select_used; diff --git a/cinelerra-5.1/cinelerra/assetpopup.inc b/cinelerra-5.1/cinelerra/assetpopup.inc index 096c729b..7136d07a 100644 --- a/cinelerra-5.1/cinelerra/assetpopup.inc +++ b/cinelerra-5.1/cinelerra/assetpopup.inc @@ -35,6 +35,7 @@ class AssetPopup; class AssetPopupInfo; class AssetPopupOpenEDL; +class AssetPopupCloseEDL; class AssetPopupToClip; class AssetPopupSort; class AssetPopupBuildIndex; diff --git a/cinelerra-5.1/cinelerra/clippopup.C b/cinelerra-5.1/cinelerra/clippopup.C index c38efd99..cbff1d70 100644 --- a/cinelerra-5.1/cinelerra/clippopup.C +++ b/cinelerra-5.1/cinelerra/clippopup.C @@ -67,6 +67,7 @@ void ClipPopup::create_objects() add_item(format = new AWindowListFormat(mwindow, gui)); add_item(sort = new ClipPopupSort(mwindow, this)); add_item(open_edl = new ClipPopupOpenEDL(mwindow, this)); + add_item(close_edl = new ClipPopupCloseEDL(mwindow, gui)); add_item(to_media = new ClipPopupToMedia(mwindow, this)); add_item(view = new ClipPopupView(mwindow, this)); add_item(view_window = new ClipPopupViewWindow(mwindow, this)); @@ -406,6 +407,7 @@ ClipListMenu::~ClipListMenu() void ClipListMenu::create_objects() { add_item(format = new AWindowListFormat(mwindow, gui)); + add_item(close_edl = new ClipPopupCloseEDL(mwindow, gui)); add_item(new AWindowListSort(mwindow, gui)); add_item(new ClipPasteToFolder(mwindow)); update(); @@ -460,3 +462,23 @@ int ClipPopupOpenEDL::handle_event() return 1; } +ClipPopupCloseEDL::ClipPopupCloseEDL(MWindow *mwindow, AWindowGUI *gui) + : BC_MenuItem(_("Close EDL")) +{ + this->mwindow = mwindow; + this->gui = gui; +} +ClipPopupCloseEDL::~ClipPopupCloseEDL() +{ +} + +int ClipPopupCloseEDL::handle_event() +{ + gui->unlock_window(); + mwindow->gui->lock_window("ClipPopupCloseEDL::handle_event"); + mwindow->stack_pop(); + mwindow->gui->unlock_window(); + gui->lock_window("ClipPopupCloseEDL::handle_event"); + return 1; +} + diff --git a/cinelerra-5.1/cinelerra/clippopup.h b/cinelerra-5.1/cinelerra/clippopup.h index c09508aa..6f09598e 100644 --- a/cinelerra-5.1/cinelerra/clippopup.h +++ b/cinelerra-5.1/cinelerra/clippopup.h @@ -54,6 +54,7 @@ public: AWindowListFormat *format; ClipPopupSort *sort; ClipPopupOpenEDL *open_edl; + ClipPopupCloseEDL *close_edl; ClipPopupView *view; ClipPopupViewWindow *view_window; ClipPopupCopy *copy; @@ -209,6 +210,7 @@ public: void create_objects(); void update(); AWindowListFormat *format; + ClipPopupCloseEDL *close_edl; MWindow *mwindow; AWindowGUI *gui; }; @@ -237,4 +239,16 @@ public: ClipPopup *popup; }; +class ClipPopupCloseEDL : public BC_MenuItem +{ +public: + ClipPopupCloseEDL(MWindow *mwindow, AWindowGUI *gui); + ~ClipPopupCloseEDL(); + + int handle_event(); + + MWindow *mwindow; + AWindowGUI *gui; +}; + #endif diff --git a/cinelerra-5.1/cinelerra/clippopup.inc b/cinelerra-5.1/cinelerra/clippopup.inc index 21399eaf..8932c9a1 100644 --- a/cinelerra-5.1/cinelerra/clippopup.inc +++ b/cinelerra-5.1/cinelerra/clippopup.inc @@ -38,5 +38,6 @@ class ClipListFormat; class ClipListMenu; class ClipPopupToMedia; class ClipPopupOpenEDL; +class ClipPopupCloseEDL; #endif diff --git a/cinelerra-5.1/cinelerra/devicedvbinput.C b/cinelerra-5.1/cinelerra/devicedvbinput.C index 79431089..d7bc60b8 100644 --- a/cinelerra-5.1/cinelerra/devicedvbinput.C +++ b/cinelerra-5.1/cinelerra/devicedvbinput.C @@ -488,7 +488,7 @@ int DeviceDVBInput::dvb_status() signal_ber = ioctl(fe, FE_READ_BER, &rate) ? -1 : rate; uint32_t errs = 0; signal_unc = ioctl(fe, FE_READ_UNCORRECTED_BLOCKS, &errs) ? -1 : errs; - if( signal_lck && signal_ber >= 0 && signal_ber < 255 ) locked = 1; + if( signal_lck && signal_ber < 255 ) locked = 1; if( dvb_locked != locked ) { printf(_("** %scarrier, dvb_locked %s\n"), signal_crr ? "" : _("no "), locked ? _("lock") : _("lost") ); diff --git a/cinelerra-5.1/cinelerra/edl.C b/cinelerra-5.1/cinelerra/edl.C index dbda78c1..b46a4102 100644 --- a/cinelerra-5.1/cinelerra/edl.C +++ b/cinelerra-5.1/cinelerra/edl.C @@ -664,14 +664,19 @@ void EDL::create_nested(EDL *nested) void EDL::overwrite_clip(EDL *clip) { int folder = folder_no; - char clip_title[BCTEXTLEN]; strcpy(clip_title, local_session->clip_title); - char clip_notes[BCTEXTLEN]; strcpy(clip_notes, local_session->clip_notes); - char clip_icon[BCSTRLEN]; strcpy(clip_icon, local_session->clip_icon); + char clip_title[BCTEXTLEN], clip_notes[BCTEXTLEN], clip_icon[BCSTRLEN]; + if( parent_edl ) { + strcpy(clip_title, local_session->clip_title); + strcpy(clip_notes, local_session->clip_notes); + strcpy(clip_icon, local_session->clip_icon); + } copy_all(clip); folder_no = folder; - strcpy(local_session->clip_title, clip_title); - strcpy(local_session->clip_notes, clip_notes); - strcpy(local_session->clip_icon, clip_icon); + if( parent_edl ) { + strcpy(local_session->clip_title, clip_title); + strcpy(local_session->clip_notes, clip_notes); + strcpy(local_session->clip_icon, clip_icon); + } if( !clip_icon[0] ) return; // discard old clip icon to reconstruct char clip_icon_path[BCTEXTLEN]; diff --git a/cinelerra-5.1/cinelerra/mwindow.C b/cinelerra-5.1/cinelerra/mwindow.C index 8d27ff96..39c99643 100644 --- a/cinelerra-5.1/cinelerra/mwindow.C +++ b/cinelerra-5.1/cinelerra/mwindow.C @@ -3761,7 +3761,7 @@ void MWindow::stack_pop() forget_nested_edl(edl); StackItem &item = stack.last(); // session edl replaced, overwrite and save clip data - if( item.new_edl != edl && item.new_edl->parent_edl ) + if( item.new_edl != edl ) item.new_edl->overwrite_clip(edl); edl->remove_user(); edl = item.edl; @@ -3802,11 +3802,14 @@ void MWindow::clip_to_media() EDL *clip = session->drag_clips->values[i]; time_t dt; time(&dt); struct tm dtm; localtime_r(&dt, &dtm); - char path[BCSTRLEN], *cp = path, *ep = cp+sizeof(path)-1; + char path[BCTEXTLEN], *cp = path, *ep = cp+sizeof(path)-1; +// path_basename = "Nested_-