comparison transform/TransformFactory.cpp @ 1844:5b1b03c1d8d4

Accept more than one library URI for a plugin; consistency checks for packs
author Chris Cannam
date Mon, 20 Apr 2020 15:42:51 +0100
parents 19fa7bf208d8
children 6f626cfdba51
comparison
equal deleted inserted replaced
1843:3ec563af0a4f 1844:5b1b03c1d8d4
640 if (m_uninstalledTransformsPopulated) return; 640 if (m_uninstalledTransformsPopulated) return;
641 641
642 PluginRDFIndexer::getInstance()->indexConfiguredURLs(); 642 PluginRDFIndexer::getInstance()->indexConfiguredURLs();
643 if (m_exiting) return; 643 if (m_exiting) return;
644 644
645 PluginRDFIndexer::getInstance()->performConsistencyChecks();
646
645 //!!! This will be amazingly slow 647 //!!! This will be amazingly slow
646 648
647 QStringList ids = PluginRDFIndexer::getInstance()->getIndexedPluginIds(); 649 QStringList ids = PluginRDFIndexer::getInstance()->getIndexedPluginIds();
648 650
649 for (QStringList::const_iterator i = ids.begin(); i != ids.end(); ++i) { 651 for (QStringList::const_iterator i = ids.begin(); i != ids.end(); ++i) {
651 PluginRDFDescription desc(*i); 653 PluginRDFDescription desc(*i);
652 654
653 QString name = desc.getPluginName(); 655 QString name = desc.getPluginName();
654 #ifdef DEBUG_TRANSFORM_FACTORY 656 #ifdef DEBUG_TRANSFORM_FACTORY
655 if (name == "") { 657 if (name == "") {
656 cerr << "TransformFactory::populateUninstalledTransforms: " 658 SVCERR << "TransformFactory::populateUninstalledTransforms: "
657 << "No name available for plugin " << *i 659 << "No name available for plugin " << *i
658 << ", skipping" << endl; 660 << ", skipping" << endl;
659 continue; 661 continue;
660 } 662 }
661 #endif 663 #endif
670 672
671 TransformId tid = Transform::getIdentifierForPluginOutput(*i, *j); 673 TransformId tid = Transform::getIdentifierForPluginOutput(*i, *j);
672 674
673 if (m_transforms.find(tid) != m_transforms.end()) { 675 if (m_transforms.find(tid) != m_transforms.end()) {
674 #ifdef DEBUG_TRANSFORM_FACTORY 676 #ifdef DEBUG_TRANSFORM_FACTORY
675 cerr << "TransformFactory::populateUninstalledTransforms: " 677 SVCERR << "TransformFactory::populateUninstalledTransforms: "
676 << tid << " is installed; adding info url if appropriate, skipping rest" << endl; 678 << tid << " is installed; adding info url if appropriate, skipping rest" << endl;
677 #endif 679 #endif
678 if (infoUrl != "") { 680 if (infoUrl != "") {
679 if (m_transforms[tid].infoUrl == "") { 681 if (m_transforms[tid].infoUrl == "") {
680 m_transforms[tid].infoUrl = infoUrl; 682 m_transforms[tid].infoUrl = infoUrl;
681 } 683 }
682 } 684 }
683 continue; 685 continue;
684 } 686 }
685 687
686 #ifdef DEBUG_TRANSFORM_FACTORY 688 #ifdef DEBUG_TRANSFORM_FACTORY
687 cerr << "TransformFactory::populateUninstalledTransforms: " 689 SVCERR << "TransformFactory::populateUninstalledTransforms: "
688 << "adding " << tid << endl; 690 << "adding " << tid << endl;
689 #endif 691 #endif
690 692
691 QString oname = desc.getOutputName(*j); 693 QString oname = desc.getOutputName(*j);
692 if (oname == "") oname = *j; 694 if (oname == "") oname = *j;
693 695
737 } 739 }
738 740
739 m_uninstalledTransformsPopulated = true; 741 m_uninstalledTransformsPopulated = true;
740 742
741 #ifdef DEBUG_TRANSFORM_FACTORY 743 #ifdef DEBUG_TRANSFORM_FACTORY
742 cerr << "populateUninstalledTransforms exiting" << endl; 744 SVCERR << "populateUninstalledTransforms exiting" << endl;
743 #endif 745 #endif
744 } 746 }
745 747
746 Transform 748 Transform
747 TransformFactory::getDefaultTransformFor(TransformId id, sv_samplerate_t rate) 749 TransformFactory::getDefaultTransformFor(TransformId id, sv_samplerate_t rate)