ToolX 1.11.1 [e3f477f]
A GUI debug tool chain for diagnosing GVA systems
Loading...
Searching...
No Matches
SapManager Class Reference
Inheritance diagram for SapManager:
Inheritance graph
Collaboration diagram for SapManager:
Collaboration graph

Public Types

using EncoderLookup
 Finds the H.264 encoder of a stream sent by this tool from its address and port.

Public Slots

void newSap (const QString name, const ::mediax::sap::SdpMessage message)
 New frame signal.
void updateLive ()
 Update the live feed.

Signals

void gigeSap (const QString name, const ::mediax::sap::SdpMessage message)
 A GigE Vision device SAP announcement was received.

Public Member Functions

 SapManager (Ui::Dialog &ui, QLabel *sap_live, StreamGenerator::EncoderType *decoder, QWidget *parent=nullptr)
 Construct a new Sap Manager object.
 ~SapManager () final
 Destroy the Sap Manager object.
void setLocalEncoderLookup (EncoderLookup lookup)
 Play streams sent by this tool with the decoder that matches their encoder.

Static Public Member Functions

static bool isGigE (const ::mediax::sap::SdpMessage &message)
 Check if an SDP message describes a GigE Vision device.

Private Member Functions

StreamGenerator::EncoderType decoderFor (const ::mediax::sap::SdpMessage &message) const
 The H.264 decoder to play a stream with.
void updateTable (const ::mediax::sap::SdpMessage &message)
 Update the SAP/SDP table.
void PrintSap (const ::mediax::sap::SdpMessage &message) const
 Print the recieved SAP/SDP message.

Private Attributes

std::map< int, std::shared_ptr<::mediax::sap::SdpMessage >, std::less<> > m_messages
 Map of received messages.
std::map< int, std::shared_ptr<::mediax::sap::SdpMessage >, std::less<> > m_messages_all
std::map< int, QDateTime > m_lastSeen
 SAP session last seen timestamp map.
mediax::qt6::QtSapListener m_listener
 The SAP/SDP listener.
QDialog * m_dialogue
 The Qt dialogue.
Ui::Dialog & m_ui
 The GUI.
QTimer m_liveTimer
 The live timer for updating the live feed.
QDateTime m_clear_before
 Time to clear messages before.
QLabel * m_sap_live
 The status bar.
QLabel * m_rtp_streams
 The RTP streams text (count).
QLabel * m_sap_enabled
 SAP enabled text.
StreamGenerator::EncoderType * m_decoder
EncoderLookup m_local_encoder
 Finds the encoder of a stream sent by this tool.
QWidget * m_parent = nullptr
 Parent widget for player dialogs.

Member Typedef Documentation

◆ EncoderLookup

Initial value:
std::function<std::optional<StreamGenerator::EncoderType>(const QString &, int)>

Finds the H.264 encoder of a stream sent by this tool from its address and port.

Member Function Documentation

◆ decoderFor()

StreamGenerator::EncoderType SapManager::decoderFor ( const ::mediax::sap::SdpMessage & message) const
private

The H.264 decoder to play a stream with.

Parameters
messagethe stream description
Returns
the decoder matching a locally sent stream, the default decoder otherwise

◆ gigeSap

void SapManager::gigeSap ( const QString name,
const ::mediax::sap::SdpMessage message )
signal

A GigE Vision device SAP announcement was received.

Parameters
namethe session name
messagethe SDP message

◆ isGigE()

bool SapManager::isGigE ( const ::mediax::sap::SdpMessage & message)
static

Check if an SDP message describes a GigE Vision device.

Parameters
messagethe SDP message
Returns
true if the media transport is GigE Vision (UDP gev)

◆ newSap

void SapManager::newSap ( const QString name,
const ::mediax::sap::SdpMessage message )
slot

New frame signal.

Parameters
frame

◆ PrintSap()

void SapManager::PrintSap ( const ::mediax::sap::SdpMessage & message) const
private

Print the recieved SAP/SDP message.

Parameters
message

◆ setLocalEncoderLookup()

void SapManager::setLocalEncoderLookup ( EncoderLookup lookup)
inline

Play streams sent by this tool with the decoder that matches their encoder.

A decoder only reliably decodes the stream of its own kind of encoder, so a stream sent by this tool is played with the decoder matching the encoder chosen for it in the RTP table. Other streams use the default decoder.

Parameters
lookupfinds the encoder of a locally sent stream

◆ updateTable()

void SapManager::updateTable ( const ::mediax::sap::SdpMessage & message)
private

Update the SAP/SDP table.

Parameters
message

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