[vlc-devel] commit: Qt4: merge unicast and multicast UDP, add RTP - fixes #1706 ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sun Jul 13 21:57:18 CEST 2008
vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sun Jul 13 22:58:56 2008 +0300| [763302ecde9c0edb1170d4b1efac860a484728cc]
Qt4: merge unicast and multicast UDP, add RTP - fixes #1706
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=763302ecde9c0edb1170d4b1efac860a484728cc
---
modules/gui/qt4/components/open_panels.cpp | 28 +++++++++++++++-------------
modules/gui/qt4/components/open_panels.hpp | 2 +-
2 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/modules/gui/qt4/components/open_panels.cpp b/modules/gui/qt4/components/open_panels.cpp
index 529d143..100e529 100644
--- a/modules/gui/qt4/components/open_panels.cpp
+++ b/modules/gui/qt4/components/open_panels.cpp
@@ -425,8 +425,8 @@ NetOpenPanel::NetOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
ui.protocolCombo->addItem("MMS", QVariant("mms"));
ui.protocolCombo->addItem("FTP", QVariant("ftp"));
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("RTP", QVariant("rtp"));
+ ui.protocolCombo->addItem("UDP", QVariant("udp"));
ui.protocolCombo->addItem("RTMP", QVariant("rtmp"));
updateProtocol( ui.protocolCombo->currentIndex() );
@@ -443,18 +443,16 @@ 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 ||
- idx_proto == UDPM_PROTO );
- ui.addressText->setEnabled( idx_proto != UDP_PROTO );
+ ui.timeShift->setEnabled( idx_proto == UDP_PROTO );
ui.portSpin->setEnabled( idx_proto == UDP_PROTO ||
- idx_proto == UDPM_PROTO );
+ idx_proto == RTP_PROTO );
if( idx_proto == NO_PROTO ) return;
/* If we already have a protocol in the address, replace it */
if( addr.contains( "://"))
{
- if( idx_proto != UDPM_PROTO )
+ if( idx_proto != UDP_PROTO && idx_proto != RTP_PROTO )
addr.replace( QRegExp("^.*://@*"), proto + "://");
else
addr.replace( QRegExp("^.*://"), proto + "://@");
@@ -475,7 +473,7 @@ void NetOpenPanel::updateMRL() {
ui.protocolCombo->setCurrentIndex(
ui.protocolCombo->findData( addr.section( ':', 0, 0 ) ) );
- if( idx_proto != UDP_PROTO || idx_proto != UDPM_PROTO )
+ if( idx_proto != UDP_PROTO || idx_proto != RTP_PROTO )
mrl = addr;
}
else
@@ -503,11 +501,6 @@ void NetOpenPanel::updateMRL() {
break;
case UDP_PROTO:
mrl = "udp://@";
- mrl += QString(":%1").arg( ui.portSpin->value() );
- emit methodChanged("udp-caching");
- break;
- case UDPM_PROTO: /* UDP multicast */
- mrl = "udp://@";
/* Add [] to IPv6 */
if ( addr.contains(':') && !addr.contains('[') )
{
@@ -517,6 +510,15 @@ void NetOpenPanel::updateMRL() {
mrl += QString(":%1").arg( ui.portSpin->value() );
emit methodChanged("udp-caching");
break;
+ case RTP_PROTO:
+ mrl = "rtp://@";
+ if ( addr.contains(':') && !addr.contains('[') )
+ mrl += "[" + addr + "]"; /* Add [] to IPv6 */
+ else
+ mrl += addr;
+ mrl += QString(":%1").arg( ui.portSpin->value() );
+ emit methodChanged("rtp-caching");
+ break;
case RTMP_PROTO:
mrl = "rtmp://" + addr;
emit methodChanged("rtmp-caching");
diff --git a/modules/gui/qt4/components/open_panels.hpp b/modules/gui/qt4/components/open_panels.hpp
index e8348ca..e2de731 100644
--- a/modules/gui/qt4/components/open_panels.hpp
+++ b/modules/gui/qt4/components/open_panels.hpp
@@ -56,8 +56,8 @@ enum
MMS_PROTO,
FTP_PROTO,
RTSP_PROTO,
+ RTP_PROTO,
UDP_PROTO,
- UDPM_PROTO,
RTMP_PROTO
};
More information about the vlc-devel
mailing list