[mythtv-commits] Ticket #1681: size limit for the OSD image cache
MythTV
mythtv at cvs.mythtv.org
Fri Apr 14 13:02:04 UTC 2006
#1681: size limit for the OSD image cache
---------------------------------------------------------------+------------
Reporter: Pekka Jääskeläinen <pekka.jaaskelainen at gmail.com> | Owner: danielk
Type: patch | Status: new
Priority: minor | Milestone:
Component: mythtv | Version:
Severity: medium |
---------------------------------------------------------------+------------
This patch cleans up the implementation of the OSD image cache and
introduces a size limit for the in-memory OSD image cache. The
implementation is converted to use the Qt's cache structure (QAsciiCache)
which provides automatic resizing of the cache when the limit has been
reached. The resizing is done by deleting least recently used items
(images) from the cache.
The cache is moved as a static class member to OSDTypeImage. Each
OSDTypeImage, when finds its image data from cache becomes the owner of
the cache item. This is to avoid double frees and freeing of the cache
image by the automatism when the image is in use by a OSDTypeImage. When
the OSDTypeImage is reinitialized with a new image, the ownership of the
old cached image is given back to the cache.
I placed a default size limit of 5 MiB, which seems to allow caching two-
three sets of OSD images in memory.
Attached are 0.19-fixes and HEAD patches.
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/1681>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list