fix “no per-thread pool” abort
[ardour.git] / libs / ardour / port_manager.cc
index c7adefc531c7528d8a1bd3eab74ddfe7335201ac..de78dfd319b042dc504731f98a2e74489a10d5e3 100644 (file)
@@ -108,6 +108,23 @@ PortManager::make_port_name_non_relative (const string& portname) const
        return str;
 }
 
+std::string
+PortManager::get_pretty_name_by_name(const std::string& portname) const
+{
+       PortEngine::PortHandle ph = _backend->get_port_by_name (portname);
+       if (ph) {
+               std::string value;
+               std::string type;
+               if (0 == _backend->get_port_property (ph,
+                                       "http://jackaudio.org/metadata/pretty-name",
+                                       value, type))
+               {
+                       return value;
+               }
+       }
+       return "";
+}
+
 bool
 PortManager::port_is_mine (const string& portname) const
 {
@@ -451,7 +468,7 @@ PortManager::reestablish_ports ()
        for (i = p->begin(); i != p->end(); ++i) {
                if (i->second->reestablish ()) {
                        error << string_compose (_("Re-establising port %1 failed"), i->second->name()) << endmsg;
-                       cerr << string_compose (_("Re-establising port %1 failed"), i->second->name()) << endl;
+                       std::cerr << string_compose (_("Re-establising port %1 failed"), i->second->name()) << std::endl;
                        break;
                }
        }