From 70eb7154248a8b50789370779e25a3ebf55d66d3 Mon Sep 17 00:00:00 2001 From: Marten Richter Date: Sat, 6 Sep 2014 15:39:44 +0200 Subject: [PATCH] Replace old jpeg rendering with hardware accelarated TVMedia rendering also for internal pictures --- command.cc | 8 +++++ imageomx.cc | 8 ++--- imageomx.h | 2 +- message.h | 1 + osdopenvg.cc | 74 +++++++++++++++++++++++++++++++-------- osdopenvg.h | 7 ++-- osdvector.cc | 90 ++++++++++++++++++++++++++++++++++++++---------- osdvector.h | 19 ++++++---- surfacevector.cc | 22 ++++++++++++ tvmedia.cc | 6 ++++ tvmedia.h | 4 ++- vdr.cc | 1 + vdr.h | 2 +- 13 files changed, 195 insertions(+), 49 deletions(-) diff --git a/command.cc b/command.cc index eb7a4ea..8094a26 100644 --- a/command.cc +++ b/command.cc @@ -454,6 +454,14 @@ void Command::processMessage(Message* m) } } break; + case Message::NEW_PICTURE_STATIC: + { + OsdVector *osdv=dynamic_cast(Osd::getInstance()); + if (osdv) { + osdv->informPicture(((long long)m->tag)<<32LL,m->parameter); + } + + } break; } } else diff --git a/imageomx.cc b/imageomx.cc index e12b86a..bd75d6e 100644 --- a/imageomx.cc +++ b/imageomx.cc @@ -125,7 +125,7 @@ int ImageOMX::AllocateCodecsOMX(unsigned char * buffer, unsigned int length) OMX_ERRORTYPE error; static OMX_CALLBACKTYPE callbacks= {&VideoOMX::EventHandler_OMX,&EmptyBufferDone_OMX,&FillBufferDone_OMX}; - Log::getInstance()->log("Image", Log::NOTICE, "Allocate Codecs OMX"); + //Log::getInstance()->log("Image", Log::NOTICE, "Allocate Codecs OMX"); //Clock, move later to Image VideoOMX *video=(VideoOMX*)Video::getInstance(); @@ -228,7 +228,7 @@ int ImageOMX::AllocateCodecsOMX(unsigned char * buffer, unsigned int length) - Log::getInstance()->log("Image", Log::NOTICE, "Allocate Codecs OMX finished"); + //Log::getInstance()->log("Image", Log::NOTICE, "Allocate Codecs OMX finished"); return 1; } @@ -238,7 +238,7 @@ int ImageOMX::AllocateCodecsOMX(unsigned char * buffer, unsigned int length) -bool ImageOMX::decodePicture(LoadIndex index, unsigned char * buffer, unsigned int length) +bool ImageOMX::decodePicture(LoadIndex index, unsigned char * buffer, unsigned int length, bool freemem) { if (pictInfValid) return false; // does support only one image at a Time; // Log::getInstance()->log("Image", Log::DEBUG, @@ -266,7 +266,7 @@ bool ImageOMX::decodePicture(LoadIndex index, unsigned char * buffer, unsigned i DeAllocateCodecsOMX(); pthread_setcancelstate(oldcancelstate, NULL); pthread_setcanceltype(oldcanceltype, NULL); - if (ret) free(buffer); + if (ret && freemem) free(buffer); return ret; } diff --git a/imageomx.h b/imageomx.h index dbc2af7..1921c40 100644 --- a/imageomx.h +++ b/imageomx.h @@ -51,7 +51,7 @@ class ImageOMX : public OsdVector::PictureDecoder void init(); void shutdown(); - bool decodePicture(LoadIndex index, unsigned char * buffer, unsigned int length); + bool decodePicture(LoadIndex index, unsigned char * buffer, unsigned int length, bool freemem); bool getDecodedPicture(struct OsdVector::PictureInfo& pict_inf); void freeReference(void * ref); diff --git a/message.h b/message.h index e79a5a3..a8d10d3 100644 --- a/message.h +++ b/message.h @@ -78,6 +78,7 @@ class Message const static ULONG SUBTITLE_CHANGE_CHANNEL = 34; const static ULONG MOUSE_ANDROID_SCROLL = 35; const static ULONG NEW_PICTURE = 36; + const static ULONG NEW_PICTURE_STATIC = 37; }; #endif diff --git a/osdopenvg.cc b/osdopenvg.cc index 9868bf5..5caf581 100644 --- a/osdopenvg.cc +++ b/osdopenvg.cc @@ -23,7 +23,7 @@ #include "mtd.h" #include "videoomx.h" #include "surface.h" -#include +//#include #include "message.h" #include "command.h" @@ -35,7 +35,7 @@ #include #include -using namespace Magick; +//using namespace Magick; extern uint8_t vdr_data[] asm("_binary_other_vdrhires_jpg_start"); extern uint8_t vdr_data_end[] asm("_binary_other_vdrhires_jpg_end"); @@ -292,7 +292,7 @@ int OsdOpenVG::init(void* device) /*if (((VideoOMX*)Video::getInstance())->initUsingOSDObjects()!=1) { //call Video for init stuff return 0; }*/ - InitializeMagick(""); + // InitializeMagick(""); @@ -368,7 +368,7 @@ int OsdOpenVG::stopUpdate() processTasks(); return 1; } - +/* void OsdOpenVG::purgeAllReferences() { images_ref.clear(); @@ -382,12 +382,19 @@ void OsdOpenVG::purgeAllReferences() } monobitmaps.clear(); - map::iterator jitty=jpegs.begin(); + /*map::iterator jitty=jpegs.begin(); while (jitty!=jpegs.end()) { vgDestroyImage((VGImage)(*jitty).second); jitty++; } - jpegs.clear(); + jpegs.clear();* + + map::iterator titty=tvmedias.begin(); + while (titty!=tvmedias.end()) { + vgDestroyImage((VGImage)(*titty).second); + titty++; + } + tvmedias.clear(); map,unsigned int>::iterator sitty=styles.begin(); while (sitty!=styles.end()) { @@ -396,7 +403,7 @@ void OsdOpenVG::purgeAllReferences() } styles.clear(); -} +}*/ int OsdOpenVG::shutdown() { @@ -1019,11 +1026,12 @@ unsigned int OsdOpenVG::handleTask(OpenVGCommand& command) } break; case OVGdestroyImageRef: { + //Log::getInstance()->log("OSD", Log::DEBUG, "TVMedia Draw Image Destroy %d ",command.param1); vgDestroyImage((VGImage)command.param1); return 0; } break; case OVGdestroyPaint: { - Log::getInstance()->log("OSD", Log::DEBUG, "Draw Paint Destroy %d ",command.param1); + //Log::getInstance()->log("OSD", Log::DEBUG, "Draw Paint Destroy %d ",command.param1); vgDestroyPaint((VGPaint)command.param1); return 0; } break; @@ -1071,7 +1079,7 @@ unsigned int OsdOpenVG::handleTask(OpenVGCommand& command) // Log::getInstance()->log("OSD", Log::DEBUG, "Draw create mono2 %d %d %x %d",command.param1,command.param2,vgGetError(),handle); return handle; } break; - case OVGcreateImageFile: { + /*case OVGcreateImageFile: { VGImage handle; try{ Image *imagefile=(Image*)command.data; @@ -1095,7 +1103,7 @@ unsigned int OsdOpenVG::handleTask(OpenVGCommand& command) //Log::getInstance()->log("OSD", Log::DEBUG, "Draw create file %d %d %x %d",command.param1,command.param2,vgGetError(),handle); return handle; - } break; + } break;*/ case OVGcreateImageMemory: { PictureInfo *info = (PictureInfo*) command.data; VGImage handle; @@ -1104,12 +1112,22 @@ unsigned int OsdOpenVG::handleTask(OpenVGCommand& command) vgImageSubData(handle,info->image,info->width*4, VG_sXBGR_8888,0,0,info->width,info->height); info->decoder->freeReference(info->reference); + + bool static_image=true; + if (info->lindex & 0xffffffff) static_image=false; + Message* m = new Message(); // We have a pictures! send a message to ourself, to switch to gui thread - m->message=Message::NEW_PICTURE; m->from=this; m->to=Command::getInstance(); m->parameter = handle; + if (!static_image) { + m->message=Message::NEW_PICTURE; + m->tag = info->lindex; + } else { + m->message=Message::NEW_PICTURE_STATIC; + m->tag = info->lindex>> 32LL; + } m->tag = info->lindex; Command::getInstance()->postMessageFromOuterSpace(m); // inform command about new picture @@ -1132,13 +1150,20 @@ unsigned int OsdOpenVG::handleTask(OpenVGCommand& command) case OVGreadyEGLImage: { PictureInfo *info = (PictureInfo*) command.data; eglDestroyImageKHR(egl_display,info->reference); + bool static_image=true; + if (info->lindex & 0xffffffff) static_image=false; Message* m = new Message(); - m->message=Message::NEW_PICTURE; m->from=this; m->to=Command::getInstance(); m->parameter = info->handle; - m->tag = info->lindex; + if (!static_image) { + m->message=Message::NEW_PICTURE; + m->tag = info->lindex; + } else { + m->message=Message::NEW_PICTURE_STATIC; + m->tag = info->lindex>> 32LL; + } Command::getInstance()->postMessageFromOuterSpace(m); // inform command about new picture delete info; @@ -1313,7 +1338,7 @@ void OsdOpenVG::destroyImageRef(ImageIndex index) comm.param1=index; putOpenVGCommand(comm,false); } - +/* ImageIndex OsdOpenVG::createJpeg(const char* fileName, int *width,int *height) { Image* magicimage=NULL; @@ -1348,6 +1373,27 @@ ImageIndex OsdOpenVG::createJpeg(const char* fileName, int *width,int *height) } comm.data=magicimage; return putOpenVGCommand(comm,true); +}*/ + +bool OsdOpenVG::getStaticImageData(unsigned int static_id, UCHAR **userdata, ULONG *length) +{ + switch (static_id) { + case 1: { + *userdata = vdr_data; + *length = vdr_data_end-vdr_data; + return true; + } break; + case 2: { + *userdata = wallpaper_data; + *length = wallpaper_data_end-wallpaper_data; + return true; + } break; + default: { + *userdata = NULL; + *length = 0; + return false; + } break; + }; } void OsdOpenVG::createPicture(struct PictureInfo& pict_inf) diff --git a/osdopenvg.h b/osdopenvg.h index bc472c7..0eb31fb 100644 --- a/osdopenvg.h +++ b/osdopenvg.h @@ -54,7 +54,7 @@ enum OpenVGTask { OVGcreateMonoBitmap, OVGcreateColorRef, OVGimageUploadLine, - OVGcreateImageFile, + //OVGcreateImageFile, OVGreplacefont, OVGcreateImageMemory, OVGcreateEGLImage, @@ -107,13 +107,14 @@ protected: /*osd vector implementation*/ void destroyImageRef(ImageIndex index); - ImageIndex createJpeg(const char* fileName, int *width,int *height); + // ImageIndex createJpeg(const char* fileName, int *width,int *height); ImageIndex createMonoBitmap(void *base,int width,int height); ImageIndex createImagePalette(int width,int height,const unsigned char *image_data,const unsigned int*palette_data); void createPicture(struct PictureInfo& pict_inf); void destroyStyleRef(unsigned int index); unsigned int createStyleRef(const DrawStyle &c); unsigned int createColorRef(const Colour &c); + bool getStaticImageData(unsigned int static_id, UCHAR **userdata, ULONG *length); void drawSetTrans(SurfaceCommands & sc); void executeDrawCommand(SVGCommand & command); @@ -136,7 +137,7 @@ protected: bool haveOpenVGResponse(unsigned int id,unsigned int * resp); unsigned int putOpenVGCommand(OpenVGCommand& comm,bool wait); unsigned int handleTask(OpenVGCommand& command); - void purgeAllReferences(); + //void purgeAllReferences(); unsigned int wait_id; FT_Library ft_library; diff --git a/osdvector.cc b/osdvector.cc index d315c08..0702289 100644 --- a/osdvector.cc +++ b/osdvector.cc @@ -35,7 +35,7 @@ class MagickDecoder: public OsdVector::PictureDecoder { public: MagickDecoder(OsdVector::PictureReader* treader): OsdVector::PictureDecoder(treader) {pictInfValid=false;}; - bool decodePicture(LoadIndex index, unsigned char * buffer, unsigned int length); + bool decodePicture(LoadIndex index, unsigned char * buffer, unsigned int length, bool freemem); bool getDecodedPicture( struct OsdVector::PictureInfo& pict_inf); @@ -46,7 +46,7 @@ protected: bool pictInfValid; }; -bool MagickDecoder::decodePicture(LoadIndex index, unsigned char * buffer, unsigned int length) +bool MagickDecoder::decodePicture(LoadIndex index, unsigned char * buffer, unsigned int length, bool freemem) { if (pictInfValid) return false; // does support only one image at a Time; Image magicimage; @@ -55,7 +55,8 @@ bool MagickDecoder::decodePicture(LoadIndex index, unsigned char * buffer, unsig try{ Log::getInstance()->log("MagickDecoder", Log::DEBUG, "decodePicture"); Blob myblob; - myblob.updateNoCopy(buffer,length,Blob::MallocAllocator); + if (freemem) myblob.updateNoCopy(buffer,length,Blob::MallocAllocator); + else myblob.update(buffer,length); magicimage.read(myblob); magicimage.write(imageblob,"RGBA"); @@ -155,10 +156,16 @@ int OsdVector::restore() //also clear all handles, they are now invalid, no need to release them images_ref.clear(); monobitmaps.clear(); - jpegs.clear(); + //jpegs.clear(); styles.clear(); styles_ref.clear(); + tvmedias.clear(); + loadindex_ref.clear(); + tvmedias_load.clear(); + tvmedias_load_inv.clear(); + tvmedias_loaded.clear(); + surfaces_mutex.Unlock(); return 1; } @@ -267,16 +274,7 @@ void OsdVector::updateOrAddSurface(const SurfaceVector *surf,float x,float y,flo (*itty).commands.clear(); (*itty).commands=commands; //increase the references - list::iterator sitty=(*itty).commands.begin(); - while (sitty!=(*itty).commands.end()) - { - incStyleRef((*sitty).getRef()); - ImageIndex ii=(*sitty).getImageIndex(); - if (ii) incImageRef(ii); - LoadIndex li=(*sitty).getLoadIndex(); - if (li) incLoadIndexRef(li); - sitty++; - } + referenceSVGCommand((*itty).commands); cleanupOrphanedRefs(); surfaces_mutex.Unlock(); @@ -397,7 +395,7 @@ void OsdVector::cleanupOrphanedRefs() } else ++mitty; } - map::iterator jitty=jpegs.begin(); + /*map::iterator jitty=jpegs.begin(); while (jitty!=jpegs.end()) { map::iterator curitty=images_ref.find((*jitty).second); int count=(*curitty).second; @@ -407,7 +405,7 @@ void OsdVector::cleanupOrphanedRefs() images_ref.erase(curitty++); destroyImageRef(ref); } else ++jitty; - } + }*/ map::iterator titty=tvmedias.begin(); while (titty!=tvmedias.end()) { @@ -416,12 +414,24 @@ void OsdVector::cleanupOrphanedRefs() if (count==0) { ImageIndex ref=(*curitty).first; tvmedias.erase(titty++); - images_ref.erase(curitty++); + images_ref.erase(curitty); destroyImageRef(ref); } else ++titty; } + map::iterator litty=tvmedias_load.begin(); + while (litty!=tvmedias_load.end()) { + map::iterator curitty=loadindex_ref.find((*litty).second); + int count=(*curitty).second; + if (count==0) { + tvmedias_load_inv.erase((*litty).second); + tvmedias_loaded.erase((*litty).second); + tvmedias_load.erase(litty++); + } else ++litty; + } + + map,unsigned int>::iterator sitty=styles.begin(); while (sitty!=styles.end()) { map::iterator curitty=styles_ref.find((*sitty).second); @@ -537,6 +547,10 @@ LoadIndex OsdVector::loadTVMedia(TVMediaInfo& tvmedia) case 3: index=VDR::getInstance()->loadTVMediaRecThumb(tvmedia); break; + case 4: { + index = ((long long) tvmedia.getPrimaryID()) << 32LL; + reader.addStaticImage(tvmedia.getPrimaryID()); + } break; default: index=VDR::getInstance()->loadTVMedia(tvmedia); break; @@ -545,6 +559,7 @@ LoadIndex OsdVector::loadTVMedia(TVMediaInfo& tvmedia) tvmedias_load[tvmedia]=index; tvmedias_load_inv[index]=tvmedia; } else { + index=tvmedias_load[tvmedia]; } @@ -561,7 +576,7 @@ void OsdVector::informPicture(LoadIndex index, ImageIndex imageIndex) ImageIndex image_index=0; TVMediaInfo tvmedia=tvmedias_load_inv[index]; - Log::getInstance()->log("OsdVector", Log::DEBUG, "TVMedia Picture for request id %d arrived",index); + Log::getInstance()->log("OsdVector", Log::DEBUG, "TVMedia Picture for request id %llx arrived %d",index, imageIndex); if (imageIndex) { image_index=tvmedias[tvmedia]=imageIndex; tvmedias_loaded[index]=image_index; @@ -583,7 +598,7 @@ void OsdVector::informPicture(LoadIndex index, ImageIndex imageIndex) - +/* ImageIndex OsdVector::getJpegRef(const char* fileName, int *width,int *height) { ImageIndex image_handle=0; @@ -602,6 +617,7 @@ ImageIndex OsdVector::getJpegRef(const char* fileName, int *width,int *height) incImageRef(image_handle); return image_handle; } +*/ ImageIndex OsdVector::getMonoBitmapRef(void *base,int width,int height) { @@ -740,6 +756,16 @@ void OsdVector::PictureReader::receivePicture(VDR_ResponsePacket *vresp) threadSignal(); } + +void OsdVector::PictureReader::addStaticImage(unsigned int id) +{ + pict_lock_incoming.Lock(); + pict_incoming_static.push(id); + invalid_loadindex.erase(((long long) id) << 32LL); + pict_lock_incoming.Unlock(); + threadSignal(); +} + bool OsdVector::PictureReader::processReceivedPictures() { bool decoded = false; @@ -776,6 +802,32 @@ bool OsdVector::PictureReader::processReceivedPictures() } //else osd->informPicture(vresp->getStreamID(), 0); delete vresp; + } else if (pict_incoming_static.size()){ + unsigned int static_id = pict_incoming_static.front(); + pict_incoming_static.pop(); + set::iterator setpos = invalid_loadindex.find(((long long) static_id) << 32LL); + if (setpos != invalid_loadindex.end()) { + valid = false; + invalid_loadindex.erase(setpos); + } + pict_lock_incoming.Unlock(); + if (!valid) { // we do not want it anymore skip it; + return true; + } + + UCHAR *userdata; + ULONG length; + if (((OsdVector*)Osd::getInstance())->getStaticImageData(static_id, &userdata, &length)) + { + std::list::iterator itty=decoders.begin(); + while (itty!=decoders.end()) { + if ((*itty)->decodePicture(((long long) static_id) << 32LL,userdata, length, false)){ + decoded=true; + break; + } + itty++; + } + } } else { pict_lock_incoming.Unlock(); } diff --git a/osdvector.h b/osdvector.h index a91d63c..ad2a0b9 100644 --- a/osdvector.h +++ b/osdvector.h @@ -59,7 +59,7 @@ enum Corner{ }; typedef unsigned int ImageIndex; -typedef unsigned int LoadIndex; +typedef unsigned long long LoadIndex; class SVGCommand { @@ -171,7 +171,7 @@ public: if (instr!=DrawImage) return 0; else return target.image; }; - ImageIndex getLoadIndex() { + LoadIndex getLoadIndex() { if (instr!=DrawImageLoading) return 0; else return target.loadindex; }; @@ -226,11 +226,15 @@ class OsdVector : public Osd virtual float getFontHeight()=0; virtual float getCharWidth(wchar_t c)=0; - virtual ImageIndex getJpegRef(const char* fileName, int *width,int *height); + //virtual ImageIndex getJpegRef(const char* fileName, int *width,int *height); virtual LoadIndex getTVMediaRef(TVMediaInfo& tvmedia,ImageIndex& image); virtual ImageIndex getMonoBitmapRef(void *base,int width,int height); virtual ImageIndex getImagePalette(int width,int height,const unsigned char *image_data,const unsigned int*palette_data); virtual void imageUploadLine(ImageIndex index,unsigned int j,unsigned int width,void *data)=0; + + + virtual bool getStaticImageData(unsigned int static_id, UCHAR **userdata, ULONG *length)=0; + void removeImageRef(const ImageIndex ref); void removeLoadIndexRef(const LoadIndex ref); unsigned int getColorRef(const Colour &c); //internally this is the same as getStyleRef @@ -276,7 +280,7 @@ class OsdVector : public Osd virtual ~PictureDecoder() {}; // its is always guaranted, that after getDecodedPicture a call to decodePicture follows, if the return value was true; - virtual bool decodePicture(LoadIndex index, unsigned char * buffer, unsigned int length)=0; + virtual bool decodePicture(LoadIndex index, unsigned char * buffer, unsigned int length, bool freemem=true)=0; virtual bool getDecodedPicture(struct PictureInfo& pict_inf)=0; virtual void freeReference(void * ref)=0; @@ -305,6 +309,8 @@ class OsdVector : public Osd // should be called from command thread void receivePicture(VDR_ResponsePacket *vresp); + void addStaticImage(unsigned int id); + void invalidateLoadIndex(LoadIndex index); @@ -318,6 +324,7 @@ class OsdVector : public Osd Mutex pict_lock_incoming; //locks Mutex decoders_lock; std::queue pict_incoming; + std::queue pict_incoming_static; std::list decoders; set invalid_loadindex; @@ -340,7 +347,7 @@ protected: int getLoadIndexRef(LoadIndex index); - virtual ImageIndex createJpeg(const char* fileName, int *width,int *height)=0; + //virtual ImageIndex createJpeg(const char* fileName, int *width,int *height)=0; virtual ImageIndex createMonoBitmap(void *base,int width,int height)=0; virtual ImageIndex createImagePalette(int width,int height,const unsigned char *image_data,const unsigned int*palette_data)=0; virtual void createPicture(struct PictureInfo& pict_inf)=0; @@ -351,7 +358,7 @@ protected: map images_ref; map monobitmaps; - map jpegs; + //map jpegs; map tvmedias; diff --git a/surfacevector.cc b/surfacevector.cc index dff3432..72fc698 100644 --- a/surfacevector.cc +++ b/surfacevector.cc @@ -22,6 +22,7 @@ #include "bitmap.h" #include #include +#include SurfaceVector::SurfaceVector(OsdVector* vosd) { @@ -158,6 +159,26 @@ int SurfaceVector::drawTextCentre(const char* text, int x, int y, const DrawStyl return drawText(text, x-shift/2., y, c); } +void SurfaceVector::drawJpeg(const char *fileName,int x, int y,int *width, int *height) +{ + int jpeg_index=-1; // This is for compatibility only + if (strcmp(fileName,"/vdr.jpg")==0) { + jpeg_index=1; + *height=100; // this is faked so that the system does use the old coordinate system + *width=ceil(190.f*osd->getPixelAspect()); + } else if (strcmp(fileName,"/wallpaperPAL.jpg")==0) { + jpeg_index=2; + *width=720; // this is faked so that the system does use the old coordinate system + *height=576; + } + if (jpeg_index>0) { + TVMediaInfo info; + info.setDefaultJpeg(jpeg_index); + drawTVMedia(info,x,y,*width,*height,TopLeft); + } +} + +/* void SurfaceVector::drawJpeg(const char *fileName,int x, int y,int *width, int *height) { command_mutex.Lock(); @@ -165,6 +186,7 @@ void SurfaceVector::drawJpeg(const char *fileName,int x, int y,int *width, int * commands.push_back(SVGCommand::PaintImage(x,y,*width,*height,image,0)); command_mutex.Unlock(); } +*/ void SurfaceVector::drawTVMedia(TVMediaInfo & tvmedia,float x, float y, float width, float height, Corner corner) { diff --git a/tvmedia.cc b/tvmedia.cc index b02ebdd..7bf8896 100644 --- a/tvmedia.cc +++ b/tvmedia.cc @@ -67,6 +67,12 @@ void TVMediaInfo::setPosterThumb(const char* recname) primary_name=recname; } +void TVMediaInfo::setDefaultJpeg(int jpeg_index) +{ + type=4; + primary_id=jpeg_index; +} + bool operator<(const TVMediaInfo& rhs, const TVMediaInfo& lhs) { if (rhs.type==lhs.type) { diff --git a/tvmedia.h b/tvmedia.h index a1cebc9..99c65e1 100644 --- a/tvmedia.h +++ b/tvmedia.h @@ -44,10 +44,12 @@ public: void setMovieInfo(const MovieInfo * mi); void setSeriesInfo(const SeriesInfo * si); void setPosterThumb(const char* recname); + void setDefaultJpeg(int jpeg_index); int getType() {return type;}; + int getPrimaryID() {return primary_id;}; private: - int type; // movie or series or unknown recording + int type; // 1 movie or 2 series or 3 unknown recording or 4 static artwork int primary_id; //movie or series_id int secondary_id; //0 or episode id int type_pict; // 0 full info, 1 poster thumb, 2 season thumb diff --git a/vdr.cc b/vdr.cc index 7f87969..d09e12f 100644 --- a/vdr.cc +++ b/vdr.cc @@ -39,6 +39,7 @@ #include "osd.h" #include "movieinfo.h" #include "seriesinfo.h" +#include "osdvector.h" #define VOMP_PROTOCOLL_VERSION 0x00000302 diff --git a/vdr.h b/vdr.h index 1aec760..5282f75 100644 --- a/vdr.h +++ b/vdr.h @@ -40,7 +40,7 @@ #include "eventdispatcher.h" #include "i18n.h" #include "log.h" -#include "osdvector.h" +#include "tvmedia.h" class TCP; class Log; -- 2.39.2