From bcd9eeed1f60c594da11d93c1b52c4ec192280ce Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Sat, 18 May 2013 17:34:53 +0100 Subject: dependencies installer --- rotord/rotor.cpp | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'rotord/rotor.cpp') diff --git a/rotord/rotor.cpp b/rotord/rotor.cpp index 52c76df..1768b8b 100755 --- a/rotord/rotor.cpp +++ b/rotord/rotor.cpp @@ -221,6 +221,7 @@ bool Video_output::render(const float duration, const float framerate,const stri } bool Video_loader::load(const string &filename){ + /* //gstreamer needs absolute paths ALWAYS //string uri="file:///home/tim/workspace/rotor/rotord/"+filename; Poco::Path path; @@ -235,16 +236,22 @@ bool Video_loader::load(const string &filename){ image->setup_fromRGB(player->getWidth(),player->getHeight(),(uint8_t*) player->getPixels()); return true; } + */ + Poco::Path path; + string uri="file://"+path.current()+filename; + + if (player.open(uri)){ + cerr<<"Rotor::Video_loader: "<isLoaded()){ - // image.setup(player) - //} //deal with reolution: swscale from avcodec or put scaler in pipeline? //can image node point to buffer in gst rather than copying the pixels? @@ -253,6 +260,7 @@ Image* Video_loader::output(const Frame_spec &frame){ //fix actual duration and audio file //trace frame that is being read + /* if (player->isLoaded()){ //player->setPosition(frame.time); int wanted=((int) (frame.time*frame.framerate))%(player->getTotalNumFrames()-2); //-2?? @@ -268,5 +276,15 @@ Image* Video_loader::output(const Frame_spec &frame){ //cerr<<"Video_loader: retrieving frame "<<((int) (frame.time*frame.framerate))<data[0]); + return ℑ + } + + return nullptr; }; -- cgit v1.2.3