From 7110cea433b6aa4ce973b5c89c9ff9721e64ef55 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Wed, 26 Sep 2012 21:09:43 +0200 Subject: moved layer registration from OSCServer into main.cpp using new OSCServer::register_layer() method also use a static CtorInfo structure in every layer class instead of macros --- layer_video.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'layer_video.h') diff --git a/layer_video.h b/layer_video.h index 880f88c..9b864d2 100644 --- a/layer_video.h +++ b/layer_video.h @@ -11,9 +11,6 @@ #include "osc_graphics.h" #include "layer.h" -#define LayerVideo_Info_Name "video" -#define LayerVideo_Info_Types "s" /* url */ - class LayerVideo : public Layer { libvlc_instance_t *vlcinst; libvlc_media_player_t *mp; @@ -28,17 +25,18 @@ class LayerVideo : public Layer { bool pausedv; public: - static void register_layer() {} - LayerVideo(const char *name, SDL_Rect geo = (SDL_Rect){0, 0, 0, 0}, float opacity = 1., const char *url = NULL); + + static CtorInfo ctor_info; static Layer * ctor_osc(const char *name, SDL_Rect geo, float opacity, lo_arg **argv) { return new LayerVideo(name, geo, opacity, &argv[0]->s); } + ~LayerVideo(); inline void * -- cgit v1.2.3