From 7c5fa74c604a614bbfcd0417fd6dc7d5c2c78853 Mon Sep 17 00:00:00 2001 From: Felix Dubrownik Date: Tue, 23 Sep 2014 14:25:36 +0200 Subject: [PATCH] added Test case. Compiles. shows right number of images --- example/src/ofApp.cpp | 2 ++ example/src/ofApp.h | 3 +++ src/MediaServer/DirectoryWatcher.h | 2 +- src/ofxPiMapper.h | 4 +++- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/example/src/ofApp.cpp b/example/src/ofApp.cpp index 260ebfe..ecd4f49 100755 --- a/example/src/ofApp.cpp +++ b/example/src/ofApp.cpp @@ -26,6 +26,8 @@ void ofApp::setup() { ofRandom(20))); rectSpeeds.push_back((1.0f + ofRandom(5))); } + ofLog() << "Number of Images: " << mediaServer.getNumImages(); + ofLog() << "Number of Videos: " << mediaServer.getNumVideos(); } void ofApp::update() { diff --git a/example/src/ofApp.h b/example/src/ofApp.h index 1a81109..1fa701b 100755 --- a/example/src/ofApp.h +++ b/example/src/ofApp.h @@ -24,4 +24,7 @@ class ofApp : public ofBaseApp { ofFbo* fbo; vector rects; vector rectSpeeds; + + // Debug + ofx::piMapper::MediaServer mediaServer; }; \ No newline at end of file diff --git a/src/MediaServer/DirectoryWatcher.h b/src/MediaServer/DirectoryWatcher.h index a3ee50d..a618fe2 100644 --- a/src/MediaServer/DirectoryWatcher.h +++ b/src/MediaServer/DirectoryWatcher.h @@ -18,7 +18,7 @@ class CustomPathFilter : public ofx::IO::AbstractPathFilter { public: CustomPathFilter() {}; virtual ~CustomPathFilter() {}; - virtual bool accept(const Poco::Path& path) const; + virtual bool accept(const Poco::Path& path) const {}; }; class CustomVideoPathFilter : public CustomPathFilter { public: diff --git a/src/ofxPiMapper.h b/src/ofxPiMapper.h index b0b5fea..975b9f6 100644 --- a/src/ofxPiMapper.h +++ b/src/ofxPiMapper.h @@ -1,4 +1,6 @@ #pragma once #include "SurfaceManager.h" -#include "SurfaceManagerGui.h" \ No newline at end of file +#include "SurfaceManagerGui.h" + +#include "MediaServer.h" \ No newline at end of file