14#ifndef STREAMS_STREAM_GENERATOR_H
15#define STREAMS_STREAM_GENERATOR_H
26#include <QFontMetrics>
69 void setStreamInfo(mediax::rtp::StreamInformation &info,
int testCard = 0);
186 std::shared_ptr<mediax::rtp::RtpPayloader>
m_stream;
Definition stream_generator.h:33
const mediax::rtp::StreamInformation & streamInfo() const
Get the stream information.
Definition stream_generator.h:103
std::atomic< uint64_t > m_bytes_sent
Total bytes sent for monitoring.
Definition stream_generator.h:204
std::shared_ptr< mediax::rtp::RtpDepayloader > CreateDepayloader(EncoderType m_encoder) const
Create a Depayloader object.
Definition stream_generator.cpp:93
static bool vaapiAvailable()
Check whether the VAAPI hardware encoders (H.264, H.265, AV1) were built in.
Definition stream_generator.cpp:60
std::shared_ptr< mediax::rtp::RtpPayloader > CreatePayloader(EncoderType m_encoder) const
Create a Payloader object.
Definition stream_generator.cpp:70
void setSapEnabled(bool enabled=true)
Set the Sap Enabled object.
Definition stream_generator.cpp:305
bool m_running
Running bool.
Definition stream_generator.h:194
bool started() const
Status of the stream.
Definition stream_generator.h:89
std::thread m_thread
The video thread handle.
Definition stream_generator.h:192
void stop()
start the stream
Definition stream_generator.cpp:266
EncoderType
The encoder type.
Definition stream_generator.h:36
~StreamGenerator()
Destroy the Stream Generator object.
Definition stream_generator.cpp:39
bool getSapEnabled() const
Get the Sap Enabled object.
Definition stream_generator.cpp:323
void setTestPattern(int pattern)
Set the test pattern.
Definition stream_generator.cpp:328
bool m_started
Stream state.
Definition stream_generator.h:184
bool start()
stop the stream
Definition stream_generator.cpp:208
toolx::streams::FrameOverlay m_overlay
Paints the session name and date/time overlays into the frames.
Definition stream_generator.h:206
uint64_t bytesSent() const
Get the total bytes sent by this stream.
Definition stream_generator.h:96
void setEncoder(EncoderType encoder)
Set the H.264 encoder used by this stream.
Definition stream_generator.h:61
std::shared_ptr< mediax::rtp::RtpPayloader > m_stream
The video streams.
Definition stream_generator.h:186
QString m_session_name
Session name as QString.
Definition stream_generator.h:198
mediax::qt6::QtSapAnnouncer & m_announcer
The SAP/SDP announcer.
Definition stream_generator.h:200
StreamGenerator(mediax::qt6::QtSapAnnouncer &announcer, EncoderType encoder)
Construct a new Stream Generator object.
Definition stream_generator.cpp:34
EncoderType m_encoder
The encoder type.
Definition stream_generator.h:202
void setStreamInfo(mediax::rtp::StreamInformation &info, int testCard=0)
Set the Stream Info object.
Definition stream_generator.cpp:115
static bool av1Available(EncoderType codec)
Check whether AV1 can be used with the given H.264 codec selection.
Definition stream_generator.cpp:47
mediax::rtp::StreamInformation m_info
The stream information.
Definition stream_generator.h:188
void setTimeOverlay(bool enabled)
Set whether to overlay date/time on the video stream.
Definition stream_generator.cpp:338
int m_testCard
The test card to emit.
Definition stream_generator.h:190
static void GenerateStreamThread(StreamGenerator *stream)
The video generation thread.
Definition stream_generator.cpp:343
bool m_sapEnabled
Indicate if SAP announcment is required.
Definition stream_generator.h:196
void setSessionNameOverlay(bool enabled)
Set whether to overlay the session name on the video stream.
Definition stream_generator.cpp:333
Paints the session name and date/time overlays into raw video frames.
Webcam capture using Qt6 Multimedia. Provides a thread-safe frame buffer that can be consumed by Stre...