Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
763302ec
Commit
763302ec
authored
Jul 13, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4: merge unicast and multicast UDP, add RTP - fixes #1706
parent
b49f9579
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
14 deletions
+16
-14
modules/gui/qt4/components/open_panels.cpp
modules/gui/qt4/components/open_panels.cpp
+15
-13
modules/gui/qt4/components/open_panels.hpp
modules/gui/qt4/components/open_panels.hpp
+1
-1
No files found.
modules/gui/qt4/components/open_panels.cpp
View file @
763302ec
...
@@ -425,8 +425,8 @@ NetOpenPanel::NetOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
...
@@ -425,8 +425,8 @@ NetOpenPanel::NetOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
ui
.
protocolCombo
->
addItem
(
"MMS"
,
QVariant
(
"mms"
));
ui
.
protocolCombo
->
addItem
(
"MMS"
,
QVariant
(
"mms"
));
ui
.
protocolCombo
->
addItem
(
"FTP"
,
QVariant
(
"ftp"
));
ui
.
protocolCombo
->
addItem
(
"FTP"
,
QVariant
(
"ftp"
));
ui
.
protocolCombo
->
addItem
(
"RTSP"
,
QVariant
(
"rtsp"
));
ui
.
protocolCombo
->
addItem
(
"RTSP"
,
QVariant
(
"rtsp"
));
ui
.
protocolCombo
->
addItem
(
"
UDP/RTP (unicast)"
,
QVariant
(
"ud
p"
));
ui
.
protocolCombo
->
addItem
(
"
RTP"
,
QVariant
(
"rt
p"
));
ui
.
protocolCombo
->
addItem
(
"UDP
/RTP (multicast)
"
,
QVariant
(
"udp"
));
ui
.
protocolCombo
->
addItem
(
"UDP"
,
QVariant
(
"udp"
));
ui
.
protocolCombo
->
addItem
(
"RTMP"
,
QVariant
(
"rtmp"
));
ui
.
protocolCombo
->
addItem
(
"RTMP"
,
QVariant
(
"rtmp"
));
updateProtocol
(
ui
.
protocolCombo
->
currentIndex
()
);
updateProtocol
(
ui
.
protocolCombo
->
currentIndex
()
);
...
@@ -443,18 +443,16 @@ void NetOpenPanel::updateProtocol( int idx_proto ) {
...
@@ -443,18 +443,16 @@ void NetOpenPanel::updateProtocol( int idx_proto ) {
QString
addr
=
ui
.
addressText
->
text
();
QString
addr
=
ui
.
addressText
->
text
();
QString
proto
=
ui
.
protocolCombo
->
itemData
(
idx_proto
).
toString
();
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
.
addressText
->
setEnabled
(
idx_proto
!=
UDP_PROTO
);
ui
.
portSpin
->
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
(
idx_proto
==
NO_PROTO
)
return
;
/* If we already have a protocol in the address, replace it */
/* If we already have a protocol in the address, replace it */
if
(
addr
.
contains
(
"://"
))
if
(
addr
.
contains
(
"://"
))
{
{
if
(
idx_proto
!=
UDP
M
_PROTO
)
if
(
idx_proto
!=
UDP
_PROTO
&&
idx_proto
!=
RTP
_PROTO
)
addr
.
replace
(
QRegExp
(
"^.*://@*"
),
proto
+
"://"
);
addr
.
replace
(
QRegExp
(
"^.*://@*"
),
proto
+
"://"
);
else
else
addr
.
replace
(
QRegExp
(
"^.*://"
),
proto
+
"://@"
);
addr
.
replace
(
QRegExp
(
"^.*://"
),
proto
+
"://@"
);
...
@@ -475,7 +473,7 @@ void NetOpenPanel::updateMRL() {
...
@@ -475,7 +473,7 @@ void NetOpenPanel::updateMRL() {
ui
.
protocolCombo
->
setCurrentIndex
(
ui
.
protocolCombo
->
setCurrentIndex
(
ui
.
protocolCombo
->
findData
(
addr
.
section
(
':'
,
0
,
0
)
)
);
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
;
mrl
=
addr
;
}
}
else
else
...
@@ -502,11 +500,6 @@ void NetOpenPanel::updateMRL() {
...
@@ -502,11 +500,6 @@ void NetOpenPanel::updateMRL() {
emit
methodChanged
(
"rtsp-caching"
);
emit
methodChanged
(
"rtsp-caching"
);
break
;
break
;
case
UDP_PROTO
:
case
UDP_PROTO
:
mrl
=
"udp://@"
;
mrl
+=
QString
(
":%1"
).
arg
(
ui
.
portSpin
->
value
()
);
emit
methodChanged
(
"udp-caching"
);
break
;
case
UDPM_PROTO
:
/* UDP multicast */
mrl
=
"udp://@"
;
mrl
=
"udp://@"
;
/* Add [] to IPv6 */
/* Add [] to IPv6 */
if
(
addr
.
contains
(
':'
)
&&
!
addr
.
contains
(
'['
)
)
if
(
addr
.
contains
(
':'
)
&&
!
addr
.
contains
(
'['
)
)
...
@@ -517,6 +510,15 @@ void NetOpenPanel::updateMRL() {
...
@@ -517,6 +510,15 @@ void NetOpenPanel::updateMRL() {
mrl
+=
QString
(
":%1"
).
arg
(
ui
.
portSpin
->
value
()
);
mrl
+=
QString
(
":%1"
).
arg
(
ui
.
portSpin
->
value
()
);
emit
methodChanged
(
"udp-caching"
);
emit
methodChanged
(
"udp-caching"
);
break
;
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
:
case
RTMP_PROTO
:
mrl
=
"rtmp://"
+
addr
;
mrl
=
"rtmp://"
+
addr
;
emit
methodChanged
(
"rtmp-caching"
);
emit
methodChanged
(
"rtmp-caching"
);
...
...
modules/gui/qt4/components/open_panels.hpp
View file @
763302ec
...
@@ -56,8 +56,8 @@ enum
...
@@ -56,8 +56,8 @@ enum
MMS_PROTO
,
MMS_PROTO
,
FTP_PROTO
,
FTP_PROTO
,
RTSP_PROTO
,
RTSP_PROTO
,
RTP_PROTO
,
UDP_PROTO
,
UDP_PROTO
,
UDPM_PROTO
,
RTMP_PROTO
RTMP_PROTO
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment