MythTV  master
Classes | Typedefs | Enumerations
imagethumbs.h File Reference

Creates and manages thumbnails. More...

#include <utility>
#include <QMap>
#include <QMutex>
#include <QWaitCondition>
#include "libmythbase/mthread.h"
#include "imagetypes.h"
Include dependency graph for imagethumbs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ThumbTask
 A generator request that is queued. More...
 
class  ThumbThread< DBFS >
 A generator worker thread. More...
 
class  ImageThumb< DBFS >
 

Typedefs

using TaskPtr = QSharedPointer< ThumbTask >
 

Enumerations

enum  ImageThumbPriority : std::int8_t { kUrgentPriority = -10, kPicRequestPriority = -7, kDirRequestPriority = -3, kBackgroundPriority = 0 }
 Priority of a thumbnail request. More...
 

Detailed Description

Creates and manages thumbnails.

Uses two worker threads to process thumbnail requests that are queued from the scanner and UI. One thread generates picture thumbs; the other video thumbs, which are delegated to previewgenerator and time-consuming. Both background threads are low-priority to avoid recording issues. Requests are handled by client-assigned priority so that UI display requests are serviced before background scanner requests. When images are removed, their thumbnails are also deleted (thumbnail cache is synchronised to database). Obsolete images are broadcast to enable clients to also cleanup/synchronise their caches.

Definition in file imagethumbs.h.

Typedef Documentation

◆ TaskPtr

using TaskPtr = QSharedPointer<ThumbTask>

Definition at line 82 of file imagethumbs.h.

Enumeration Type Documentation

◆ ImageThumbPriority

enum ImageThumbPriority : std::int8_t

Priority of a thumbnail request.

First/lowest are handled before later/higher

Ordered to optimise perceived client performance, ie. pictures will be displayed before directories (4 thumbnails), then videos (slow to generate) are filled in last.

Enumerator
kUrgentPriority 

Scanner request needed to complete a scan.

kPicRequestPriority 

Client request to display an image thumbnail.

kDirRequestPriority 

Client request to display a directory thumbnail.

kBackgroundPriority 

Scanner background request.

Definition at line 32 of file imagethumbs.h.