xbmc
IShaderPreset.h
1 /*
2  * Copyright (C) 2017-2020 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "ShaderTypes.h"
12 #include "utils/Geometry.h"
13 
14 #include <string>
15 #include <vector>
16 
17 namespace KODI
18 {
19 namespace SHADER
20 {
21 class IShaderTexture;
22 
24 {
25 public:
26  virtual ~IShaderPreset() = default;
27 
28  // todo: impl once and for all
35  virtual bool ReadPresetFile(const std::string& presetPath) = 0;
36 
44  virtual bool RenderUpdate(const CPoint dest[],
45  IShaderTexture* source,
46  IShaderTexture* target) = 0;
47 
52  virtual void SetSpeed(double speed) = 0;
53 
59  virtual void SetVideoSize(const unsigned videoWidth, const unsigned videoHeight) = 0;
60 
66  virtual bool SetShaderPreset(const std::string& shaderPresetPath) = 0;
67 
72  virtual const std::string& GetShaderPreset() const = 0;
73 
78  virtual ShaderPassVec& GetPasses() = 0;
79 };
80 } // namespace SHADER
81 } // namespace KODI
virtual bool ReadPresetFile(const std::string &presetPath)=0
Reads/Parses a shader preset file and loads its state to the object. What this state is is implementa...
virtual void SetSpeed(double speed)=0
Informs about the speed of playback.
Definition: AudioDecoder.h:18
Definition: IShaderPreset.h:23
Definition: IShaderTexture.h:15
virtual ShaderPassVec & GetPasses()=0
Gets the passes of the loaded preset.
virtual bool RenderUpdate(const CPoint dest[], IShaderTexture *source, IShaderTexture *target)=0
Updates state if needed and renderes the preset to the target texture.
virtual bool SetShaderPreset(const std::string &shaderPresetPath)=0
Set the preset to be rendered on the next frame.
virtual const std::string & GetShaderPreset() const =0
Gets the full path to the shader preset.
virtual void SetVideoSize(const unsigned videoWidth, const unsigned videoHeight)=0
Size of the input/source frame in pixels.