Receives an SRT stream and displays the video in a window.
More...
#include <srt_player.h>
|
| void | play (const QString name, const QString url, const QString description) |
| | Start the SRT connection in the background and play.
|
|
void | stop () |
| | Stop the stream, close the window and destroy this object.
|
|
| void | stateChanged (const QString &state) |
| | The state of the stream changed.
|
|
| | SrtPlayer (QWidget *parent=nullptr) |
| | Construct a new SRT player and show the window.
|
|
| ~SrtPlayer () final |
| | Stop the stream and close the window.
|
|
| static int | activeCount () |
| | The number of players that are open.
|
|
|
bool | eventFilter (QObject *obj, QEvent *event) override |
| | Event filter to keep the image fitted to the dialog on resize.
|
|
|
void | showFrame (const QImage &image) |
| | Show a received frame.
|
|
void | linkState (mediax::qt6::QtSrtDepayloader::State state) |
| | Update the status bar and report the new state.
|
|
void | linkError (const QString &message) |
| | Report a connection error.
|
|
void | noFrame () |
| | Blank the display when no frames are arriving.
|
|
void | updateStatistics () |
| | Show the link statistics.
|
|
|
void | setLabelColour (const QString &colour) |
| | Set the colour of the stream label.
|
|
|
QPointer< QDialog > | m_dialog |
| | The player dialog.
|
|
QGraphicsScene * | m_scene = nullptr |
| | The scene.
|
|
QGraphicsView * | m_view = nullptr |
| | The view.
|
|
QGraphicsPixmapItem * | m_pixmap_item = nullptr |
| | The pixmap item, kept to avoid flicker.
|
|
QPixmap | m_pixmap |
| | The displayed image.
|
|
QLabel * | m_stream_label = nullptr |
| | Stream description label.
|
|
QLabel * | m_format_label = nullptr |
| | Resolution label.
|
|
QLabel * | m_link_label = nullptr |
| | Link statistics label.
|
|
QLabel * | m_frame_label = nullptr |
| | Frame counter label.
|
|
QTimer | m_blank_timer |
| | No-frame blanking timer.
|
|
QTimer | m_statistics_timer |
| | Statistics refresh timer.
|
|
mediax::qt6::QtSrtDepayloader * | m_receiver = nullptr |
| | The SRT receiver.
|
|
quint64 | m_frame_count = 0 |
| | Frames received.
|
Receives an SRT stream and displays the video in a window.
The stream stops and the object is destroyed when the window is closed or stop() is called.
◆ SrtPlayer()
| SrtPlayer::SrtPlayer |
( |
QWidget * | parent = nullptr | ) |
|
|
explicit |
Construct a new SRT player and show the window.
- Parameters
-
| parent | the parent widget (the player closes when the parent closes) |
◆ activeCount()
| int SrtPlayer::activeCount |
( |
| ) |
|
|
static |
The number of players that are open.
- Returns
- int the number of open player windows
◆ play
| void SrtPlayer::play |
( |
const QString | name, |
|
|
const QString | url, |
|
|
const QString | description ) |
|
slot |
Start the SRT connection in the background and play.
- Parameters
-
| name | the stream name shown in the window title |
| url | the srt:// URL (it may hold a passphrase and is never shown) |
| description | what to show in the status bar, e.g. "Listener :9000" |
◆ stateChanged
| void SrtPlayer::stateChanged |
( |
const QString & | state | ) |
|
|
signal |
The state of the stream changed.
- Parameters
-
| state | a short description, e.g. "Connected" or "Error: Connection timed out" |
The documentation for this class was generated from the following files: