13#ifndef STREAMS_TESTCARD_PREVIEW_H
14#define STREAMS_TESTCARD_PREVIEW_H
19#include <QGraphicsView>
20#include <QGraphicsScene>
21#include <QGraphicsPixmapItem>
28#include "../ui_toolx.h"
29#include "rtp/rtp_utils.h"
92 bool eventFilter(QObject *obj, QEvent *event)
override;
void generateTestCard()
Generate the test card into the buffer.
Definition testcard_preview.cpp:211
uint32_t m_width
Preview width.
Definition testcard_preview.h:119
bool m_running
Whether preview is running.
Definition testcard_preview.h:123
bool eventFilter(QObject *obj, QEvent *event) override
Event filter to handle resize events on the preview view.
Definition testcard_preview.cpp:109
std::vector< uint8_t > m_buffer
Raw pixel buffer (RGB24).
Definition testcard_preview.h:115
void setWidth(int width)
Change the preview resolution width.
Definition testcard_preview.cpp:161
~TestCardPreview() final
Destroy the TestCardPreview object.
Definition testcard_preview.cpp:120
QGraphicsPixmapItem * m_pixmapItem
The pixmap item in the scene.
Definition testcard_preview.h:113
TestCardPreview(Ui::Dialog &ui, QWidget *parent=nullptr)
Construct a new TestCardPreview object.
Definition testcard_preview.cpp:24
void startPreview()
Start playing the preview at 25 Hz.
Definition testcard_preview.cpp:125
uint32_t m_height
Preview height.
Definition testcard_preview.h:121
mediax::rtp::TestCardState m_state
Animation state carried between frames.
Definition testcard_preview.h:127
void setHeight(int height)
Change the preview resolution height.
Definition testcard_preview.cpp:180
QTimer m_timer
Timer for 25 Hz frame updates.
Definition testcard_preview.h:109
void setPattern(int index)
Change the test card pattern.
Definition testcard_preview.cpp:147
QGraphicsScene * m_scene
The graphics scene.
Definition testcard_preview.h:111
Ui::Dialog & m_ui
The main UI reference.
Definition testcard_preview.h:107
void stopPreview()
Stop the preview.
Definition testcard_preview.cpp:137
uint64_t m_frameCount
Frame counter for animated patterns.
Definition testcard_preview.h:125
int m_pattern
Current test card pattern index.
Definition testcard_preview.h:117
void renderFrame()
Timer callback to render the next frame.
Definition testcard_preview.cpp:199