vlc | branch: master | Sergio Ammirata <[email protected]> | Tue Mar 19 08:16:04 2019 -0400| [d87f13521cba7f2072ca03c0451c7afd47274fa9] | committer: Thomas Guillem
Qt: sout: Add rist output option Signed-off-by: Thomas Guillem <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d87f13521cba7f2072ca03c0451c7afd47274fa9 --- modules/gui/qt/components/sout/sout_widgets.cpp | 54 +++++++++++++++++++++++++ modules/gui/qt/components/sout/sout_widgets.hpp | 13 ++++++ modules/gui/qt/dialogs/sout.cpp | 11 +++-- 3 files changed, 75 insertions(+), 3 deletions(-) diff --git a/modules/gui/qt/components/sout/sout_widgets.cpp b/modules/gui/qt/components/sout/sout_widgets.cpp index 2f65a5d880..8eb9cccea3 100644 --- a/modules/gui/qt/components/sout/sout_widgets.cpp +++ b/modules/gui/qt/components/sout/sout_widgets.cpp @@ -415,6 +415,60 @@ QString SRTDestBox::getMRL(const QString&) return m.getMrl(); } +RISTDestBox::RISTDestBox( QWidget *_parent, const char *_mux ) + : VirtualDestBox( _parent ), mux( qfu(_mux) ) +{ + label->setText( qtr( "This module outputs the stream using the RIST protocol (TR06).") ); + + QLabel *RISTAddressLabel = new QLabel( qtr("Destination Address"), this ); + RISTAddress = new QLineEdit(this); + layout->addWidget(RISTAddressLabel, 1, 0, 1, 1); + layout->addWidget(RISTAddress, 1, 1, 1, 1); + + QLabel *RISTPortLabel = new QLabel( qtr("Destination Port"), this ); + RISTPort = new QSpinBox(this); + RISTPort->setMaximumSize(QSize(90, 16777215)); + RISTPort->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); + RISTPort->setMinimum(1); + RISTPort->setMaximum(65535); + RISTPort->setValue(1968); + layout->addWidget(RISTPortLabel, 2, 0, 1, 1); + layout->addWidget(RISTPort, 2, 1, 1, 1); + + QLabel *RISTNameLabel = new QLabel( qtr("Stream Name"), this ); + RISTName = new QLineEdit(this); + layout->addWidget(RISTNameLabel, 3, 0, 1, 1); + layout->addWidget(RISTName, 3, 1, 1, 1); + + CT( RISTAddress ); + CS( RISTPort ); + CT( RISTName ); +} + +QString RISTDestBox::getMRL( const QString& ) +{ + QString addr = RISTAddress->text(); + QString name = RISTName->text(); + + if( addr.isEmpty() ) return qfu(""); + QString destination = addr + ":" + QString::number(RISTPort->value()); + SoutMrl m; + m.begin( "std" ); + if( !name.isEmpty() ) + { + m.option( "access", "rist{stream-name=" + name + "}" ); + } + else + { + m.option( "access", "rist" ); + } + m.option( "mux", "ts" ); + m.option( "dst", destination ); + m.end(); + + return m.getMrl(); +} + RTPDestBox::RTPDestBox( QWidget *_parent, const char *_mux ) : VirtualDestBox( _parent ), mux( qfu(_mux) ) diff --git a/modules/gui/qt/components/sout/sout_widgets.hpp b/modules/gui/qt/components/sout/sout_widgets.hpp index 3413c8d239..d718e7e01c 100644 --- a/modules/gui/qt/components/sout/sout_widgets.hpp +++ b/modules/gui/qt/components/sout/sout_widgets.hpp @@ -130,6 +130,19 @@ class SRTDestBox: public VirtualDestBox QString mux; }; +class RISTDestBox: public VirtualDestBox +{ + Q_OBJECT + public: + RISTDestBox( QWidget *_parent = NULL, const char *mux = NULL ); + QString getMRL( const QString& ) Q_DECL_OVERRIDE; + private: + QLineEdit *RISTAddress; + QSpinBox *RISTPort; + QLineEdit *RISTName; + QString mux; +}; + class RTPDestBox: public VirtualDestBox { Q_OBJECT diff --git a/modules/gui/qt/dialogs/sout.cpp b/modules/gui/qt/dialogs/sout.cpp index 003427acae..bbcc308d63 100644 --- a/modules/gui/qt/dialogs/sout.cpp +++ b/modules/gui/qt/dialogs/sout.cpp @@ -70,6 +70,7 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf, const QString& ui.destBox->addItem( "MS-WMSP (MMSH)" ); ui.destBox->addItem( "RTSP" ); ui.destBox->addItem( "SRT / MPEG Transport Stream" ); + ui.destBox->addItem( "RIST / MPEG Transport Stream" ); ui.destBox->addItem( "RTP / MPEG Transport Stream" ); ui.destBox->addItem( "RTP Audio/Video Profile" ); ui.destBox->addItem( "UDP (legacy)" ); @@ -137,18 +138,22 @@ void SoutDialog::addDest( ) caption = "SRT/TS"; break; case 5: + db = new RISTDestBox( this, "ts" ); + caption = "RIST/TS"; + break; + case 6: db = new RTPDestBox( this, "ts" ); caption = "RTP/TS"; break; - case 6: + case 7: db = new RTPDestBox( this ); caption = "RTP/AVP"; break; - case 7: + case 8: db = new UDPDestBox( this ); caption = "UDP"; break; - case 8: + case 9: db = new ICEDestBox( this ); caption = "Icecast"; break; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
