mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 16:24:57 +01:00
[VST] scan timeout display and per plugin timeout override.
This commit is contained in:
parent
da73b0f670
commit
ba0ae4818a
7 changed files with 32 additions and 8 deletions
|
|
@ -3866,7 +3866,7 @@ ARDOUR_UI::plugin_scan_dialog (std::string type, std::string plugin, bool can_ca
|
||||||
timeout_button->show();
|
timeout_button->show();
|
||||||
|
|
||||||
scan_pbar = manage(new ProgressBar());
|
scan_pbar = manage(new ProgressBar());
|
||||||
//scan_pbar->set_size_request(300,-1);
|
scan_pbar->set_orientation(Gtk::PROGRESS_RIGHT_TO_LEFT);
|
||||||
scan_pbar->set_text(_("Scan Timeout"));
|
scan_pbar->set_text(_("Scan Timeout"));
|
||||||
scan_pbar->show();
|
scan_pbar->show();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -669,7 +669,9 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
||||||
void gui_idle_handler ();
|
void gui_idle_handler ();
|
||||||
|
|
||||||
void cancel_plugin_scan ();
|
void cancel_plugin_scan ();
|
||||||
|
void cancel_plugin_timeout ();
|
||||||
void plugin_scan_dialog (std::string type, std::string plugin, bool);
|
void plugin_scan_dialog (std::string type, std::string plugin, bool);
|
||||||
|
void plugin_scan_timeout (int);
|
||||||
|
|
||||||
void session_format_mismatch (std::string, std::string);
|
void session_format_mismatch (std::string, std::string);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,7 @@ namespace ARDOUR {
|
||||||
|
|
||||||
extern LIBARDOUR_API PBD::Signal1<void,std::string> BootMessage;
|
extern LIBARDOUR_API PBD::Signal1<void,std::string> BootMessage;
|
||||||
extern LIBARDOUR_API PBD::Signal3<void,std::string,std::string,bool> PluginScanMessage;
|
extern LIBARDOUR_API PBD::Signal3<void,std::string,std::string,bool> PluginScanMessage;
|
||||||
|
extern LIBARDOUR_API PBD::Signal1<void,int> PluginScanTimeout;
|
||||||
extern LIBARDOUR_API PBD::Signal0<void> GUIIdle;
|
extern LIBARDOUR_API PBD::Signal0<void> GUIIdle;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -53,13 +53,15 @@ class LIBARDOUR_API PluginManager : public boost::noncopyable {
|
||||||
|
|
||||||
void refresh (bool cache_only = false);
|
void refresh (bool cache_only = false);
|
||||||
void cancel_plugin_scan();
|
void cancel_plugin_scan();
|
||||||
|
void cancel_plugin_timeout();
|
||||||
void clear_vst_cache ();
|
void clear_vst_cache ();
|
||||||
void clear_vst_blacklist ();
|
void clear_vst_blacklist ();
|
||||||
|
|
||||||
const std::string get_default_windows_vst_path() const { return windows_vst_path; }
|
const std::string get_default_windows_vst_path() const { return windows_vst_path; }
|
||||||
const std::string get_default_lxvst_path() const { return lxvst_path; }
|
const std::string get_default_lxvst_path() const { return lxvst_path; }
|
||||||
|
|
||||||
bool cancelled () { return cancel_scan; }
|
bool cancelled () { return _cancel_scan; }
|
||||||
|
bool no_timeout () { return _cancel_timeout; }
|
||||||
|
|
||||||
enum PluginStatusType {
|
enum PluginStatusType {
|
||||||
Normal = 0,
|
Normal = 0,
|
||||||
|
|
@ -112,7 +114,8 @@ class LIBARDOUR_API PluginManager : public boost::noncopyable {
|
||||||
std::string windows_vst_path;
|
std::string windows_vst_path;
|
||||||
std::string lxvst_path;
|
std::string lxvst_path;
|
||||||
|
|
||||||
bool cancel_scan;
|
bool _cancel_scan;
|
||||||
|
bool _cancel_timeout;
|
||||||
|
|
||||||
void ladspa_refresh ();
|
void ladspa_refresh ();
|
||||||
void windows_vst_refresh (bool cache_only = false);
|
void windows_vst_refresh (bool cache_only = false);
|
||||||
|
|
|
||||||
|
|
@ -126,6 +126,7 @@ mix_buffers_no_gain_t ARDOUR::mix_buffers_no_gain = 0;
|
||||||
|
|
||||||
PBD::Signal1<void,std::string> ARDOUR::BootMessage;
|
PBD::Signal1<void,std::string> ARDOUR::BootMessage;
|
||||||
PBD::Signal3<void,std::string,std::string,bool> ARDOUR::PluginScanMessage;
|
PBD::Signal3<void,std::string,std::string,bool> ARDOUR::PluginScanMessage;
|
||||||
|
PBD::Signal1<void,int> ARDOUR::PluginScanTimeout;
|
||||||
PBD::Signal0<void> ARDOUR::GUIIdle;
|
PBD::Signal0<void> ARDOUR::GUIIdle;
|
||||||
|
|
||||||
namespace ARDOUR {
|
namespace ARDOUR {
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,8 @@ PluginManager::PluginManager ()
|
||||||
, _ladspa_plugin_info(0)
|
, _ladspa_plugin_info(0)
|
||||||
, _lv2_plugin_info(0)
|
, _lv2_plugin_info(0)
|
||||||
, _au_plugin_info(0)
|
, _au_plugin_info(0)
|
||||||
, cancel_scan(false)
|
, _cancel_scan(false)
|
||||||
|
, _cancel_timeout(false)
|
||||||
{
|
{
|
||||||
char* s;
|
char* s;
|
||||||
string lrdf_path;
|
string lrdf_path;
|
||||||
|
|
@ -192,7 +193,7 @@ void
|
||||||
PluginManager::refresh (bool cache_only)
|
PluginManager::refresh (bool cache_only)
|
||||||
{
|
{
|
||||||
DEBUG_TRACE (DEBUG::PluginManager, "PluginManager::refresh\n");
|
DEBUG_TRACE (DEBUG::PluginManager, "PluginManager::refresh\n");
|
||||||
cancel_scan = false;
|
_cancel_scan = false;
|
||||||
|
|
||||||
BootMessage (_("Scanning LADSPA Plugins"));
|
BootMessage (_("Scanning LADSPA Plugins"));
|
||||||
ladspa_refresh ();
|
ladspa_refresh ();
|
||||||
|
|
@ -222,13 +223,19 @@ PluginManager::refresh (bool cache_only)
|
||||||
BootMessage (_("Plugin Scan Complete..."));
|
BootMessage (_("Plugin Scan Complete..."));
|
||||||
PluginListChanged (); /* EMIT SIGNAL */
|
PluginListChanged (); /* EMIT SIGNAL */
|
||||||
PluginScanMessage(X_("closeme"), "", false);
|
PluginScanMessage(X_("closeme"), "", false);
|
||||||
cancel_scan = false;
|
_cancel_scan = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PluginManager::cancel_plugin_scan ()
|
PluginManager::cancel_plugin_scan ()
|
||||||
{
|
{
|
||||||
cancel_scan = true;
|
_cancel_scan = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
PluginManager::cancel_plugin_timeout ()
|
||||||
|
{
|
||||||
|
_cancel_timeout = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -674,6 +681,7 @@ PluginManager::windows_vst_discover (string path, bool cache_only)
|
||||||
{
|
{
|
||||||
DEBUG_TRACE (DEBUG::PluginManager, string_compose ("windows_vst_discover '%1'\n", path));
|
DEBUG_TRACE (DEBUG::PluginManager, string_compose ("windows_vst_discover '%1'\n", path));
|
||||||
|
|
||||||
|
_cancel_timeout = false;
|
||||||
vector<VSTInfo*> * finfos = vstfx_get_info_fst (const_cast<char *> (path.c_str()),
|
vector<VSTInfo*> * finfos = vstfx_get_info_fst (const_cast<char *> (path.c_str()),
|
||||||
cache_only ? VST_SCAN_CACHE_ONLY : VST_SCAN_USE_APP);
|
cache_only ? VST_SCAN_CACHE_ONLY : VST_SCAN_USE_APP);
|
||||||
|
|
||||||
|
|
@ -797,6 +805,7 @@ PluginManager::lxvst_discover (string path, bool cache_only)
|
||||||
{
|
{
|
||||||
DEBUG_TRACE (DEBUG::PluginManager, string_compose ("checking apparent LXVST plugin at %1\n", path));
|
DEBUG_TRACE (DEBUG::PluginManager, string_compose ("checking apparent LXVST plugin at %1\n", path));
|
||||||
|
|
||||||
|
_cancel_timeout = false;
|
||||||
vector<VSTInfo*> * finfos = vstfx_get_info_lx (const_cast<char *> (path.c_str()),
|
vector<VSTInfo*> * finfos = vstfx_get_info_lx (const_cast<char *> (path.c_str()),
|
||||||
cache_only ? VST_SCAN_CACHE_ONLY : VST_SCAN_USE_APP);
|
cache_only ? VST_SCAN_CACHE_ONLY : VST_SCAN_USE_APP);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -916,7 +916,15 @@ vstfx_get_info (const char* dllpath, enum ARDOUR::PluginType type, enum VSTScanM
|
||||||
return infos;
|
return infos;
|
||||||
} else {
|
} else {
|
||||||
int timeout = PLUGIN_SCAN_TIMEOUT;
|
int timeout = PLUGIN_SCAN_TIMEOUT;
|
||||||
while (scanner.is_running() && --timeout) {
|
bool no_timeout = (timeout <= 0);
|
||||||
|
ARDOUR::PluginScanTimeout(timeout);
|
||||||
|
while (scanner.is_running() && (no_timeout || timeout > 0)) {
|
||||||
|
if (!no_timeout && !ARDOUR::PluginManager::instance().no_timeout()) {
|
||||||
|
if (timeout%5 == 0) {
|
||||||
|
ARDOUR::PluginScanTimeout(timeout);
|
||||||
|
}
|
||||||
|
--timeout;
|
||||||
|
}
|
||||||
ARDOUR::GUIIdle();
|
ARDOUR::GUIIdle();
|
||||||
Glib::usleep (100000);
|
Glib::usleep (100000);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue