101 _solidR = r; _solidG = g; _solidB = b;
115 double motion()
const {
return _motion; }
221 double _motion = 0.0;
222 double _motionOffset = 0.0;
230 bool _audioEnabled =
true;
232 double _toneFreq = 1000.0;
233 double _toneAmplitude = 0.5;
234 float _ltcLevel = 0.5f;
242 size_t _samplesPerFrame = 0;
246 void renderColorBars(
Image &
img,
double offset,
bool full);
247 void renderRamp(
Image &
img,
double offset);
248 void renderGrid(
Image &
img,
double offset);
249 void renderCrosshatch(
Image &
img,
double offset);
250 void renderCheckerboard(
Image &
img,
double offset);
251 void renderZonePlate(
Image &
img,
double phase);
Describes an audio format including sample type, rate, and channel count.
Definition audiodesc.h:28
Audio signal generator for producing test tones and silence.
Definition audiogen.h:22
Lightweight error code wrapper for the promeki library.
Definition error.h:39
Describes the format and layout of a single image.
Definition imagedesc.h:33
Raster image with pixel format, planes, and metadata.
Definition image.h:48
Dynamic array container wrapping std::vector.
Definition list.h:40
Encodes timecode values into LTC (Linear Timecode) audio samples.
Definition ltcencoder.h:35
Base object for promeki.
Definition objectbase.h:129
ObjectBase * parent() const
Returns the parent object, if one. nullptr if none.
Definition objectbase.h:258
Source node that generates video and audio test patterns.
Definition testpatternnode.h:40
void setToneAmplitude(double amplitude)
Sets the amplitude for all tone channels.
Definition testpatternnode.h:189
virtual ~TestPatternNode()
Destructor.
AudioMode audioMode() const
Returns the current audio mode.
Definition testpatternnode.h:170
TimecodeGenerator & timecodeGenerator()
Returns a mutable reference to the internal timecode generator.
Definition testpatternnode.h:120
void setStartTimecode(const Timecode &tc)
Sets the starting timecode.
Definition testpatternnode.h:129
void setLtcLevel(float level)
Sets the LTC output amplitude.
Definition testpatternnode.h:195
void setVideoDesc(const VideoDesc &desc)
Sets the video description (frame rate, resolution, pixel format).
Definition testpatternnode.h:89
TestPatternNode(ObjectBase *parent=nullptr)
Constructs a TestPatternNode.
void process() override
Processes one cycle of data.
void setToneFrequency(double hz)
Sets all channels to a sine tone at the given frequency.
Definition testpatternnode.h:183
void stop() override
Stops processing.
void setPattern(Pattern p)
Sets the video test pattern.
Definition testpatternnode.h:80
const AudioDesc & audioDesc() const
Returns the audio description.
Definition testpatternnode.h:152
Map< String, Variant > extendedStats() const override
Returns additional node-specific statistics.
Pattern
Video test pattern type.
Definition testpatternnode.h:44
@ Black
Solid black.
Definition testpatternnode.h:53
@ Ramp
Luminance gradient ramp.
Definition testpatternnode.h:47
@ Noise
Random pixel noise.
Definition testpatternnode.h:54
@ Crosshatch
Diagonal crosshatch lines.
Definition testpatternnode.h:49
@ ZonePlate
Circular zone plate.
Definition testpatternnode.h:55
@ White
Solid white.
Definition testpatternnode.h:52
@ Checkerboard
Alternating black/white squares.
Definition testpatternnode.h:50
@ ColorBars75
SMPTE 75% color bars.
Definition testpatternnode.h:46
@ ColorBars
SMPTE 100% color bars.
Definition testpatternnode.h:45
@ SolidColor
Solid fill with configured color.
Definition testpatternnode.h:51
@ Grid
White grid lines on black.
Definition testpatternnode.h:48
void setSolidColor(uint16_t r, uint16_t g, uint16_t b)
Sets the solid color for SolidColor pattern.
Definition testpatternnode.h:100
double motion() const
Returns the motion speed.
Definition testpatternnode.h:115
void setAudioEnabled(bool enable)
Enables or disables audio generation.
Definition testpatternnode.h:158
Error configure() override
Validates ports and allocates resources.
AudioMode
Audio generation mode.
Definition testpatternnode.h:59
@ Silence
Silence.
Definition testpatternnode.h:61
@ LTC
LTC timecode audio.
Definition testpatternnode.h:62
@ Tone
Sine tone (configurable frequency).
Definition testpatternnode.h:60
uint64_t frameCount() const
Returns the total number of frames generated.
Definition testpatternnode.h:141
void setAudioDesc(const AudioDesc &desc)
Sets the audio description.
Definition testpatternnode.h:149
void setChannelConfig(size_t chan, AudioGen::Config config)
Sets per-channel audio configuration (Tone mode).
void setLtcChannel(int chan)
Sets which channel carries LTC.
Definition testpatternnode.h:201
Pattern pattern() const
Returns the current pattern.
Definition testpatternnode.h:83
void setDropFrame(bool df)
Enables or disables drop-frame timecode.
Definition testpatternnode.h:135
Timecode currentTimecode() const
Returns the current timecode value.
Definition testpatternnode.h:138
bool audioEnabled() const
Returns true if audio generation is enabled.
Definition testpatternnode.h:161
const VideoDesc & videoDesc() const
Returns the video description.
Definition testpatternnode.h:92
void setMotion(double speed)
Sets the pattern motion speed.
Definition testpatternnode.h:112
void setAudioMode(AudioMode mode)
Sets the audio generation mode.
Definition testpatternnode.h:167
Error start() override
Begins processing.
const TimecodeGenerator & timecodeGenerator() const
Returns a const reference to the internal timecode generator.
Definition testpatternnode.h:123
General-purpose timecode generator.
Definition timecodegenerator.h:37
void setDropFrame(bool df)
Enables or disables drop-frame counting.
Timecode timecode() const
Returns the current timecode value.
Definition timecodegenerator.h:106
void setTimecode(const Timecode &tc)
Sets the current timecode value.
Class for holding and manipulating timecode.
Definition timecode.h:45
Describes a video format including frame rate, image layers, audio channels, and metadata.
Definition videodesc.h:25
#define PROMEKI_NAMESPACE_BEGIN
Starts a promeki namespace block.
Definition namespace.h:14
#define PROMEKI_NAMESPACE_END
Ends a promeki namespace block.
Definition namespace.h:19
Per-channel configuration for the audio generator.
Definition audiogen.h:31