/usr/include/CLAM/RunTimeLadspaLibraryLoader.hxx is in libclam-dev 1.4.0-5build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76  | #ifndef RunTimeLadspaLibraryLoader_hxx
#define RunTimeLadspaLibraryLoader_hxx
#include <dirent.h>
//#include "RunTimeLibraryLoader.hxx"
#include "ProcessingFactory.hxx" 
#include "LadspaWrapperCreator.hxx"
#include <ladspa.h>
class RunTimeLadspaLibraryLoader : public RunTimeLibraryLoader
{
protected:
	virtual const bool needReleaseHandlerOnReload() const { return false;} 
	void SetupLibrary(void* handle, const std::string & pluginFullFilename) const
	{
		LADSPA_Descriptor_Function descriptorTable = 0;
		descriptorTable = (LADSPA_Descriptor_Function)GetSymbol(handle, "ladspa_descriptor");
		if (!descriptorTable)
		{
			std::cout << "[LADSPA Plugin] Warning: trying to open non ladspa plugin: " << pluginFullFilename << std::endl;
			return;
		}
		//std::cout << "[LADSPA] \topened plugin: " << pluginFullFilename << std::endl;
		CLAM::ProcessingFactory& factory = CLAM::ProcessingFactory::GetInstance();
		for (unsigned long i=0; descriptorTable(i); i++)
		{
			LADSPA_Descriptor* descriptor = (LADSPA_Descriptor*)descriptorTable(i);
			const char* id = descriptor->Label;
			factory.AddCreatorWarningRepetitions(id,
					new CLAM::LadspaWrapperCreator(pluginFullFilename,
						i,
						id));
			factory.AddAttribute(id, "category", "LADSPA");
			factory.AddAttribute(id, "description", descriptor->Name);
			factory.AddAttribute(id, "library", pluginFullFilename);
			std::ostringstream oss;
			oss << descriptor->Label << "_buffer" << i;
			std::string id2=oss.str();
			factory.AddCreatorWarningRepetitions(id2,
					new CLAM::LadspaWrapperBufferCreator(pluginFullFilename,
						i,
						id2));
			factory.AddAttribute(id2, "category", "LADSPA_BUFFER");
			factory.AddAttribute(id2, "description", descriptor->Name);
			factory.AddAttribute(id2, "library", pluginFullFilename);
			//std::cout << "[LADSPA] added \"" << plugin.factoryID << "\" to the Factory" << std::endl;
		}
		if (ReleaseLibraryHandler(handle, pluginFullFilename))
		{
			std::cout<<"[LADSPA Plugin] error unloading library handle of: " << pluginFullFilename<<std::endl;
			std::cout<<LibraryLoadError()<<std::endl;
		}
	}
	const char ** standardPaths() const
	{ 
		static const char * result[] = 
		{
			"/usr/local/lib/ladspa",
			"/usr/lib/ladspa",
			0
		};
		return result;
	}
	const char * homePath() const { return  "/.ladspa"; }
	const char * pathEnvironmentVar() const { return  "LADSPA_PATH"; }
	const char * libraryType() const { return  "LADSPA"; }
};
#endif // RunTimeLadspaLibraryLoader_hxx
 |