From c7a2b3572367be798c27fe0d3f22ff8f8dfed30f Mon Sep 17 00:00:00 2001 From: Marten Richter Date: Mon, 6 Oct 2014 08:50:25 +0200 Subject: [PATCH] Some code clean up to reduce the recompilation time to keep me sane --- osdopenvg.cc | 6 +----- osdopenvg.h | 1 + staticartwork.h | 40 ++++++++++++++++++++++++++++++++++++++++ surface.cc | 1 + surfacevector.cc | 1 + tvmedia.cc | 2 +- tvmedia.h | 8 +------- vdr.cc | 1 + vdr.h | 2 +- 9 files changed, 48 insertions(+), 14 deletions(-) create mode 100644 staticartwork.h diff --git a/osdopenvg.cc b/osdopenvg.cc index fd1a028..9dc9443 100644 --- a/osdopenvg.cc +++ b/osdopenvg.cc @@ -34,10 +34,6 @@ #include #include -#define EXTERNAL_PICTS \ - EXTERNALPICTURE(vdrlogo, vdrhires, jpg) \ - EXTERNALPICTURE(wallpaper, wallpaper720p, jpg) - #define EXTERNALPICTURE(name, fname, fileextension) extern uint8_t name ## _data[] asm("_binary_other_"#fname"_"#fileextension"_start"); \ @@ -45,7 +41,7 @@ EXTERNAL_PICTS -#undef EXTERNALPICTURES +#undef EXTERNALPICTURE #define BACKBUFFER_WIDTH 1280 diff --git a/osdopenvg.h b/osdopenvg.h index c502ded..c3f4dfa 100644 --- a/osdopenvg.h +++ b/osdopenvg.h @@ -38,6 +38,7 @@ #include "mutex.h" #include "signal.h" #include "videoomx.h" +#include "staticartwork.h" #ifdef PICTURE_DECODER_OMX #include "imageomx.h" #endif diff --git a/staticartwork.h b/staticartwork.h new file mode 100644 index 0000000..7b03e5f --- /dev/null +++ b/staticartwork.h @@ -0,0 +1,40 @@ +/* + Copyright 2014 Marten Richter + + This file is part of VOMP. + + VOMP 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 2 of the License, or + (at your option) any later version. + + VOMP 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 VOMP; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +#ifndef STATIC_ARTWORK_H +#define STATIC_ARTWORK_H + +#define EXTERNAL_PICTS \ + EXTERNALPICTURE(vdrlogo, vdrhires, jpg) \ + EXTERNALPICTURE(wallpaper, wallpaper720p, jpg) + +#define EXTERNALPICTURE(name, fname, fileextension) sa_ ## name, + + +typedef enum tStaticArtwork +{ + EXTERNAL_PICTS + sa_MAX +} StaticArtwork; + +#undef EXTERNALPICTURE + + +#endif diff --git a/surface.cc b/surface.cc index 4555987..390c237 100644 --- a/surface.cc +++ b/surface.cc @@ -26,6 +26,7 @@ #include "video.h" #include "teletxt/txtfont.h" +#include "staticartwork.h" unsigned int interpol_table_fac1[16][22]; unsigned int interpol_table_fac2[16][22]; diff --git a/surfacevector.cc b/surfacevector.cc index bb8ce08..eb612cb 100644 --- a/surfacevector.cc +++ b/surfacevector.cc @@ -20,6 +20,7 @@ #include "surfacevector.h" #include "bitmap.h" +#include "staticartwork.h" #include #include #include diff --git a/tvmedia.cc b/tvmedia.cc index 4f79a09..20deaf4 100644 --- a/tvmedia.cc +++ b/tvmedia.cc @@ -67,7 +67,7 @@ void TVMediaInfo::setPosterThumb(const char* recname) primary_name=recname; } -void TVMediaInfo::setStaticArtwork(StaticArtwork id) +void TVMediaInfo::setStaticArtwork(int id) { type=4; primary_id=id; diff --git a/tvmedia.h b/tvmedia.h index 50156af..9dbc34f 100644 --- a/tvmedia.h +++ b/tvmedia.h @@ -28,12 +28,6 @@ class MovieInfo; class SeriesInfo; -typedef enum tStaticArtwork -{ - sa_wallpaper, - sa_vdrlogo, - sa_MAX -} StaticArtwork; class TVMediaInfo { @@ -53,7 +47,7 @@ public: void setPosterThumb(const char* recname); void setPosterThumb(int channel, int eventid); void setChannelLogo(int channel); - void setStaticArtwork(StaticArtwork artwork); + void setStaticArtwork(int artwork); int getType() {return type;}; int getPrimaryID() {return primary_id;}; int getSecondaryID() {return secondary_id;}; diff --git a/vdr.cc b/vdr.cc index c73fea9..174e159 100644 --- a/vdr.cc +++ b/vdr.cc @@ -42,6 +42,7 @@ #include "movieinfo.h" #include "seriesinfo.h" #include "osdvector.h" +#include "tvmedia.h" #define VOMP_PROTOCOLL_VERSION 0x00000302 diff --git a/vdr.h b/vdr.h index ce796a3..a233970 100644 --- a/vdr.h +++ b/vdr.h @@ -42,7 +42,6 @@ #include "eventdispatcher.h" #include "i18n.h" #include "log.h" -#include "tvmedia.h" class TCP; class Log; @@ -56,6 +55,7 @@ class SerializeBuffer; #endif class MovieInfo; class SeriesInfo; +struct TVMediaInfo; using namespace std; -- 2.39.2