|
| enum class | EncoderType { kvaapiH264
, kopenH264
, komxH264
} |
| | The encoder type.
|
|
|
| StreamGenerator (mediax::qt6::QtSapAnnouncer &announcer, EncoderType encoder) |
| | Construct a new Stream Generator object.
|
|
| ~StreamGenerator () |
| | Destroy the Stream Generator object.
|
| void | setEncoder (EncoderType encoder) |
| | Set the H.264 encoder used by this stream.
|
| void | setStreamInfo (mediax::rtp::StreamInformation &info, int testCard=0) |
| | Set the Stream Info object.
|
| bool | start () |
| | stop the stream
|
|
void | stop () |
| | start the stream
|
| bool | started () const |
| | Status of the stream.
|
| uint64_t | bytesSent () const |
| | Get the total bytes sent by this stream.
|
| const mediax::rtp::StreamInformation & | streamInfo () const |
| | Get the stream information.
|
| void | setSapEnabled (bool enabled=true) |
| | Set the Sap Enabled object.
|
| bool | getSapEnabled () const |
| | Get the Sap Enabled object.
|
| void | setTestPattern (int pattern) |
| | Set the test pattern.
|
| void | setSessionNameOverlay (bool enabled) |
| | Set whether to overlay the session name on the video stream.
|
| void | setTimeOverlay (bool enabled) |
| | Set whether to overlay date/time on the video stream.
|
|
| static bool | av1Available (EncoderType codec) |
| | Check whether AV1 can be used with the given H.264 codec selection.
|
| static bool | vaapiAvailable () |
| | Check whether the VAAPI hardware encoders (H.264, H.265, AV1) were built in.
|
|
|
bool | m_started = false |
| | Stream state.
|
|
std::shared_ptr< mediax::rtp::RtpPayloader > | m_stream |
| | The video streams.
|
|
mediax::rtp::StreamInformation | m_info |
| | The stream information.
|
|
int | m_testCard = 0 |
| | The test card to emit.
|
|
std::thread | m_thread |
| | The video thread handle.
|
|
bool | m_running = false |
| | Running bool.
|
|
bool | m_sapEnabled = false |
| | Indicate if SAP announcment is required.
|
|
QString | m_session_name = "" |
| | Session name as QString.
|
|
mediax::qt6::QtSapAnnouncer & | m_announcer |
| | The SAP/SDP announcer.
|
|
EncoderType | m_encoder |
| | The encoder type.
|
|
std::atomic< uint64_t > | m_bytes_sent { 0 } |
| | Total bytes sent for monitoring.
|
|
toolx::streams::FrameOverlay | m_overlay |
| | Paints the session name and date/time overlays into the frames.
|
◆ av1Available()
| bool StreamGenerator::av1Available |
( |
EncoderType | codec | ) |
|
|
static |
Check whether AV1 can be used with the given H.264 codec selection.
AV1 is hardware accelerated through Intel VAAPI, so it is not available when the software OpenH264 codec is selected. A Rust build provides an AV1 codec independent of this setting.
- Parameters
-
| codec | the currently selected codec |
- Returns
- true if AV1 streams can be generated and played
◆ bytesSent()
| uint64_t StreamGenerator::bytesSent |
( |
| ) |
const |
|
inline |
Get the total bytes sent by this stream.
- Returns
- uint64_t the number of bytes sent
◆ CreateDepayloader()
| std::shared_ptr< mediax::rtp::RtpDepayloader > StreamGenerator::CreateDepayloader |
( |
EncoderType | m_encoder | ) |
const |
|
private |
Create a Depayloader object.
- Parameters
-
- Returns
- std::shared_ptr<mediax::rtp::RtpDepayloader>
◆ CreatePayloader()
| std::shared_ptr< mediax::rtp::RtpPayloader > StreamGenerator::CreatePayloader |
( |
EncoderType | m_encoder | ) |
const |
|
private |
Create a Payloader object.
- Parameters
-
- Returns
- std::shared_ptr<mediax::rtp::RtpPayloader>
◆ GenerateStreamThread()
The video generation thread.
- Parameters
-
◆ getSapEnabled()
| bool StreamGenerator::getSapEnabled |
( |
| ) |
const |
Get the Sap Enabled object.
- Returns
- true
-
false
◆ setEncoder()
| void StreamGenerator::setEncoder |
( |
EncoderType | encoder | ) |
|
|
inline |
Set the H.264 encoder used by this stream.
Takes effect the next time setStreamInfo() is called.
- Parameters
-
◆ setSapEnabled()
| void StreamGenerator::setSapEnabled |
( |
bool | enabled = true | ) |
|
Set the Sap Enabled object.
- Parameters
-
◆ setSessionNameOverlay()
| void StreamGenerator::setSessionNameOverlay |
( |
bool | enabled | ) |
|
Set whether to overlay the session name on the video stream.
- Parameters
-
| enabled | true to overlay session name at bottom centre |
◆ setStreamInfo()
| void StreamGenerator::setStreamInfo |
( |
mediax::rtp::StreamInformation & | info, |
|
|
int | testCard = 0 ) |
Set the Stream Info object.
- Parameters
-
| info | the stream information |
| testCard | the required test card to emit |
◆ setTestPattern()
| void StreamGenerator::setTestPattern |
( |
int | pattern | ) |
|
Set the test pattern.
- Parameters
-
◆ setTimeOverlay()
| void StreamGenerator::setTimeOverlay |
( |
bool | enabled | ) |
|
Set whether to overlay date/time on the video stream.
- Parameters
-
| enabled | true to overlay date/time at top left |
◆ start()
| bool StreamGenerator::start |
( |
| ) |
|
stop the stream
- Parameters
-
| bool | false if stream could not be started |
◆ started()
| bool StreamGenerator::started |
( |
| ) |
const |
|
inline |
Status of the stream.
- Returns
- true if stream is started
◆ streamInfo()
| const mediax::rtp::StreamInformation & StreamGenerator::streamInfo |
( |
| ) |
const |
|
inline |
Get the stream information.
- Returns
- const mediax::rtp::StreamInformation& the stream info
◆ vaapiAvailable()
| bool StreamGenerator::vaapiAvailable |
( |
| ) |
|
|
static |
Check whether the VAAPI hardware encoders (H.264, H.265, AV1) were built in.
- Returns
- true if VAAPI streams can be generated
The documentation for this class was generated from the following files: