From a10edeec0fbf5a5f6e3dabd03ca3af6e428fe08f Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Kempf Date: Tue, 24 Jun 2008 18:37:42 -0700 Subject: [PATCH] Add RTMP option on the panel. --- modules/gui/qt4/components/open_panels.cpp | 12 ++++++++++-- modules/gui/qt4/components/open_panels.hpp | 3 ++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/modules/gui/qt4/components/open_panels.cpp b/modules/gui/qt4/components/open_panels.cpp index 79e2a5d8f2..5f8ec12b17 100644 --- a/modules/gui/qt4/components/open_panels.cpp +++ b/modules/gui/qt4/components/open_panels.cpp @@ -425,6 +425,7 @@ NetOpenPanel::NetOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ui.protocolCombo->addItem("RTSP", QVariant("rtsp")); ui.protocolCombo->addItem("UDP/RTP (unicast)", QVariant("udp")); ui.protocolCombo->addItem("UDP/RTP (multicast)", QVariant("udp")); + ui.protocolCombo->addItem("RTMP", QVariant("rtmp")); } NetOpenPanel::~NetOpenPanel() @@ -438,10 +439,12 @@ void NetOpenPanel::updateProtocol( int idx_proto ) { QString addr = ui.addressText->text(); QString proto = ui.protocolCombo->itemData( idx_proto ).toString(); - ui.timeShift->setEnabled( idx_proto >= UDP_PROTO ); + ui.timeShift->setEnabled( idx_proto == UDP_PROTO || + idx_proto == UDPM_PROTO ); ui.ipv6->setEnabled( idx_proto == UDP_PROTO ); ui.addressText->setEnabled( idx_proto != UDP_PROTO ); - ui.portSpin->setEnabled( idx_proto >= UDP_PROTO ); + ui.portSpin->setEnabled( idx_proto == UDP_PROTO || + idx_proto == UDPM_PROTO ); if( idx_proto == NO_PROTO ) return; @@ -514,6 +517,11 @@ void NetOpenPanel::updateMRL() { else mrl += addr; mrl += QString(":%1").arg( ui.portSpin->value() ); emit methodChanged("udp-caching"); + case RTMP_PROTO: + mrl = "rtmp://" + addr; + emit methodChanged("rtmp-caching"); + break; + } } diff --git a/modules/gui/qt4/components/open_panels.hpp b/modules/gui/qt4/components/open_panels.hpp index d79105cb7a..e8348ca62f 100644 --- a/modules/gui/qt4/components/open_panels.hpp +++ b/modules/gui/qt4/components/open_panels.hpp @@ -57,7 +57,8 @@ enum FTP_PROTO, RTSP_PROTO, UDP_PROTO, - UDPM_PROTO + UDPM_PROTO, + RTMP_PROTO }; -- 2.11.4.GIT