lumiera_/tests/core/steam/engine/test-rand-ontology.hpp
Ichthyostega c04a465134 Invocation: add some test-data manipulation functions
This is the first step towards a »Test Domain Ongology« #1372,
which is a systematic arrangement of test-dummy functionality assumed
to mirror the actual media processing functionality present in external libs.

Each media-processing library not only provides functions to crunch data,
but also establishes a framework of entities and classification to determine
what »media« is an how it is structured and can be generated, transformed
and qualified. Since a essential goal for Lumiera is to be **library agnostic,**
it is important to avoid naïvely to take some popular library's choices
as universal truth regarding structure and nature of »media« as such.
Rather, the architecture of the Lumiera Render Engine must be kept
sufficiently open to accommodate the working style of various libraries,
even ones not known today.

To validate this architectural openness, we use a set of test functions
unrelated to any existing library to validate access to and usage of
rendering functionality — followed by further steps to adopt existing
popular libraries like **FFmpeg** or **Gstreamer**, without tilting
the basic structure of the Render Engine one way or the other.
2024-11-05 21:23:13 +01:00

100 lines
2.9 KiB
C++

/*
TEST-RAND-ONTOLOGY.hpp - placeholder for a domain-ontology working on dummy data frames
Copyright (C) Lumiera.org
2024, Hermann Vosseler <Ichthyostega@web.de>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/** @file test-rand-ontology.hpp
** A faked »media calculation« environment to validate the render node network.
*/
#ifndef STEAM_ENGINE_TEST_RAND_ONTOLOGY_H
#define STEAM_ENGINE_TEST_RAND_ONTOLOGY_H
#include "lib/error.hpp"
#include "lib/depend.hpp"
#include "steam/engine/testframe.hpp"
#include <array>
#include <string>
namespace steam {
namespace engine{
namespace test {
using std::string;
/** produce sequences of frames with (reproducible) random data */
void generateFrame (TestFrame* buff, size_t frameNr, uint flavour);
/** produce planar multi channel output of random data frames */
void generateMultichan (uint chanCnt, TestFrame* buffArry, size_t frameNr, uint flavour);
/** »process« random frame date by multiply-wrapping with a parameter */
void manipulateFrame (TestFrame* out, TestFrame* in, int param);
/** mix two random data frames by a parameter-controlled proportion */
void combineFrames (TestFrame* out, TestFrame* srcA, TestFrame* srcB, int mix);
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1367 : Dummy / Placeholder
using NoArg = std::array<char*, 0>;
using SoloArg = std::array<char*, 1>;
extern const string DUMMY_FUN_ID;
/** @todo a placeholder operation to wire a prototypical render node
*/
inline void
dummyOp (NoArg in, SoloArg out)
{
UNIMPLEMENTED ("a sincerely nonsensical operation");
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1367 : Dummy / Placeholder
/**
* A fake _Domain Ontology_ to describe mocked »render operations« on
* dummy data frames filled with random numbers.
*
* @see TestFrame_test
* @see NodeDevel_test
* @see NodeLinkage_test
*
*/
class TestRandOntology
{
public:
~TestRandOntology() = default;
TestRandOntology() = default;
private:
};
/** */
}}} // namespace steam::engine::test
#endif