<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}
p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div><br></div><div>On Mon, Mar 18, 2019, at 14:17, Aaron Boxer wrote:<br></div><blockquote id="fastmail-quoted" type="cite"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>---<br></div><div> .../gui/qt/components/sout/sout_widgets.cpp | 55 +++++++++++++++++++<br></div><div> .../gui/qt/components/sout/sout_widgets.hpp | 13 +++++<br></div><div> modules/gui/qt/dialogs/sout.cpp | 11 +++-<br></div><div> modules/gui/qt/ui/open_net.ui | 1 +<br></div><div> 4 files changed, 77 insertions(+), 3 deletions(-)<br></div><div><br></div><div>diff --git a/modules/gui/qt/components/sout/sout_widgets.cpp b/modules/gui/qt/components/sout/sout_widgets.cpp<br></div><div>index a6793e9243..2f65a5d880 100644<br></div><div>--- a/modules/gui/qt/components/sout/sout_widgets.cpp<br></div><div>+++ b/modules/gui/qt/components/sout/sout_widgets.cpp<br></div><div>@@ -359,6 +359,61 @@ QString UDPDestBox::getMRL( const QString& mux )<br></div><div> return m.getMrl();<br></div><div> }<br></div><div> <br></div><div>+SRTDestBox::SRTDestBox(QWidget *_parent, const char *_mux) :<br></div><div>+ VirtualDestBox( _parent ), mux( qfu( _mux ) )<br></div><div>+{<br></div><div>+ label->setText(<br></div><div>+ qtr( "This module outputs the transcoded stream to a network"<br></div><div>+ " via SRT." ) );<br></div><div>+<br></div><div>+ QLabel *SRTLabel = new QLabel( qtr( "Address" ), this );<br></div><div>+ SRTEdit = new QLineEdit( this );<br></div><div>+ layout->addWidget( SRTLabel, 1, 0, 1, 1 );<br></div><div>+ layout->addWidget( SRTEdit, 1, 1, 1, 1 );<br></div><div>+<br></div><div>+ QLabel *SRTPortLabel = new QLabel( qtr( "Base port" ), this );<br></div><div>+ SRTPort = new QSpinBox( this );<br></div><div>+ SRTPort->setMaximumSize( QSize( 90, 16777215 ) );<br></div><div>+ SRTPort->setAlignment(<br></div><div>+ Qt::AlignRight | Qt::AlignTrailing | Qt::AlignVCenter );<br></div><div>+ SRTPort->setMinimum( 1 );<br></div><div>+ SRTPort->setMaximum( 65535 );<br></div><div>+ SRTPort->setValue( 7001 );<br></div><div>+ layout->addWidget( SRTPortLabel, 2, 0, 1, 1 );<br></div><div>+ layout->addWidget( SRTPort, 2, 1, 1, 1 );<br></div><div>+<br></div><div>+ QLabel *SAPNameLabel = new QLabel( qtr( "Stream name" ), this );<br></div><div>+ SAPName = new QLineEdit( this );<br></div><div>+ layout->addWidget( SAPNameLabel, 3, 0, 1, 1 );<br></div><div>+ layout->addWidget( SAPName, 3, 1, 1, 1 );<br></div><div>+<br></div><div>+ CT( SRTEdit );<br></div><div>+ CS( SRTPort );<br></div><div>+ CT( SAPName );<br></div><div>+}<br></div><div>+<br></div><div>+QString SRTDestBox::getMRL(const QString&)<br></div><div>+{<br></div><div>+ QString addr = SRTEdit->text();<br></div><div>+ QString name = SAPName->text();<br></div><div>+<br></div><div>+ if (addr.isEmpty())<br></div><div>+ return qfu( "" );<br></div><div>+ QString destination = addr + ":" + QString::number( SRTPort->value() );<br></div><div>+ SoutMrl m;<br></div><div>+ m.begin( "srt" );<br></div><div>+ m.option( "dst", destination );<br></div><div>+ /* mp4-mux ain't usable in rtp-output either */<br></div><div>+ if (!mux.isEmpty())<br></div><div>+ m.option( "mux", mux );<br></div><div>+ if (!name.isEmpty()) {<br></div><div>+ m.option( "sap" );<br></div><div>+ m.option( "name", name );<br></div><div>+ }<br></div><div>+ m.end();<br></div><div>+<br></div><div>+ return m.getMrl();<br></div><div>+}<br></div><div> <br></div><div> <br></div><div> RTPDestBox::RTPDestBox( QWidget *_parent, const char *_mux )<br></div><div>diff --git a/modules/gui/qt/components/sout/sout_widgets.hpp b/modules/gui/qt/components/sout/sout_widgets.hpp<br></div><div>index 5b9496c83a..3413c8d239 100644<br></div><div>--- a/modules/gui/qt/components/sout/sout_widgets.hpp<br></div><div>+++ b/modules/gui/qt/components/sout/sout_widgets.hpp<br></div><div>@@ -117,6 +117,19 @@ class UDPDestBox: public VirtualDestBox<br></div><div> QSpinBox *UDPPort;<br></div><div> };<br></div><div> <br></div><div>+class SRTDestBox: public VirtualDestBox<br></div><div>+{<br></div><div>+ Q_OBJECT<br></div><div>+ public:<br></div><div>+ SRTDestBox( QWidget *_parent = NULL, const char *mux = NULL );<br></div><div>+ QString getMRL( const QString& ) Q_DECL_OVERRIDE;<br></div><div>+ private:<br></div><div>+ QLineEdit *SRTEdit;<br></div><div>+ QSpinBox *SRTPort;<br></div><div>+ QLineEdit *SAPName;<br></div><div>+ QString mux;<br></div><div>+};<br></div><div>+<br></div><div> class RTPDestBox: public VirtualDestBox<br></div><div> {<br></div><div> Q_OBJECT<br></div><div>diff --git a/modules/gui/qt/dialogs/sout.cpp b/modules/gui/qt/dialogs/sout.cpp<br></div><div>index 8c2be69e23..003427acae 100644<br></div><div>--- a/modules/gui/qt/dialogs/sout.cpp<br></div><div>+++ b/modules/gui/qt/dialogs/sout.cpp<br></div><div>@@ -69,6 +69,7 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf, const QString&<br></div><div> ui.destBox->addItem( "HTTP" );<br></div><div> ui.destBox->addItem( "MS-WMSP (MMSH)" );<br></div><div> ui.destBox->addItem( "RTSP" );<br></div><div>+ ui.destBox->addItem( "SRT / MPEG Transport Stream" );<br></div><div> ui.destBox->addItem( "RTP / MPEG Transport Stream" );<br></div><div> ui.destBox->addItem( "RTP Audio/Video Profile" );<br></div><div> ui.destBox->addItem( "UDP (legacy)" );<br></div><div>@@ -132,18 +133,22 @@ void SoutDialog::addDest( )<br></div><div> caption = qfu( "RTSP" );<br></div><div> break;<br></div><div> case 4:<br></div><div>+ db = new SRTDestBox( this, "ts" );<br></div><div>+ caption = "SRT/TS";<br></div><div>+ break;<br></div><div>+ case 5:<br></div><div> db = new RTPDestBox( this, "ts" );<br></div><div> caption = "RTP/TS";<br></div><div> break;<br></div><div>- case 5:<br></div><div>+ case 6:<br></div><div> db = new RTPDestBox( this );<br></div><div> caption = "RTP/AVP";<br></div><div> break;<br></div><div>- case 6:<br></div><div>+ case 7:<br></div><div> db = new UDPDestBox( this );<br></div><div> caption = "UDP";<br></div><div> break;<br></div><div>- case 7:<br></div><div>+ case 8:<br></div><div> db = new ICEDestBox( this );<br></div><div> caption = "Icecast";<br></div><div> break;<br></div><div>diff --git a/modules/gui/qt/ui/open_net.ui b/modules/gui/qt/ui/open_net.ui<br></div><div>index e565ff3fd9..82c5347476 100644<br></div><div>--- a/modules/gui/qt/ui/open_net.ui<br></div><div>+++ b/modules/gui/qt/ui/open_net.ui<br></div><div>@@ -41,6 +41,7 @@<br></div><div> </property><br></div><div> <property name="text"><br></div><div> <string notr="true"><a href="http://www.example.com/stream.avi">http://www.example.com/stream.avi</a><br></div><div>+srt://<a href="http://server.example.org:7001">server.example.org:7001</a><br></div></div></div></div></blockquote><div><br></div><div>Same remark than for the "Qt: show rist input option" patch.<br></div><div>If accepted, this need to be done in a separate patch.<br></div><div><br></div><blockquote id="fastmail-quoted" type="cite"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div> rtp://@:1234<br></div><div> mms://<a href="http://mms.examples.com/stream.asx">mms.examples.com/stream.asx</a><br></div><div> rtsp://<a href="http://server.example.org:8080/test.sdp">server.example.org:8080/test.sdp</a><br></div><div>-- <br></div><div>2.17.1<br></div><div><br></div><div><br></div></div></div></div><div>_______________________________________________<br></div><div>vlc-devel mailing list<br></div><div>To unsubscribe or modify your subscription options:<br></div><div>https://mailman.videolan.org/listinfo/vlc-devel<br></div></blockquote><div><br></div></body></html>