<div dir="ltr"><div dir="ltr"><div dir="ltr">---<br> .../gui/qt/components/sout/sout_widgets.cpp   | 55 +++++++++++++++++++<br> .../gui/qt/components/sout/sout_widgets.hpp   | 13 +++++<br> modules/gui/qt/dialogs/sout.cpp               | 11 +++-<br> modules/gui/qt/ui/open_net.ui                 |  1 +<br> 4 files changed, 77 insertions(+), 3 deletions(-)<br><br>diff --git a/modules/gui/qt/components/sout/sout_widgets.cpp b/modules/gui/qt/components/sout/sout_widgets.cpp<br>index a6793e9243..2f65a5d880 100644<br>--- a/modules/gui/qt/components/sout/sout_widgets.cpp<br>+++ b/modules/gui/qt/components/sout/sout_widgets.cpp<br>@@ -359,6 +359,61 @@ QString UDPDestBox::getMRL( const QString& mux )<br>     return m.getMrl();<br> }<br> <br>+SRTDestBox::SRTDestBox(QWidget *_parent, const char *_mux) :<br>+        VirtualDestBox( _parent ), mux( qfu( _mux ) )<br>+{<br>+    label->setText(<br>+            qtr( "This module outputs the transcoded stream to a network"<br>+                    " via SRT." ) );<br>+<br>+    QLabel *SRTLabel = new QLabel( qtr( "Address" ), this );<br>+    SRTEdit = new QLineEdit( this );<br>+    layout->addWidget( SRTLabel, 1, 0, 1, 1 );<br>+    layout->addWidget( SRTEdit, 1, 1, 1, 1 );<br>+<br>+    QLabel *SRTPortLabel = new QLabel( qtr( "Base port" ), this );<br>+    SRTPort = new QSpinBox( this );<br>+    SRTPort->setMaximumSize( QSize( 90, 16777215 ) );<br>+    SRTPort->setAlignment(<br>+            Qt::AlignRight | Qt::AlignTrailing | Qt::AlignVCenter );<br>+    SRTPort->setMinimum( 1 );<br>+    SRTPort->setMaximum( 65535 );<br>+    SRTPort->setValue( 7001 );<br>+    layout->addWidget( SRTPortLabel, 2, 0, 1, 1 );<br>+    layout->addWidget( SRTPort, 2, 1, 1, 1 );<br>+<br>+    QLabel *SAPNameLabel = new QLabel( qtr( "Stream name" ), this );<br>+    SAPName = new QLineEdit( this );<br>+    layout->addWidget( SAPNameLabel, 3, 0, 1, 1 );<br>+    layout->addWidget( SAPName, 3, 1, 1, 1 );<br>+<br>+    CT( SRTEdit );<br>+    CS( SRTPort );<br>+    CT( SAPName );<br>+}<br>+<br>+QString SRTDestBox::getMRL(const QString&)<br>+{<br>+    QString addr = SRTEdit->text();<br>+    QString name = SAPName->text();<br>+<br>+    if (addr.isEmpty())<br>+        return qfu( "" );<br>+    QString destination = addr + ":" + QString::number( SRTPort->value() );<br>+    SoutMrl m;<br>+    m.begin( "srt" );<br>+    m.option( "dst", destination );<br>+    /* mp4-mux ain't usable in rtp-output either */<br>+    if (!mux.isEmpty())<br>+        m.option( "mux", mux );<br>+    if (!name.isEmpty()) {<br>+        m.option( "sap" );<br>+        m.option( "name", name );<br>+    }<br>+    m.end();<br>+<br>+    return m.getMrl();<br>+}<br> <br> <br> RTPDestBox::RTPDestBox( QWidget *_parent, const char *_mux )<br>diff --git a/modules/gui/qt/components/sout/sout_widgets.hpp b/modules/gui/qt/components/sout/sout_widgets.hpp<br>index 5b9496c83a..3413c8d239 100644<br>--- a/modules/gui/qt/components/sout/sout_widgets.hpp<br>+++ b/modules/gui/qt/components/sout/sout_widgets.hpp<br>@@ -117,6 +117,19 @@ class UDPDestBox: public VirtualDestBox<br>         QSpinBox *UDPPort;<br> };<br> <br>+class SRTDestBox: public VirtualDestBox<br>+{<br>+    Q_OBJECT<br>+    public:<br>+        SRTDestBox( QWidget *_parent = NULL, const char *mux = NULL );<br>+        QString getMRL( const QString& ) Q_DECL_OVERRIDE;<br>+    private:<br>+        QLineEdit *SRTEdit;<br>+        QSpinBox *SRTPort;<br>+        QLineEdit *SAPName;<br>+        QString mux;<br>+};<br>+<br> class RTPDestBox: public VirtualDestBox<br> {<br>     Q_OBJECT<br>diff --git a/modules/gui/qt/dialogs/sout.cpp b/modules/gui/qt/dialogs/sout.cpp<br>index 8c2be69e23..003427acae 100644<br>--- a/modules/gui/qt/dialogs/sout.cpp<br>+++ b/modules/gui/qt/dialogs/sout.cpp<br>@@ -69,6 +69,7 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf, const QString&<br>     ui.destBox->addItem( "HTTP" );<br>     ui.destBox->addItem( "MS-WMSP (MMSH)" );<br>     ui.destBox->addItem( "RTSP" );<br>+    ui.destBox->addItem( "SRT / MPEG Transport Stream" );<br>     ui.destBox->addItem( "RTP / MPEG Transport Stream" );<br>     ui.destBox->addItem( "RTP Audio/Video Profile" );<br>     ui.destBox->addItem( "UDP (legacy)" );<br>@@ -132,18 +133,22 @@ void SoutDialog::addDest( )<br>             caption = qfu( "RTSP" );<br>             break;<br>         case 4:<br>+            db = new SRTDestBox( this, "ts" );<br>+            caption = "SRT/TS";<br>+            break;<br>+        case 5:<br>             db = new RTPDestBox( this, "ts" );<br>             caption = "RTP/TS";<br>             break;<br>-        case 5:<br>+        case 6:<br>             db = new RTPDestBox( this );<br>             caption = "RTP/AVP";<br>             break;<br>-        case 6:<br>+        case 7:<br>             db = new UDPDestBox( this );<br>             caption = "UDP";<br>             break;<br>-        case 7:<br>+        case 8:<br>             db = new ICEDestBox( this );<br>             caption = "Icecast";<br>             break;<br>diff --git a/modules/gui/qt/ui/open_net.ui b/modules/gui/qt/ui/open_net.ui<br>index e565ff3fd9..82c5347476 100644<br>--- a/modules/gui/qt/ui/open_net.ui<br>+++ b/modules/gui/qt/ui/open_net.ui<br>@@ -41,6 +41,7 @@<br>         </property><br>         <property name="text"><br>          <string notr="true"><a href="http://www.example.com/stream.avi">http://www.example.com/stream.avi</a><br>+srt://<a href="http://server.example.org:7001">server.example.org:7001</a><br> rtp://@:1234<br> mms://<a href="http://mms.examples.com/stream.asx">mms.examples.com/stream.asx</a><br> rtsp://<a href="http://server.example.org:8080/test.sdp">server.example.org:8080/test.sdp</a><br>-- <br>2.17.1<br><br><br><br></div></div></div>