summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/ardour_ui.cc9
-rw-r--r--gtk2_ardour/wscript1
-rw-r--r--libs/ardour/ardour/route.h6
-rw-r--r--libs/ardour/ardour/session.h2
-rw-r--r--libs/ardour/route.cc48
-rw-r--r--libs/ardour/session.cc17
-rw-r--r--libs/ardour/wscript1
7 files changed, 76 insertions, 8 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index 4c61752ead..e969f31cf1 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -106,6 +106,7 @@ typedef uint64_t microseconds_t;
#include "global_port_matrix.h"
#include "location_ui.h"
#include "missing_file_dialog.h"
+#include "missing_plugin_dialog.h"
#include "i18n.h"
@@ -2738,6 +2739,14 @@ ARDOUR_UI::load_session (const std::string& path, const std::string& snap_name,
goto out;
}
+ {
+ list<string> const u = new_session->unknown_processors ();
+ if (!u.empty()) {
+ MissingPluginDialog d (_session, u);
+ d.run ();
+ }
+ }
+
/* Now the session been created, add the transport controls */
new_session->add_controllable(roll_controllable);
new_session->add_controllable(stop_controllable);
diff --git a/gtk2_ardour/wscript b/gtk2_ardour/wscript
index ad4c1886d6..c667c7978e 100644
--- a/gtk2_ardour/wscript
+++ b/gtk2_ardour/wscript
@@ -142,6 +142,7 @@ gtk2_ardour_sources = [
'midi_time_axis.cc',
'midi_tracer.cc',
'missing_file_dialog.cc',
+ 'missing_plugin_dialog.cc',
'mixer_group_tabs.cc',
'mixer_strip.cc',
'mixer_ui.cc',
diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h
index 38300a7de9..7702901523 100644
--- a/libs/ardour/ardour/route.h
+++ b/libs/ardour/ardour/route.h
@@ -46,6 +46,7 @@
#include "ardour/route_group_member.h"
#include "ardour/graphnode.h"
#include "ardour/automatable.h"
+#include "ardour/unknown_processor.h"
namespace ARDOUR {
@@ -176,6 +177,9 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
void foreach_processor (boost::function<void(boost::weak_ptr<Processor>)> method) {
Glib::RWLock::ReaderLock lm (_processor_lock);
for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
+ if (boost::dynamic_pointer_cast<UnknownProcessor> (*i)) {
+ break;
+ }
method (boost::weak_ptr<Processor> (*i));
}
}
@@ -199,6 +203,8 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
bool has_io_processor_named (const std::string&);
ChanCount max_processor_streams () const { return processor_max_streams; }
+ std::list<std::string> unknown_processors () const;
+
/* special processors */
boost::shared_ptr<Delivery> monitor_send() const { return _monitor_send; }
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index 2f0a546e5a..1f2e2f9c93 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -797,6 +797,8 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
std::string source_search_path(DataType) const;
void ensure_search_path_includes (const std::string& path, DataType type);
+ std::list<std::string> unknown_processors () const;
+
/* handlers can return an integer value:
0: config.set_audio_search_path() or config.set_midi_search_path() was used
to modify the search path and we should try to find it again.
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 150d53a1fa..97b1402d30 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -59,6 +59,7 @@
#include "ardour/timestamps.h"
#include "ardour/utils.h"
#include "ardour/graph.h"
+#include "ardour/unknown_processor.h"
#include "i18n.h"
@@ -479,6 +480,10 @@ Route::process_output_buffers (BufferSet& bufs,
for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
+ if (boost::dynamic_pointer_cast<UnknownProcessor> (*i)) {
+ break;
+ }
+
if (bufs.count() != (*i)->input_streams()) {
cerr << _name << " bufs = " << bufs.count()
<< " input for " << (*i)->name() << " = " << (*i)->input_streams()
@@ -1512,15 +1517,16 @@ Route::try_configure_processors_unlocked (ChanCount in, ProcessorStreams* err)
DEBUG_TRACE (DEBUG::Processors, string_compose ("%1: configure processors\n", _name));
DEBUG_TRACE (DEBUG::Processors, "{\n");
- for (list<boost::shared_ptr<Processor> >::const_iterator p = _processors.begin(); p != _processors.end(); ++p) {
- DEBUG_TRACE (DEBUG::Processors, string_compose ("\t%1 ID = %2\n", (*p)->name(), (*p)->id()));
- }
- DEBUG_TRACE (DEBUG::Processors, "}\n");
for (ProcessorList::iterator p = _processors.begin(); p != _processors.end(); ++p, ++index) {
+ if (boost::dynamic_pointer_cast<UnknownProcessor> (*p)) {
+ DEBUG_TRACE (DEBUG::Processors, "--- CONFIGURE ABORTED due to unknown processor.\n");
+ break;
+ }
+
if ((*p)->can_support_io_configuration(in, out)) {
- DEBUG_TRACE (DEBUG::Processors, string_compose ("\t%1 in = %2 out = %3\n",(*p)->name(), in, out));
+ DEBUG_TRACE (DEBUG::Processors, string_compose ("\t%1 ID=%2 in=%3 out=%4\n",(*p)->name(), (*p)->id(), in, out));
configuration.push_back(make_pair(in, out));
in = out;
} else {
@@ -1528,10 +1534,15 @@ Route::try_configure_processors_unlocked (ChanCount in, ProcessorStreams* err)
err->index = index;
err->count = in;
}
+ DEBUG_TRACE (DEBUG::Processors, "---- CONFIGURATION FAILED.\n");
+ DEBUG_TRACE (DEBUG::Processors, string_compose ("---- %1 cannot support in=%2 out=%3\n", (*p)->name(), in, out));
+ DEBUG_TRACE (DEBUG::Processors, "}\n");
return list<pair<ChanCount, ChanCount> > ();
}
}
+ DEBUG_TRACE (DEBUG::Processors, "}\n");
+
return configuration;
}
@@ -1561,6 +1572,11 @@ Route::configure_processors_unlocked (ProcessorStreams* err)
list< pair<ChanCount,ChanCount> >::iterator c = configuration.begin();
for (ProcessorList::iterator p = _processors.begin(); p != _processors.end(); ++p, ++c) {
+
+ if (boost::dynamic_pointer_cast<UnknownProcessor> (*p)) {
+ break;
+ }
+
(*p)->configure_io(c->first, c->second);
processor_max_streams = ChanCount::max(processor_max_streams, c->first);
processor_max_streams = ChanCount::max(processor_max_streams, c->second);
@@ -2370,10 +2386,13 @@ Route::set_processor_state (const XMLNode& node)
continue;
}
- if (processor->set_state (**niter, Stateful::current_state_version) == 0) {
- new_order.push_back (processor);
- must_configure = true;
+ if (processor->set_state (**niter, Stateful::current_state_version) != 0) {
+ /* This processor could not be configured. Turn it into a UnknownProcessor */
+ processor.reset (new UnknownProcessor (_session, **niter));
}
+
+ new_order.push_back (processor);
+ must_configure = true;
}
}
}
@@ -3526,4 +3545,17 @@ Route::input_port_count_changing (ChanCount to)
return false;
}
+list<string>
+Route::unknown_processors () const
+{
+ list<string> p;
+
+ Glib::RWLock::ReaderLock lm (_processor_lock);
+ for (ProcessorList::const_iterator i = _processors.begin(); i != _processors.end(); ++i) {
+ if (boost::dynamic_pointer_cast<UnknownProcessor const> (*i)) {
+ p.push_back ((*i)->name ());
+ }
+ }
+ return p;
+}
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index 5190c453d6..c44db41553 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -4212,3 +4212,20 @@ Session::get_speakers()
return *_speakers;
}
+
+list<string>
+Session::unknown_processors () const
+{
+ list<string> p;
+
+ boost::shared_ptr<RouteList> r = routes.reader ();
+ for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
+ list<string> t = (*i)->unknown_processors ();
+ copy (t.begin(), t.end(), back_inserter (p));
+ }
+
+ p.sort ();
+ p.unique ();
+
+ return p;
+}
diff --git a/libs/ardour/wscript b/libs/ardour/wscript
index 3ece2d0784..17b85d15ce 100644
--- a/libs/ardour/wscript
+++ b/libs/ardour/wscript
@@ -200,6 +200,7 @@ libardour_sources = [
'ticker.cc',
'track.cc',
'transient_detector.cc',
+ 'unknown_processor.cc',
'user_bundle.cc',
'utils.cc',
'vbap.cc',