| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #pragma once | ||
| 2 | /* | ||
| 3 | * This file is part of the Falcon Player (FPP) and is Copyright (C) | ||
| 4 | * 2013-2022 by the Falcon Player Developers. | ||
| 5 | * | ||
| 6 | * The Falcon Player (FPP) is free software, and is covered under | ||
| 7 | * multiple Open Source licenses. Please see the included 'LICENSES' | ||
| 8 | * file for descriptions of what files are covered by each license. | ||
| 9 | * | ||
| 10 | * This source file is covered under the LGPL v2.1 as described in the | ||
| 11 | * included LICENSE.LGPL file. | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include "OutputProcessor.h" | ||
| 15 | #include "fpp-json-fwd.h" | ||
| 16 | |||
| 17 | #include <vector> | ||
| 18 | |||
| 19 | class RemapOutputProcessor : public OutputProcessor { | ||
| 20 | public: | ||
| 21 | RemapOutputProcessor(const Json::Value& config); | ||
| 22 | RemapOutputProcessor(int src, int dst, int count, int loop, int reverse); | ||
| 23 | virtual ~RemapOutputProcessor(); | ||
| 24 | |||
| 25 | virtual void ProcessData(unsigned char* channelData) const override; | ||
| 26 | |||
| 27 | 4 | virtual OutputProcessorType getType() const override { return REMAP; } | |
| 28 | |||
| 29 | 4 | int getSourceChannel() const { return sourceChannel; } | |
| 30 | 4 | int getDestChannel() const { return destChannel; } | |
| 31 | 4 | int getCount() const { return count; } | |
| 32 | 4 | int getLoops() const { return loops; } | |
| 33 | 4 | int getReverse() const { return reverse; } | |
| 34 | |||
| 35 | virtual void GetRequiredChannelRanges(const std::function<void(int, int)>& addRange) override; | ||
| 36 | |||
| 37 | protected: | ||
| 38 | int sourceChannel; | ||
| 39 | int destChannel; | ||
| 40 | int count; | ||
| 41 | int loops; | ||
| 42 | int reverse; | ||
| 43 | std::string model; | ||
| 44 | |||
| 45 | // Scratch copy of the source channels for the reversing modes, sized at | ||
| 46 | // construction: ProcessData must read the pre-reverse values while it | ||
| 47 | // overwrites them in place. | ||
| 48 | mutable std::vector<unsigned char> tempBuffer; | ||
| 49 | }; | ||
| 50 |