comparison transform/TransformFactory.cpp @ 1845:6f626cfdba51

Pull out Provider struct
author Chris Cannam
date Mon, 20 Apr 2020 18:45:47 +0100
parents 5b1b03c1d8d4
children 7b6e18380e8f
comparison
equal deleted inserted replaced
1844:5b1b03c1d8d4 1845:6f626cfdba51
662 } 662 }
663 #endif 663 #endif
664 664
665 QString description = desc.getPluginDescription(); 665 QString description = desc.getPluginDescription();
666 QString maker = desc.getPluginMaker(); 666 QString maker = desc.getPluginMaker();
667 QString infoUrl = desc.getPluginInfoURL(); 667 Provider provider = desc.getPluginProvider();
668 668
669 QStringList oids = desc.getOutputIds(); 669 QStringList oids = desc.getOutputIds();
670 670
671 for (QStringList::const_iterator j = oids.begin(); j != oids.end(); ++j) { 671 for (QStringList::const_iterator j = oids.begin(); j != oids.end(); ++j) {
672 672
673 TransformId tid = Transform::getIdentifierForPluginOutput(*i, *j); 673 TransformId tid = Transform::getIdentifierForPluginOutput(*i, *j);
674 674
675 if (m_transforms.find(tid) != m_transforms.end()) { 675 if (m_transforms.find(tid) != m_transforms.end()) {
676 #ifdef DEBUG_TRANSFORM_FACTORY 676 #ifdef DEBUG_TRANSFORM_FACTORY
677 SVCERR << "TransformFactory::populateUninstalledTransforms: " 677 SVCERR << "TransformFactory::populateUninstalledTransforms: "
678 << tid << " is installed; adding info url if appropriate, skipping rest" << endl; 678 << tid << " is installed; adding provider if present, skipping rest" << endl;
679 #endif 679 #endif
680 if (infoUrl != "") { 680 if (provider != Provider()) {
681 if (m_transforms[tid].infoUrl == "") { 681 if (m_transforms[tid].provider == Provider()) {
682 m_transforms[tid].infoUrl = infoUrl; 682 m_transforms[tid].provider = provider;
683 } 683 }
684 } 684 }
685 continue; 685 continue;
686 } 686 }
687 687
726 726
727 td.friendlyName = name; //!!!??? 727 td.friendlyName = name; //!!!???
728 td.description = description; 728 td.description = description;
729 td.longDescription = longDescription; 729 td.longDescription = longDescription;
730 td.maker = maker; 730 td.maker = maker;
731 td.infoUrl = infoUrl; 731 td.provider = provider;
732 td.units = ""; 732 td.units = "";
733 td.configurable = false; 733 td.configurable = false;
734 734
735 m_uninstalledTransforms[tid] = td; 735 m_uninstalledTransforms[tid] = td;
736 } 736 }
854 if (m_transforms.find(identifier) != m_transforms.end()) { 854 if (m_transforms.find(identifier) != m_transforms.end()) {
855 return m_transforms[identifier].units; 855 return m_transforms[identifier].units;
856 } else return ""; 856 } else return "";
857 } 857 }
858 858
859 QString 859 Provider
860 TransformFactory::getTransformInfoUrl(TransformId identifier) 860 TransformFactory::getTransformProvider(TransformId identifier)
861 { 861 {
862 if (m_transforms.find(identifier) != m_transforms.end()) { 862 if (m_transforms.find(identifier) != m_transforms.end()) {
863 return m_transforms[identifier].infoUrl; 863 return m_transforms[identifier].provider;
864 } else return ""; 864 } else return {};
865 } 865 }
866 866
867 Vamp::Plugin::InputDomain 867 Vamp::Plugin::InputDomain
868 TransformFactory::getTransformInputDomain(TransformId identifier) 868 TransformFactory::getTransformInputDomain(TransformId identifier)
869 { 869 {