Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
DummyImageGenerator Class Reference

#include "steam/engine/worker/dummy-image-generator.hpp"

Description

Definition at line 46 of file dummy-image-generator.hpp.

Static Public Attributes

static const uint W = 320
 
static const uint H = 240
 

Public Member Functions

 DummyImageGenerator (uint fps)
 
void configure (lumiera::DisplayerInput)
 
DummyFrame next ()
 generate the next frame and occupy the alternate buffer.
 
DummyFrame current ()
 just re-return a pointer to the current frame without generating any new image data
 

Private Member Functions

void generateFrame (DummyFrame buffer)
 
void generateNoise (DummyFrame buffer)
 
void generateBars (DummyFrame buffer)
 fill the RGB-Buffer with the well-known NTSC colour-bar pattern
 

Private Attributes

uint fps_
 
bool useRGB_
 
bool beat_
 
uint frame_
 
std::array< std::byte, WORK_SIZworkBuf_
 workspace for RGB calculation
 
std::array< std::byte, BUFF_SIZoutFrame_A_
 alternating output buffers
 
std::array< std::byte, BUFF_SIZoutFrame_B_
 

Static Private Attributes

static constexpr uint WORK_SIZ = W * H * 3
 
static constexpr uint BUFF_SIZ = W * H * 4
 

Constructor & Destructor Documentation

◆ DummyImageGenerator()

Definition at line 81 of file dummy-image-generator.cpp.

Member Function Documentation

◆ configure()

◆ next()

DummyFrame next ( )

generate the next frame and occupy the alternate buffer.

Returns
the buffer containing the new frame

Definition at line 161 of file dummy-image-generator.cpp.

References DummyImageGenerator::beat_, DummyImageGenerator::current(), DummyImageGenerator::generateFrame(), DummyImageGenerator::H, DummyImageGenerator::useRGB_, DummyImageGenerator::W, and DummyImageGenerator::workBuf_.

+ Here is the call graph for this function:

◆ current()

DummyFrame current ( )

just re-return a pointer to the current frame without generating any new image data

Definition at line 178 of file dummy-image-generator.cpp.

References DummyImageGenerator::beat_, DummyImageGenerator::outFrame_A_, and DummyImageGenerator::outFrame_B_.

Referenced by DummyImageGenerator::next().

+ Here is the caller graph for this function:

◆ generateFrame()

void generateFrame ( DummyFrame  buffer)
private

Definition at line 100 of file dummy-image-generator.cpp.

References DummyImageGenerator::fps_, DummyImageGenerator::frame_, DummyImageGenerator::generateBars(), and DummyImageGenerator::generateNoise().

Referenced by DummyImageGenerator::next().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ generateNoise()

void generateNoise ( DummyFrame  buffer)
private

Definition at line 113 of file dummy-image-generator.cpp.

References DummyImageGenerator::H, and DummyImageGenerator::W.

Referenced by DummyImageGenerator::generateFrame().

+ Here is the caller graph for this function:

◆ generateBars()

void generateBars ( DummyFrame  buffer)
private

fill the RGB-Buffer with the well-known NTSC colour-bar pattern

Definition at line 126 of file dummy-image-generator.cpp.

References DummyImageGenerator::H, and DummyImageGenerator::W.

Referenced by DummyImageGenerator::generateFrame().

+ Here is the caller graph for this function:

Member Data Documentation

◆ fps_

uint fps_
private

Definition at line 48 of file dummy-image-generator.hpp.

Referenced by DummyImageGenerator::generateFrame().

◆ useRGB_

bool useRGB_
private

◆ W

◆ H

◆ WORK_SIZ

constexpr uint WORK_SIZ = W * H * 3
staticconstexprprivate

Definition at line 69 of file dummy-image-generator.hpp.

◆ BUFF_SIZ

constexpr uint BUFF_SIZ = W * H * 4
staticconstexprprivate

Definition at line 70 of file dummy-image-generator.hpp.

◆ beat_

bool beat_
private

◆ frame_

uint frame_
private

Definition at line 73 of file dummy-image-generator.hpp.

Referenced by DummyImageGenerator::generateFrame().

◆ workBuf_

std::array<std::byte,WORK_SIZ> workBuf_
private

workspace for RGB calculation

Definition at line 75 of file dummy-image-generator.hpp.

Referenced by DummyImageGenerator::next().

◆ outFrame_A_

std::array<std::byte,BUFF_SIZ> outFrame_A_
private

alternating output buffers

Definition at line 76 of file dummy-image-generator.hpp.

Referenced by DummyImageGenerator::current().

◆ outFrame_B_

std::array<std::byte,BUFF_SIZ> outFrame_B_
private

Definition at line 77 of file dummy-image-generator.hpp.

Referenced by DummyImageGenerator::current().

+ Collaboration diagram for DummyImageGenerator:

The documentation for this class was generated from the following files: