|
Kodi Documentation 23.0
Kodi is an open source media player and entertainment hub.
|
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. | |
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.
| using CLutLoader::ApplyFunction = std::function<void(const Lut& lut)> |
Runs on the thread that calls ApplyFinishedLoad()
| 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.
| CLutLoader::CLutLoader | ( | LoadFunction | load, |
| ApplyFunction | apply ) |
| void CLutLoader::ApplyFinishedLoad | ( | ) |
Hands the result of a load that has finished to the apply function, without waiting for one.
|
inline |
| void CLutLoader::Load | ( | AVColorPrimaries | primaries | ) |
Starts a load on a worker thread. A load still in flight is abandoned.