![]() |
Kodi Docs 20.0
Kodi is an open source media player and entertainment hub.
|
#include <VideoThumbLoader.h>
Public Member Functions | |
CVideoThumbLoader () | |
~CVideoThumbLoader () override | |
void | OnLoaderStart () override |
void | OnLoaderFinish () override |
bool | LoadItem (CFileItem *pItem) override |
bool | LoadItemCached (CFileItem *pItem) override |
bool | LoadItemLookup (CFileItem *pItem) override |
virtual bool | FillThumb (CFileItem &item) |
Fill the thumb of a video item First uses a cached thumb from a previous run, then checks for a local thumb and caches it for the next run. More... | |
bool | FillLibraryArt (CFileItem &item) override |
helper function to fill the art for a video library item More... | |
void | OnJobComplete (unsigned int jobID, bool success, CJob *job) override |
Callback from CThumbExtractor on completion of a generated image. More... | |
![]() | |
CThumbLoader () | |
~CThumbLoader () override | |
virtual std::string | GetCachedImage (const CFileItem &item, const std::string &type) |
Checks whether the given item has an image listed in the texture database. More... | |
virtual void | SetCachedImage (const CFileItem &item, const std::string &type, const std::string &image) |
Associate an image with the given item in the texture database. More... | |
![]() | |
CBackgroundInfoLoader () | |
~CBackgroundInfoLoader () override | |
void | Load (CFileItemList &items) |
bool | IsLoading () |
void | Run () override |
void | SetObserver (IBackgroundLoaderObserver *pObserver) |
void | SetProgressCallback (IProgressCallback *pCallback) |
void | StopThread () |
void | StopAsync () |
![]() | |
virtual void | Cancel () |
virtual | ~IRunnable ()=default |
![]() | |
CJobQueue (bool lifo=false, unsigned int jobsAtOnce=1, CJob::PRIORITY priority=CJob::PRIORITY_LOW) | |
CJobQueue constructor. More... | |
~CJobQueue () override | |
CJobQueue destructor Cancels any in-process jobs, and destroys the job queue. More... | |
bool | AddJob (CJob *job) |
Add a job to the queue On completion of the job, destruction of the job queue or in case the job could not be added successfully, the CJob object will be destroyed. More... | |
template<typename F > | |
void | Submit (F &&f) |
Add a function f to this job queue. More... | |
void | CancelJob (const CJob *job) |
Cancel a job in the queue Cancels a job in the queue. Any job currently being processed may complete after this call has completed, but OnJobComplete will not be performed. If the job is only queued then it will be removed from the queue and deleted. More... | |
void | CancelJobs () |
Cancel all jobs in the queue Removes all jobs from the queue. Any job currently being processed may complete after this call has completed, but OnJobComplete will not be performed. More... | |
bool | IsProcessing () const |
Check whether the queue is processing a job. More... | |
void | OnJobAbort (unsigned int jobID, CJob *job) override |
The callback used when a job will be aborted. More... | |
![]() | |
virtual | ~IJobCallback ()=default |
Destructor for job call back objects. More... | |
virtual void | OnJobProgress (unsigned int jobID, unsigned int progress, unsigned int total, const CJob *job) |
An optional callback function that a job may call while processing. More... | |
Static Public Member Functions | |
static std::string | GetLocalArt (const CFileItem &item, const std::string &type, bool checkFolder=false) |
Find a particular art type for a given item, optionally checking at the folder level. More... | |
static std::vector< std::string > | GetArtTypes (const std::string &type) |
return the available art types for a given media type More... | |
static bool | IsValidArtType (const std::string &potentialArtType) |
static bool | IsArtTypeInWhitelist (const std::string &artType, const std::vector< std::string > &whitelist, bool exact) |
static std::string | GetEmbeddedThumbURL (const CFileItem &item) |
helper function to retrieve a thumb URL for embedded video thumbs More... | |
static bool | GetEmbeddedThumb (const std::string &path, const std::string &type, EmbeddedArt &art) |
Protected Member Functions | |
void | DetectAndAddMissingItemData (CFileItem &item) |
Tries to detect missing data/info from a file and adds those. More... | |
const ArtMap & | GetArtFromCache (const std::string &mediaType, const int id) |
![]() | |
bool | QueueEmpty () const |
Returns if we still have jobs waiting to be processed NOTE: This function does not take into account the jobs that are currently processing. More... | |
Protected Attributes | |
CVideoDatabase * | m_videoDatabase |
ArtCache | m_artCache |
![]() | |
CTextureDatabase * | m_textureDatabase |
![]() | |
CFileItemList * | m_pVecItems |
std::vector< CFileItemPtr > | m_vecItems |
CCriticalSection | m_lock |
volatile bool | m_bIsLoading |
volatile bool | m_bStop |
CThread * | m_thread |
IBackgroundLoaderObserver * | m_pObserver |
IProgressCallback * | m_pProgressCallback |
CVideoThumbLoader::CVideoThumbLoader | ( | ) |
|
override |
helper function to fill the art for a video library item
item | a video CFileItem |
Reimplemented from CThumbLoader.
Fill the thumb of a video item First uses a cached thumb from a previous run, then checks for a local thumb and caches it for the next run.
item | the CFileItem object to fill |
|
protected |
|
static |
return the available art types for a given media type
type | the type of media. |
|
static |
|
static |
helper function to retrieve a thumb URL for embedded video thumbs
item | a video CFileItem. |
|
static |
Find a particular art type for a given item, optionally checking at the folder level.
item | the CFileItem to search. |
type | the type of art to look for. |
checkFolder | whether to also check the folder level for files. Defaults to false. |
|
static |
|
static |
Look for a thumbnail for pItem. If one does not exist, look for an autogenerated thumbnail. If that does not exist, attempt to autogenerate one. Finally, check for the existence of fanart and set properties accordingly.
Reimplemented from CBackgroundInfoLoader.
Reimplemented from CBackgroundInfoLoader.
Reimplemented from CBackgroundInfoLoader.
|
overridevirtual |
Callback from CThumbExtractor on completion of a generated image.
Performs the callbacks and updates the GUI.
Reimplemented from CJobQueue.
|
overridevirtual |
Reimplemented from CThumbLoader.
|
overridevirtual |
Reimplemented from CThumbLoader.
|
protected |
|
protected |