Deleted all files referencing/using boblight

This commit is contained in:
T. van der Zwan
2013-08-13 10:03:00 +00:00
parent 39b98386dd
commit 2ec9f9202e
34 changed files with 1183 additions and 3291 deletions

View File

@@ -1,41 +0,0 @@
/*
* boblight
* Copyright (C) Bob 2009
*
* boblight is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* boblight is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
//these definitions can be expanded to make normal prototypes, or functionpointers and dlsym lines
BOBLIGHT_FUNCTION(void*, boblight_init, ());
BOBLIGHT_FUNCTION(void, boblight_destroy, (void* vpboblight));
BOBLIGHT_FUNCTION(int, boblight_connect, (void* vpboblight, const char* address, int port, int usectimeout));
BOBLIGHT_FUNCTION(int, boblight_setpriority, (void* vpboblight, int priority));
BOBLIGHT_FUNCTION(const char*, boblight_geterror, (void* vpboblight));
BOBLIGHT_FUNCTION(int, boblight_getnrlights, (void* vpboblight));
BOBLIGHT_FUNCTION(const char*, boblight_getlightname, (void* vpboblight, int lightnr));
BOBLIGHT_FUNCTION(int, boblight_getnroptions, (void* vpboblight));
BOBLIGHT_FUNCTION(const char*, boblight_getoptiondescript,(void* vpboblight, int option));
BOBLIGHT_FUNCTION(int, boblight_setoption, (void* vpboblight, int lightnr, const char* option));
BOBLIGHT_FUNCTION(int, boblight_getoption, (void* vpboblight, int lightnr, const char* option, const char** output));
BOBLIGHT_FUNCTION(void, boblight_setscanrange, (void* vpboblight, int width, int height));
BOBLIGHT_FUNCTION(int, boblight_addpixel, (void* vpboblight, int lightnr, int* rgb));
BOBLIGHT_FUNCTION(void, boblight_addpixelxy, (void* vpboblight, int x, int y, int* rgb));
BOBLIGHT_FUNCTION(int, boblight_sendrgb, (void* vpboblight, int sync, int* outputused));
BOBLIGHT_FUNCTION(int, boblight_ping, (void* vpboblight, int* outputused));

View File

@@ -1,103 +0,0 @@
/*
* boblight
* Copyright (C) Bob 2009
*
* boblight is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* boblight is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
//if you define BOBLIGHT_DLOPEN, all boblight functions are defined as pointers
//you can then call boblight_loadlibrary to load libboblight with dlopen and the function pointers with dlsym
//if you pass NULL to boblight_loadlibrary's first argument, the default filename for libboblight is used
//if boblight_loadlibrary returns NULL, dlopen and dlsym went ok, if not it returns a char* from dlerror
//if you want to use the boblight functions from multiple files, you can define BOBLIGHT_DLOPEN in one file,
//and define BOBLIGHT_DLOPEN_EXTERN in the other file, the functionpointers are then defined as extern
#ifndef LIBBOBLIGHT
#define LIBBOBLIGHT
#if !defined(BOBLIGHT_DLOPEN) && !defined(BOBLIGHT_DLOPEN_EXTERN)
#ifdef __cplusplus
extern "C" {
#endif
//generate normal prototypes
#define BOBLIGHT_FUNCTION(returnvalue, name, arguments) returnvalue name arguments
#include "boblight-functions.h"
#undef BOBLIGHT_FUNCTION
#ifdef __cplusplus
}
#endif
#elif defined(BOBLIGHT_DLOPEN)
#include <dlfcn.h>
#include <stddef.h>
//generate function pointers
#define BOBLIGHT_FUNCTION(returnvalue, name, arguments) returnvalue (* name ) arguments = NULL
#include "boblight-functions.h"
#undef BOBLIGHT_FUNCTION
#ifdef __cplusplus
#define BOBLIGHT_CAST(value) reinterpret_cast<value>
#else
#define BOBLIGHT_CAST(value) (value)
#endif
//gets a functionpointer from dlsym, and returns char* from dlerror if it didn't work
#define BOBLIGHT_FUNCTION(returnvalue, name, arguments) \
name = BOBLIGHT_CAST(returnvalue (*) arguments)(dlsym(p_boblight, #name)); \
{ char* error = dlerror(); if (error) return error; }
void* p_boblight = NULL; //where we put the lib
//load function pointers
char* boblight_loadlibrary(const char* filename)
{
if (filename == NULL)
filename = "libboblight.so";
if (p_boblight != NULL)
{
dlclose(p_boblight);
p_boblight = NULL;
}
p_boblight = dlopen(filename, RTLD_NOW);
if (p_boblight == NULL)
return dlerror();
//generate dlsym lines
#include "boblight-functions.h"
return NULL;
}
#undef BOBLIGHT_FUNCTION
#undef BOBLIGHT_CAST
//you can define BOBLIGHT_DLOPEN_EXTERN when you load the library in another file
#elif defined(BOBLIGHT_DLOPEN_EXTERN)
extern char* boblight_loadlibrary(const char* filename);
extern void* p_boblight;
#define BOBLIGHT_FUNCTION(returnvalue, name, arguments) extern returnvalue (* name ) arguments
#include "boblight-functions.h"
#undef BOBLIGHT_FUNCTION
#endif //BOBLIGHT_DLOPEN_EXTERN
#endif //LIBBOBLIGHT

View File

@@ -19,6 +19,8 @@ namespace hyperion { class ImageToLedsMap;
class ImageProcessor
{
public:
~ImageProcessor();
/**
* Processes the image to a list of led colors. This will update the size of the buffer-image
* if required and call the image-to-leds mapping to determine the mean color per led.
@@ -61,8 +63,6 @@ private:
ImageProcessor(const LedString &ledString);
~ImageProcessor();
private:
const LedString mLedString;