13#ifndef STREAMS_SRT_TRANSMIT_TAB_H
14#define STREAMS_SRT_TRANSMIT_TAB_H
27#include "../ui_toolx.h"
50 explicit SrtTransmitTab(Ui::Dialog &ui, QWidget *parent =
nullptr);
86 void fromJson(
const QJsonArray &streams);
128 void lockRow(
int row,
bool locked);
130 void setStateText(
int row,
const QString &text,
bool good,
bool bad);
147 std::map<int, std::unique_ptr<toolx::streams::SrtGenerator>>
m_streams;
void removeSelected()
Stop and remove the selected stream.
Definition srt_transmit_tab.cpp:295
bool m_loading
Set while the table is changed by the program so the edits are not acted on.
Definition srt_transmit_tab.h:155
void receiversRequested(const std::vector< toolx::streams::SrtStreamEntry > &entries)
Receivers for transmit streams were requested.
void setStateText(int row, const QString &text, bool good, bool bad)
Show the state of a row.
Definition srt_transmit_tab.cpp:499
void load()
Load the saved rows.
Definition srt_transmit_tab.cpp:595
~SrtTransmitTab() final
Stop all the streams.
Definition srt_transmit_tab.cpp:213
Ui::Dialog & m_ui
The main dialogue UI.
Definition srt_transmit_tab.h:143
std::map< int, uint64_t > m_last_bytes
Bytes sent at the last refresh, to show the bit rate.
Definition srt_transmit_tab.h:149
void fromJson(const QJsonArray &streams)
Replace the table with the streams of a JSON array.
Definition srt_transmit_tab.cpp:242
void addStream()
Add a stream with default settings.
Definition srt_transmit_tab.cpp:279
std::string localAddress(const toolx::streams::SrtLinkConfig &link) const
The address of this machine, for the receiver of a listening transmitter.
Definition srt_transmit_tab.cpp:558
void save() const
Save the rows.
Definition srt_transmit_tab.cpp:572
int activeCount() const
The number of streams being transmitted.
Definition srt_transmit_tab.cpp:220
QTimer m_timer
Refreshes the state column.
Definition srt_transmit_tab.h:151
QJsonArray toJson() const
The table as a JSON array for the configuration file.
Definition srt_transmit_tab.cpp:225
int idOfRow(int row) const
The id of the stream in a row.
Definition srt_transmit_tab.cpp:441
SrtTransmitTab(Ui::Dialog &ui, QWidget *parent=nullptr)
Construct a new SRT transmit tab, wire up the widgets and load the saved rows.
Definition srt_transmit_tab.cpp:168
void lockRow(int row, bool locked)
Allow or prevent editing the settings of a row (the pattern can always change).
Definition srt_transmit_tab.cpp:484
void updateButtons()
Enable the buttons that apply to the selection and update the count.
Definition srt_transmit_tab.cpp:548
QWidget * m_parent
Parent widget for message boxes.
Definition srt_transmit_tab.h:145
void copyToReceive()
Send the receiving end of the selected streams (all if none is selected) to the receive tab.
Definition srt_transmit_tab.cpp:330
void toggle(int row)
Start or stop the stream of a row after its checkbox changed.
Definition srt_transmit_tab.cpp:447
void enableAll()
Enable every stream.
Definition srt_transmit_tab.cpp:321
std::map< int, std::unique_ptr< toolx::streams::SrtGenerator > > m_streams
The running streams keyed by row id.
Definition srt_transmit_tab.h:147
int insertRow(const toolx::streams::SrtTransmitConfig &config)
Add a row to the table and return its index.
Definition srt_transmit_tab.cpp:356
void updateStates()
Refresh the state column from the running streams.
Definition srt_transmit_tab.cpp:512
int m_next_id
The id given to the next stream.
Definition srt_transmit_tab.h:153
toolx::streams::SrtTransmitConfig configOfRow(int row) const
Read the settings of a row.
Definition srt_transmit_tab.cpp:420
Transmits an H.264 or H.265 encoded test pattern over SRT.
Helpers shared by the SRT transmit and receive tabs: connection settings, srt:// URL building,...
Session Announcement Protocol (SDP) implementation for listening to announcements of stream data....