13#ifndef STREAMS_SRT_RECEIVE_TAB_H
14#define STREAMS_SRT_RECEIVE_TAB_H
25#include "../ui_toolx.h"
46 explicit SrtReceiveTab(Ui::Dialog &ui, QWidget *parent =
nullptr);
80 void fromJson(
const QJsonArray &streams);
110 void addEntries(
const std::vector<toolx::streams::SrtStreamEntry> &entries);
124 void setState(
int id,
const QString &state);
void playSelected()
Open a player for the selected stream.
Definition srt_receive_tab.cpp:185
int idOfRow(int row) const
The id of the stream in a row.
Definition srt_receive_tab.cpp:341
std::map< int, QPointer< SrtPlayer > > m_players
The active players keyed by stream id.
Definition srt_receive_tab.h:137
void addEntries(const std::vector< toolx::streams::SrtStreamEntry > &entries)
Add receivers for transmit streams and show this tab.
Definition srt_receive_tab.cpp:242
void updateButtons()
Enable the buttons that apply to the selected stream and update the count.
Definition srt_receive_tab.cpp:364
QJsonArray toJson() const
The table as a JSON array for the configuration file.
Definition srt_receive_tab.cpp:109
toolx::streams::SrtStreamEntry entryOfRow(int row) const
Read the settings of a row.
Definition srt_receive_tab.cpp:315
bool m_loading
Set while the table is being filled so edits are not saved.
Definition srt_receive_tab.h:141
~SrtReceiveTab() final
Stop all the players.
Definition srt_receive_tab.cpp:93
void stopSelected()
Close the player of the selected stream.
Definition srt_receive_tab.cpp:229
void load()
Load the saved rows.
Definition srt_receive_tab.cpp:395
int m_next_id
The id given to the next stream.
Definition srt_receive_tab.h:139
int rowOfId(int id) const
Find the row of a stream, -1 if it was removed.
Definition srt_receive_tab.cpp:330
void setState(int id, const QString &state)
Show the state of a stream.
Definition srt_receive_tab.cpp:347
void setRow(int row, const toolx::streams::SrtStreamEntry &entry)
Replace the settings of a row.
Definition srt_receive_tab.cpp:300
void removeSelected()
Stop and remove the selected stream.
Definition srt_receive_tab.cpp:166
Ui::Dialog & m_ui
The main dialogue UI.
Definition srt_receive_tab.h:133
SrtReceiveTab(Ui::Dialog &ui, QWidget *parent=nullptr)
Construct a new SRT receive tab, wire up the widgets and load the saved rows.
Definition srt_receive_tab.cpp:62
void addStream()
Add an empty stream to the table and start editing its host.
Definition srt_receive_tab.cpp:151
QWidget * m_parent
Parent widget for player windows.
Definition srt_receive_tab.h:135
void fromJson(const QJsonArray &streams)
Replace the table with the streams of a JSON array.
Definition srt_receive_tab.cpp:121
int activeCount() const
The number of streams being played.
Definition srt_receive_tab.cpp:104
void save() const
Save the rows.
Definition srt_receive_tab.cpp:377
int insertRow(const toolx::streams::SrtStreamEntry &entry)
Add a row to the table and return its index.
Definition srt_receive_tab.cpp:270
Video player window for SRT streams.
Helpers shared by the SRT transmit and receive tabs: connection settings, srt:// URL building,...
A named SRT link, one row of the transmit or receive table.
Definition srt_utils.h:51