From b5ac1eb4bc06e6ae3cd2a908270640bc5181257b Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Mon, 18 Feb 2013 17:12:27 +0000 Subject: plugins loading and failing --- rotord/rotord.cpp | 41 +++++++++++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 6 deletions(-) (limited to 'rotord/rotord.cpp') diff --git a/rotord/rotord.cpp b/rotord/rotord.cpp index e794b7d..e6460c6 100755 --- a/rotord/rotord.cpp +++ b/rotord/rotord.cpp @@ -1,5 +1,34 @@ #include "rotord.h" +/* +ultimately- audio analysis request will spawn a task - there will be another call that will check progress + +audio analysis will be saved - to a file? into a db? + +for now - dump analysis into the http request + +architecture - running rendering process + +main vamp library segmenter, beat detector + +http://127.0.0.1:9000/vamp/qm-vamp-plugins/qm-segmenter/01.wav + +Running plugin: "qm-segmenter"... +Using block size = 26460, step size = 8820 +Plugin accepts 1 -> 1 channel(s) +Sound file has 2 (will mix/augment if necessary) +Output is: "segmentation" +Done +./rotord: symbol lookup error: /usr/local/lib/vamp/qm-vamp-plugins.so: undefined symbol: clapack_dgetrf + +next: +load a movie and retreive frames +save a movie + +how do we deal with frames in libavcodec - can we request a frame by number +how do we deal with resolution +*/ + RotorRequestHandler::RotorRequestHandler(const std::string& format): _format(format){ } @@ -32,7 +61,7 @@ void AudioAnalyserHandler::handleRequest(HTTPServerRequest& request,HTTPServerRe response.setChunkedTransferEncoding(true); response.setContentType("text/html"); - string audioData=vampHost:: + //string audioData=vampHost::runPlugin(); std::ostream& ostr = response.send(); ostr << "RotorServer powered by " @@ -40,12 +69,10 @@ void AudioAnalyserHandler::handleRequest(HTTPServerRequest& request,HTTPServerRe ostr << "</head>"; ostr << "<body><p style=\"text-align: center; " "font-size: 48px;\">"; - ostr << dt; + vampHost::runPlugin("",settings.soname,settings.filtername, "",0, settings.inputFile, ostr,true); ostr << "</p></body></html>"; } -AudioAnalyserFactory::AudioAnalyserFactory(const vampHost::Settings& _settings): settings(_settings){ -} HTTPRequestHandler* RotorRequestHandlerFactory::createRequestHandler(const HTTPServerRequest& request){ Application& app = Application::instance(); @@ -71,7 +98,9 @@ HTTPRequestHandler* RotorRequestHandlerFactory::createRequestHandler(const HTTPS else if (segments[0]=="vamp"&&segments.size()>3) { // vamp/plugin/filter/filename // how do deal with error condition? - return new RotorRequestHandler(_format); + + //Settings(string _so="",string _filter="",string _id="",string _input=""); + return new AudioAnalyserHandler(vampHost::Settings(segments[1],segments[2],segments[3])); //string audioData=runPlugin(string myname, string soname, string id, // string output, int outputNo, string wavname, // string outfilename, bool useFrames); @@ -127,7 +156,7 @@ int RotorServer::main(const std::vector<std::string>& args){ unsigned short port = (unsigned short) config().getInt("port", 9980); std::string format(config().getString("format", DateTimeFormat::SORTABLE_FORMAT)); ServerSocket svs(port); - HTTPServer srv(new RotorRequestHandlerFactory(format), svs, new HTTPServerParams); + HTTPServer srv(new RotorRequestHandlerFactory(format),svs, new HTTPServerParams); srv.start(); waitForTerminationRequest(); srv.stop(); -- cgit v1.2.3