-unsigned char* ImageOMX::decodePicture(LoadIndex index, unsigned char * buffer, unsigned int length, bool freemem)
+unsigned char* ImageOMX::decodePicture(LoadingIndex index, unsigned char * buffer, unsigned int length, bool freemem)
{
if (pictInfValid) return buffer; // does support only one image at a Time;
// LogNT::getInstance()->debug(TAG,
}
-bool ImageOMX::intDecodePicture(LoadIndex index, unsigned char* /* buffer */, unsigned int length, EGLPictureCreator* pictcreat, VideoOMX *video)
+bool ImageOMX::intDecodePicture(LoadingIndex index, unsigned char* /* buffer */, unsigned int length, EGLPictureCreator* pictcreat, VideoOMX *video)
{
static OMX_CALLBACKTYPE callbacks= {&VideoOMX::EventHandler_OMX,&EmptyBufferDone_OMX,&FillBufferDone_OMX};
void init();
void shutdown();
- unsigned char* decodePicture(LoadIndex index, unsigned char * buffer, unsigned int length, bool freemem);
+ unsigned char* decodePicture(LoadingIndex index, unsigned char * buffer, unsigned int length, bool freemem);
bool getDecodedPicture(struct OsdVector::PictureInfo& pict_inf);
void freeReference(void * ref);
static OMX_ERRORTYPE FillBufferDone_OMX(OMX_IN OMX_HANDLETYPE hcomp, OMX_IN OMX_PTR appdata,OMX_IN OMX_BUFFERHEADERTYPE* bulibaver);
- bool intDecodePicture(LoadIndex index, unsigned char * buffer, unsigned int length, EGLPictureCreator* egl_pict, VideoOMX *video);
+ bool intDecodePicture(LoadingIndex index, unsigned char * buffer, unsigned int length, EGLPictureCreator* egl_pict, VideoOMX *video);
void ReturnEmptyOMXBuffer(OMX_BUFFERHEADERTYPE* bulibaver);
void ReturnFillOMXBuffer(OMX_BUFFERHEADERTYPE* buffer);
init();
}
-unsigned char* ImageOMX2::decodePicture(LoadIndex index, unsigned char* buffer, unsigned int length, bool freemem) noexcept
+unsigned char* ImageOMX2::decodePicture(LoadingIndex index, unsigned char* buffer, unsigned int length, bool freemem) noexcept
{
// This function needs to return NULL if successful, buffer if not.
void init();
void shutdown();
- unsigned char* decodePicture(LoadIndex index, unsigned char* buffer, unsigned int length, bool freemem) noexcept;
+ unsigned char* decodePicture(LoadingIndex index, unsigned char* buffer, unsigned int length, bool freemem) noexcept;
bool getDecodedPicture(struct OsdVector::PictureInfo& pict_inf);
void freeReference(void*) {};
public:
MagickDecoder(OsdVector::PictureReader* treader): OsdVector::PictureDecoder(treader) {pictInfValid = false;};
- unsigned char* decodePicture(LoadIndex index, unsigned char* buffer, unsigned int length, bool freemem);
+ unsigned char* decodePicture(LoadingIndex index, unsigned char* buffer, unsigned int length, bool freemem);
bool getDecodedPicture( struct OsdVector::PictureInfo& pict_inf);
bool pictInfValid;
};
-unsigned char* MagickDecoder::decodePicture(LoadIndex index, unsigned char* buffer, unsigned int length, bool freemem)
+unsigned char* MagickDecoder::decodePicture(LoadingIndex index, unsigned char* buffer, unsigned int length, bool freemem)
{
if (pictInfValid) return buffer; // does support only one image at a Time;
void OsdVector::Blank()
{
- // do nothing? remove this one?
+ // FIXME do nothing? remove this one?
}
int OsdVector::restore()
}
//also clear all handles, they are now invalid, no need to release them
- images_ref.clear();
+ vhi_refcounts.clear();
monobitmaps.clear();
//jpegs.clear();
drawstyleHandles.clear();
// update any images loaded in the mean time
if ((*commands).instr == DrawImageLoading)
{
- LoadIndex loadindex = (*commands).target.loadindex;
+ LoadingIndex loadindex = (*commands).target.loadindex;
if (tvmedias_loaded.find(loadindex) != tvmedias_loaded.end())
{
(*commands).instr = DrawImage;
(*commands).target.image = tvmedias_loaded[loadindex];;
incImageRef((*commands).target.image);
- removeLoadIndexRef(loadindex);
+ removeLoadingIndexRef(loadindex);
}
}
{
if (command.instr == DrawImageLoading)
{
- LoadIndex loadindex = command.target.loadindex;
+ LoadingIndex loadindex = command.target.loadindex;
if (tvmedias_loaded.find(loadindex) != tvmedias_loaded.end())
{
command.instr = DrawImage;
command.target.image = tvmedias_loaded[loadindex];
incImageRef(command.target.image);
- removeLoadIndexRef(loadindex);
+ removeLoadingIndexRef(loadindex);
}
}
}
VectorHandleImage imageHandle = command.getImageHandle();
if (imageHandle) removeImageRef(imageHandle);
- LoadIndex li = command.getLoadIndex();
- if (li) removeLoadIndexRef(li);
+ LoadingIndex li = command.getLoadingIndex();
+ if (li) removeLoadingIndexRef(li);
}
}
VectorHandleImage imageHandle = command.getImageHandle();
if (imageHandle) incImageRef(imageHandle);
- LoadIndex li = command.getLoadIndex();
- if (li) incLoadIndexRef(li);
+ LoadingIndex li = command.getLoadingIndex();
+ if (li) incLoadingIndexRef(li);
}
}
void OsdVector::incImageRef(VectorHandleImage handle)
{
- if (images_ref.find(handle) == images_ref.end())
+ if (vhi_refcounts.find(handle) == vhi_refcounts.end())
{
- images_ref[handle] = 1;
+ vhi_refcounts[handle] = 1;
}
else
{
- images_ref[handle]++;
+ vhi_refcounts[handle]++;
}
}
void OsdVector::removeImageRef(const VectorHandleImage handle)
{
- images_ref[handle]--;
+ vhi_refcounts[handle]--;
}
-int OsdVector::getLoadIndexRef(LoadIndex index)
+int OsdVector::getLoadingIndexRef(LoadingIndex index)
{
surfaces_mutex.lock();
surfaces_mutex.unlock();
}
-void OsdVector::incLoadIndexRef(LoadIndex index)
+void OsdVector::incLoadingIndexRef(LoadingIndex index)
{
if (loadindex_ref.find(index) == loadindex_ref.end())
{
}
}
-void OsdVector::removeLoadIndexRef(const LoadIndex ref)
+void OsdVector::removeLoadingIndexRef(const LoadingIndex ref)
{
loadindex_ref[ref]--;
if (loadindex_ref[ref] == 0)
{
//now check, if it is already loaded
- std::map<LoadIndex, VectorHandleImage>::iterator itty = tvmedias_loaded.find(ref);
+ std::map<LoadingIndex, VectorHandleImage>::iterator itty = tvmedias_loaded.find(ref);
if ( itty != tvmedias_loaded.end())
{
- removeImageRef((*itty).second); // remove lock
+ // removeImageRef((*itty).second); // remove lock
+ /*
+ * I'm not sure exactly how all this works but removing this line of code prevents
+ * reference counts in vhi_refcounts from going negative. Therefore I suspect the above
+ * line is wrong. Will test for a while.
+ */
}
tvmedias_loaded.erase(ref);
tvmedias_load.erase(tvmedias_load_inv[ref]);
tvmedias_load_inv.erase(ref);
- reader.invalidateLoadIndex(ref);
+ reader.invalidateLoadingIndex(ref);
}
}
while (mitty != monobitmaps.end())
{
- std::map<VectorHandleImage, int>::iterator curitty = images_ref.find((*mitty).second);
+ std::map<VectorHandleImage, int>::iterator curitty = vhi_refcounts.find((*mitty).second);
int count = (*curitty).second;
if (count == 0)
{
VectorHandleImage handle = (*curitty).first;
monobitmaps.erase(mitty++);
- images_ref.erase(curitty++);
+ vhi_refcounts.erase(curitty++);
destroyImageRef(handle);
}
else ++mitty;
/*map<string,VectorHandleImage>::iterator jitty=jpegs.begin();
while (jitty!=jpegs.end()) {
- map<VectorHandleImage,int>::iterator curitty=images_ref.find((*jitty).second);
+ map<VectorHandleImage,int>::iterator curitty=vhi_refcounts.find((*jitty).second);
int count=(*curitty).second;
if (count==0) {
VectorHandleImage handle=(*curitty).first;
jpegs.erase(jitty++);
- images_ref.erase(curitty++);
+ vhi_refcounts.erase(curitty++);
destroyImageRef(handle);
} else ++jitty;
}*/
while (titty != tvmedias.end())
{
- std::map<VectorHandleImage, int>::iterator curitty = images_ref.find((*titty).second);
+ std::map<VectorHandleImage, int>::iterator curitty = vhi_refcounts.find((*titty).second);
int count = (*curitty).second;
if (count == 0)
{
VectorHandleImage handle = (*curitty).first;
tvmedias.erase(titty++);
- images_ref.erase(curitty);
+ vhi_refcounts.erase(curitty);
destroyImageRef(handle);
}
else ++titty;
}
- std::map<TVMediaInfo, LoadIndex>::iterator litty = tvmedias_load.begin();
+ std::map<TVMediaInfo, LoadingIndex>::iterator litty = tvmedias_load.begin();
while (litty != tvmedias_load.end())
{
- std::map<LoadIndex, int>::iterator curitty = loadindex_ref.find((*litty).second);
+ std::map<LoadingIndex, int>::iterator curitty = loadindex_ref.find((*litty).second);
int count = (*curitty).second;
if (count == 0)
while (pitty != palettepics.end())
{
- std::map<VectorHandleImage, int>::iterator curitty = images_ref.find((*pitty));
+ std::map<VectorHandleImage, int>::iterator curitty = vhi_refcounts.find((*pitty));
int count = (*curitty).second;
if (count == 0)
{
VectorHandleImage handle = (*curitty).first;
palettepics.erase(pitty++);
- images_ref.erase(curitty++);
+ vhi_refcounts.erase(curitty++);
destroyImageRef(handle);
}
else ++pitty;
}
- std::map<VectorHandleImage, int>::iterator citty = images_ref.begin();
+ std::map<VectorHandleImage, int>::iterator citty = vhi_refcounts.begin();
- while (citty != images_ref.end())
+ while (citty != vhi_refcounts.end())
{
int count = (*citty).second;
if (count == 0)
{
VectorHandleImage handle = (*citty).first;
- images_ref.erase(citty++);
+ vhi_refcounts.erase(citty++);
destroyImageRef(handle);
}
else ++citty;
}
}
-int OsdVector::getImageRef(VectorHandleImage handle)
-{
- surfaces_mutex.lock();
-
- if (images_ref.find(handle) == images_ref.end())
- {
- return -1;
- }
- else
- {
- return images_ref[handle];
- }
-
- surfaces_mutex.unlock();
-}
+//int OsdVector::getImageRef(VectorHandleImage handle)
+//{
+// surfaces_mutex.lock();
+//
+// if (vhi_refcounts.find(handle) == vhi_refcounts.end())
+// {
+// return -1;
+// }
+// else
+// {
+// return vhi_refcounts[handle];
+// }
+//
+// surfaces_mutex.unlock();
+//}
void OsdVector::incrementDrawStyleHandleRefCount(VectorHandle index)
{
}
#endif
-LoadIndex OsdVector::getTVMediaRef(TVMediaInfo& tvmedia, VectorHandleImage& handle)
+LoadingIndex OsdVector::getTVMediaRef(TVMediaInfo& tvmedia, VectorHandleImage& handle)
{
VectorHandleImage localHandle = 0;
- LoadIndex loadindex = 0;
+ LoadingIndex loadindex = 0;
surfaces_mutex.lock();
if (tvmedias.find(tvmedia) == tvmedias.end()) // if not found, return a loadIndex from loadTVMedia(tvmedia)
{
loadindex = loadTVMedia(tvmedia);
}
- else // if found, return a real imageIndex. incImageRef(localHandle). EXCEPT: If it's not found in images_ref (???) in which case do same as above.
+ else // if found, return a real imageIndex. incImageRef(localHandle). EXCEPT: If it's not found in vhi_refcounts (???) in which case do same as above.
{
localHandle = tvmedias[tvmedia];
- if (images_ref.find(localHandle) == images_ref.end())
+ if (vhi_refcounts.find(localHandle) == vhi_refcounts.end())
{
//invalid handle recreate
loadindex = loadTVMedia(tvmedia);
return loadindex;
}
-LoadIndex OsdVector::loadTVMedia(TVMediaInfo& tvmedia) // insert a tvmedia for loading
+LoadingIndex OsdVector::loadTVMedia(TVMediaInfo& tvmedia) // insert a tvmedia for loading
{
- LoadIndex index = 0;
+ LoadingIndex index = 0;
if (tvmedias_load.find(tvmedia) == tvmedias_load.end()) // if not found in tvmedias_load
{
index = tvmedias_load[tvmedia];
}
- incLoadIndexRef(index);
+ incLoadingIndexRef(index);
return index;
}
-void OsdVector::informPicture(LoadIndex index, VectorHandleImage handle)
+void OsdVector::informPicture(LoadingIndex index, VectorHandleImage handle)
{
//Beware for thread safety
VectorHandleImage localHandle = 0;
if (handle)
{
- std::map<LoadIndex, int>::iterator itty = loadindex_ref.find(index);
+ std::map<LoadingIndex, int>::iterator itty = loadindex_ref.find(index);
localHandle = tvmedias[tvmedia] = handle;
tvmedias_loaded[index] = localHandle;
if (itty == loadindex_ref.end() || (*itty).second == 0)
{
// we do not want the picture anymore . Really...
- // fill images_ref in to not irritate the garbage collector
- if (images_ref.find(localHandle) == images_ref.end())
+ // fill vhi_refcounts in to not irritate the garbage collector
+ if (vhi_refcounts.find(localHandle) == vhi_refcounts.end())
{
- images_ref[localHandle] = 0;
+ vhi_refcounts[localHandle] = 0;
}
}
else
image_handle=jpegs[fileName];
*width=0;
*height=0;
- if (images_ref.find(image_handle)==images_ref.end()) {
+ if (vhi_refcounts.find(image_handle)==vhi_refcounts.end()) {
//invalid handle recreate
image_handle=jpegs[fileName]=createJpeg(fileName,width,height);
}
{
image_handle = monobitmaps[base];
- if (images_ref.find(image_handle) == images_ref.end())
+ if (vhi_refcounts.find(image_handle) == vhi_refcounts.end())
{
//invalid handle recreate
surfaces_mutex.unlock();
}
}
-void OsdVector::PictureReader::invalidateLoadIndex(LoadIndex index)
+void OsdVector::PictureReader::invalidateLoadingIndex(LoadingIndex index)
{
pict_lock_incoming.lock();
invalid_loadindex.insert(index);
// Doesn't look like it, but if it does get the 4 lines below
}
-void OsdVector::PictureReader::informFallback(LoadIndex index, int fallback)
+void OsdVector::PictureReader::informFallback(LoadingIndex index, int fallback)
{
pict_lock_incoming.lock();
inform_fallback[index] = fallback;
{
VDR_ResponsePacket* vresp = pict_incoming.front();
pict_incoming.pop();
- std::set<LoadIndex>::iterator setpos = invalid_loadindex.find(vresp->getStreamID());
+ std::set<LoadingIndex>::iterator setpos = invalid_loadindex.find(vresp->getStreamID());
if (setpos != invalid_loadindex.end())
{
{
unsigned int static_id = pict_incoming_static.front();
pict_incoming_static.pop();
- std::set<LoadIndex>::iterator setpos = invalid_loadindex.find(((long long) static_id) << 32LL);
+ std::set<LoadingIndex>::iterator setpos = invalid_loadindex.find(((long long) static_id) << 32LL);
if (setpos != invalid_loadindex.end())
{
};
typedef VectorHandle VectorHandleImage;
-typedef unsigned long long LoadIndex;
+typedef unsigned long long LoadingIndex;
class SVGCommand
{
return nc;
};
- inline static SVGCommand PaintImageLoading(LoadIndex load_in, float ix, float iy, float iw, float ih, Corner corner = TopLeft)
+ inline static SVGCommand PaintImageLoading(LoadingIndex load_in, float ix, float iy, float iw, float ih, Corner corner = TopLeft)
{
SVGCommand nc;
nc.instr = DrawImageLoading;
else return target.image;
};
- LoadIndex getLoadIndex()
+ LoadingIndex getLoadingIndex()
{
if (instr != DrawImageLoading) return 0;
else return target.loadindex;
wchar_t textchar;
VectorHandleImage image;
unsigned int ttchar;
- LoadIndex loadindex;
+ LoadingIndex loadindex;
} target;
};
virtual float getFontHeight() = 0;
virtual float getCharWidth(wchar_t c) = 0;
float* getCharWidthArray() {return byte_char_width;};
-
- //virtual VectorHandleImage getJpegRef(const char* fileName, int *width,int *height);
- virtual LoadIndex getTVMediaRef(TVMediaInfo& tvmedia, VectorHandleImage& handle);
- virtual VectorHandleImage getMonoBitmapRef(void* base, int width, int height);
- virtual VectorHandleImage getImagePalette(int width, int height, const unsigned char* image_data, const unsigned int* palette_data);
-
+ virtual void getScreenSize(int& width, int& height) = 0;
+ virtual void getRealScreenSize(int& width, int& height) = 0;
virtual bool getStaticImageData(unsigned int static_id, UCHAR** userdata, ULONG* length) = 0;
+ // Used only by OsdVector and SurfaceVector
void removeImageRef(const VectorHandleImage ref);
- void removeLoadIndexRef(const LoadIndex ref);
+ void removeLoadingIndexRef(const LoadingIndex ref);
VectorHandle getDrawStyleHandle(const DrawStyle& c);
- virtual void decrementDrawStyleHandleRefCount(VectorHandle ref);
- virtual void getScreenSize(int& width, int& height) = 0;
- virtual void getRealScreenSize(int& width, int& height) = 0;
+ void decrementDrawStyleHandleRefCount(VectorHandle ref);
+ LoadingIndex getTVMediaRef(TVMediaInfo& tvmedia, VectorHandleImage& handle);
+ //virtual VectorHandleImage getJpegRef(const char* fileName, int *width,int *height);
+ virtual VectorHandleImage getMonoBitmapRef(void* base, int width, int height);
+ virtual VectorHandleImage getImagePalette(int width, int height, const unsigned char* image_data, const unsigned int* palette_data);
+
// should be only called from control thread
- void informPicture(LoadIndex index, VectorHandleImage handle);
+ void informPicture(LoadingIndex index, VectorHandleImage handle);
void processMessage(Message* m);
PictType type;
ULONG width;
ULONG height;
- LoadIndex lindex;
+ LoadingIndex lindex;
union
{
const void* image;
virtual ~PictureDecoder() {};
// its is always guaranted, that after getDecodedPicture a call to decodePicture follows, if the return value was true;
- virtual unsigned char* decodePicture(LoadIndex index, unsigned char* buffer, unsigned int length, bool freemem = true) = 0;
+ virtual unsigned char* decodePicture(LoadingIndex 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;
void receivePicture(VDR_ResponsePacket* vresp);
void addStaticImage(unsigned int id);
- void invalidateLoadIndex(LoadIndex index);
- void informFallback(LoadIndex index, int fallback);
+ void invalidateLoadingIndex(LoadingIndex index);
+ void informFallback(LoadingIndex index, int fallback);
protected:
std::queue<VDR_ResponsePacket*> pict_incoming;
std::queue<unsigned int> pict_incoming_static;
std::list<PictureDecoder*> decoders;
- std::map<LoadIndex, int> inform_fallback;
- std::set<LoadIndex> invalid_loadindex;
+ std::map<LoadingIndex, int> inform_fallback;
+ std::set<LoadingIndex> invalid_loadindex;
bool picture_update;
};
PictureReader reader;
- std::map<VectorHandleImage, int> images_ref;
- std::map<void*, VectorHandleImage> monobitmaps;
- //map<string,VectorHandleImage> jpegs;
- std::map<TVMediaInfo, VectorHandleImage> tvmedias;
- std::list<VectorHandleImage> palettepics;
- std::map<LoadIndex, int> loadindex_ref;
- std::map<TVMediaInfo, LoadIndex> tvmedias_load;
- std::map<LoadIndex, TVMediaInfo> tvmedias_load_inv;
- std::map<LoadIndex, VectorHandleImage> tvmedias_loaded;
-
- std::map<DrawStyle, VectorHandle> drawstyleHandles;
- std::map<DrawStyle, VectorHandle>::iterator drawstyleHandles_lastit;
- bool drawstyleHandles_lastit_valid{};
-
- std::map<VectorHandle, int> drawstyleHandlesRefCounts;
- std::map<VectorHandle, int>::iterator drawstyleHandlesRefCounts_lastit;
- bool drawstyleHandlesRefCounts_lastit_valid{};
-
- std::list<SurfaceInfo> surfaces;
- using SurfacesIterator = std::list<SurfaceInfo>::iterator;
-
- std::mutex surfaces_mutex;
-
float byte_char_width[256]{};
- void incImageRef(VectorHandleImage handle);
- int getImageRef(VectorHandleImage handle);
- virtual void destroyImageRef(VectorHandleImage handle) = 0;
- void incLoadIndexRef(LoadIndex index);
- int getLoadIndexRef(LoadIndex index);
+ virtual void destroyImageRef(VectorHandleImage handle) = 0;
//virtual VectorHandleImage createJpeg(const char* fileName, int *width,int *height)=0;
virtual VectorHandleImage createMonoBitmap(void* base, int width, int height) = 0;
virtual VectorHandleImage createImagePalette(int width, int height, const unsigned char* image_data, const unsigned int* palette_data) = 0;
virtual void createPicture(struct PictureInfo& pict_inf) = 0;
-
- virtual LoadIndex loadTVMedia(TVMediaInfo& tvmedia);
-
virtual VectorHandle createDrawStyleHandle(const DrawStyle& c) = 0;
- void incrementDrawStyleHandleRefCount(VectorHandle index);
virtual void destroyDrawStyleHandle(VectorHandle index) = 0;
-
-
- void decrementAllRefCounts(std::vector<SVGCommand>& commands);
- void incrementAllRefCounts(std::vector<SVGCommand>& commands);
- void cleanupOrphanedRefs();
-
virtual void drawSetTrans(SurfaceInfo& sc) = 0;
virtual void executeDrawCommand(SVGCommand& command) = 0;
#if DEV
void dumpStyles();
#endif
+
+ // See what we can make private in OsdVector
+ private:
+
+ // Methods that only seem to be called internally
+ void incImageRef(VectorHandleImage handle);
+ void incLoadingIndexRef(LoadingIndex index);
+ int getLoadingIndexRef(LoadingIndex index);
+ void decrementAllRefCounts(std::vector<SVGCommand>& commands);
+ void incrementAllRefCounts(std::vector<SVGCommand>& commands);
+ void cleanupOrphanedRefs();
+ void incrementDrawStyleHandleRefCount(VectorHandle index);
+ LoadingIndex loadTVMedia(TVMediaInfo& tvmedia);
+
+ // int getImageRef(VectorHandleImage handle); // Not used anywhere
+
+
+
+ // All the below are data structures only touched by this base class OsdVector
+
+ std::map<TVMediaInfo, VectorHandleImage> tvmedias;
+ std::map<void*, VectorHandleImage> monobitmaps;
+ //map<string,VectorHandleImage> jpegs;
+ std::list<VectorHandleImage> palettepics;
+
+ std::map<VectorHandleImage, int> vhi_refcounts; // This appears to cover all 3 (4) of the above types
+
+ std::map<LoadingIndex, int> loadindex_ref;
+ std::map<TVMediaInfo, LoadingIndex> tvmedias_load;
+ std::map<LoadingIndex, TVMediaInfo> tvmedias_load_inv;
+ std::map<LoadingIndex, VectorHandleImage> tvmedias_loaded;
+
+
+ std::map<DrawStyle, VectorHandle> drawstyleHandles;
+ std::map<DrawStyle, VectorHandle>::iterator drawstyleHandles_lastit;
+ bool drawstyleHandles_lastit_valid{};
+
+ std::map<VectorHandle, int> drawstyleHandlesRefCounts;
+ std::map<VectorHandle, int>::iterator drawstyleHandlesRefCounts_lastit;
+ bool drawstyleHandlesRefCounts_lastit_valid{};
+
+ std::list<SurfaceInfo> surfaces;
+ using SurfacesIterator = std::list<SurfaceInfo>::iterator;
+ std::mutex surfaces_mutex;
+
};
#endif
WICPictDecoder(OsdVector::PictureReader* treader, OsdWinVector *posd);
virtual ~WICPictDecoder();
- unsigned char *decodePicture(LoadIndex index, unsigned char * buffer, unsigned int length, bool freemem);
+ unsigned char *decodePicture(LoadingIndex index, unsigned char * buffer, unsigned int length, bool freemem);
bool getDecodedPicture(struct OsdVector::PictureInfo& pict_inf);
wicfactory->Release();
}
-unsigned char * WICPictDecoder::decodePicture(LoadIndex index, unsigned char * buffer, unsigned int length, bool freemem)
+unsigned char * WICPictDecoder::decodePicture(LoadingIndex index, unsigned char * buffer, unsigned int length, bool freemem)
{
if (pictInfValid) return buffer; // does support only one image at a Time;
VectorHandleImage handle = command.getImageHandle();
if (handle) osd->removeImageRef(handle);
- LoadIndex li = command.getLoadIndex();
- if (li) osd->removeLoadIndexRef(li);
+ LoadingIndex li = command.getLoadingIndex();
+ if (li) osd->removeLoadingIndexRef(li);
}
}
{
command_mutex.lock();
VectorHandleImage handle = 0;
- LoadIndex load_index = osd->getTVMediaRef(tvmedia, handle);
+ LoadingIndex load_index = osd->getTVMediaRef(tvmedia, handle);
if (width != 0 && height != 0)
{
if (handle) osd->removeImageRef(handle);
- LoadIndex li = (*itty).getLoadIndex();
+ LoadingIndex li = (*itty).getLoadingIndex();
- if (li) osd->removeLoadIndexRef(li);
+ if (li) osd->removeLoadingIndexRef(li);
if (!remove)
{