Kodi Documentation 23.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CLutLoader Class Reference

Loads the colour management 3D LUT for a source's primaries on a worker thread, and hands the result over on the thread that owns the output shader. More...

#include <LutLoader.h>

Classes

struct  Lut
 

Public Types

using LoadFunction = std::function<Lut(AVColorPrimaries primaries)>
 Runs on a worker thread and can outlive the loader, so it must own everything it uses.
 
using ApplyFunction = std::function<void(const Lut& lut)>
 Runs on the thread that calls ApplyFinishedLoad()
 

Public Member Functions

 CLutLoader (LoadFunction load, ApplyFunction apply)
 
void Load (AVColorPrimaries primaries)
 Starts a load on a worker thread. A load still in flight is abandoned.
 
bool IsLoading () const
 
void ApplyFinishedLoad ()
 Hands the result of a load that has finished to the apply function, without waiting for one.
 

Detailed Description

Loads the colour management 3D LUT for a source's primaries on a worker thread, and hands the result over on the thread that owns the output shader.

A load still in flight when the loader is destroyed is abandoned: it runs to its end on the worker and its result is never applied.

Member Typedef Documentation

◆ ApplyFunction

using CLutLoader::ApplyFunction = std::function<void(const Lut& lut)>

Runs on the thread that calls ApplyFinishedLoad()

◆ LoadFunction

using CLutLoader::LoadFunction = std::function<Lut(AVColorPrimaries primaries)>

Runs on a worker thread and can outlive the loader, so it must own everything it uses.

Constructor & Destructor Documentation

◆ CLutLoader()

CLutLoader::CLutLoader ( LoadFunction load,
ApplyFunction apply )

Member Function Documentation

◆ ApplyFinishedLoad()

void CLutLoader::ApplyFinishedLoad ( )

Hands the result of a load that has finished to the apply function, without waiting for one.

◆ IsLoading()

bool CLutLoader::IsLoading ( ) const
inline

◆ Load()

void CLutLoader::Load ( AVColorPrimaries primaries)

Starts a load on a worker thread. A load still in flight is abandoned.


The documentation for this class was generated from the following files: