From 834835c99dd9fd182ca3116b5bc3e7ae8b3815ad Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Thu, 31 Oct 2013 12:57:59 +0000 Subject: thumbnail stills and svgs --- rotord/src/graph.h | 38 ++++++++++++++++++++++++++++++++++++- rotord/src/nodes_audio_analysis.cpp | 2 +- rotord/src/nodes_drawing.h | 7 +++++-- rotord/src/rotor.h | 1 + 4 files changed, 44 insertions(+), 4 deletions(-) (limited to 'rotord/src') diff --git a/rotord/src/graph.h b/rotord/src/graph.h index 6f2ee79..2f8843d 100644 --- a/rotord/src/graph.h +++ b/rotord/src/graph.h @@ -97,6 +97,43 @@ namespace Rotor { class Thumbnailer{ public: bool make(const string &inputfilename,int w,int h,const string &outputfilename) { + Poco::StringTokenizer t1(inputfilename,"."); + if (t1.count()>1) { + if (t1[t1.count()-1]=="svg"){ + cerr<<"found an svg"< tempos; vector intensities; vector times; + auto g=++analysers["segmenter"].features.begin(); for (auto f=analysers["segmenter"].features.begin();g!=analysers["segmenter"].features.end();f++,g++,i++){ cerr<<"segment "<first<<" to "<first<first); diff --git a/rotord/src/nodes_drawing.h b/rotord/src/nodes_drawing.h index b26841e..1bd6375 100644 --- a/rotord/src/nodes_drawing.h +++ b/rotord/src/nodes_drawing.h @@ -3,7 +3,6 @@ #include "rotor.h" #include -#include namespace Rotor { class Draw_node: public Image_node { @@ -217,6 +216,7 @@ namespace Rotor { }; class Svg: public Draw_node { public: + //rsvg should be cleanup? Svg(){ title="SVG"; description="Draws svg files"; @@ -238,7 +238,10 @@ namespace Rotor { } else cerr<<"Rotor: SVG failed to load "<value< &_settings) { return new Svg(_settings);}; void vector_output(cairo_t * cr,const Frame_spec &frame){ //to make it resolution independent diff --git a/rotord/src/rotor.h b/rotord/src/rotor.h index f179efd..50ae266 100644 --- a/rotord/src/rotor.h +++ b/rotord/src/rotor.h @@ -75,6 +75,7 @@ Requirements #include #include +#include #include "Poco/Net/HTTPResponse.h" #include "Poco/Logger.h" -- cgit v1.2.3