Lumiera
0.pre.03
»edit your freedom«
|
Go to the source code of this file.
Unit test helper to generate fake test data frames.
Each TestFrame holds a 1k buffer of byte data, which can be verified, accessed and manipulated to emulate media computations. A metadata header is placed in memory behind the working buffer, which allows to detect data corruption and stores a lifecycle phase and a data checksum.
The contents of each TestFrame are filled on creation with pseudo-random data, which is created from a discriminator seed, based on a »family« and a »frameNr« within each family(≙channel). Due to the deterministic nature of these computations, the pristine state of any frame can be determined. But the payload data is accessible and can be manipulated, and a new checksum can be recorded.
For ease of testing, a static store of TestFrame instances is built and retained in heap memory, and an arbitrary memory location can be treated as TestFrame.
Definition in file testframe.hpp.
Classes | |
struct | TestFrame::Meta |
class | TestFrame |
Mock data frame for simulated rendering. More... | |
Functions | |
TestFrame & | testData (uint seqNr=0, uint chanNr=0) |
Helper to access a specific frame of test data at a fixed memory location. More... | |
Namespaces | |
steam | |
Steam-Layer implementation namespace root. | |
steam::engine | |
Lumiera's render engine core and operational control. | |
TestFrame & testData | ( | uint | seqNr = 0 , |
uint | chanNr = 0 |
||
) |
Helper to access a specific frame of test data at a fixed memory location.
The series of test frames is generated on demand, but remains in memory thereafter, similar to real data accessible from some kind of source stream. Each of these generated test frames is filled with different yet reproducible pseudo random data. Client code is free to access and corrupt this data.
defaultGen
Definition at line 186 of file testframe.cpp.
Referenced by TestFrame::data(), and TestFrame_test::useFrameTable().