Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
193c90fa
Commit
193c90fa
authored
Feb 17, 2012
by
Pierre Ynard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qt4: fix TTL and SAP in sout wizard
This is ugly but fixes it for 2.0
parent
bc3d16ae
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
43 deletions
+59
-43
modules/gui/qt4/components/sout/sout_widgets.cpp
modules/gui/qt4/components/sout/sout_widgets.cpp
+39
-8
modules/gui/qt4/components/sout/sout_widgets.hpp
modules/gui/qt4/components/sout/sout_widgets.hpp
+16
-8
modules/gui/qt4/dialogs/sout.cpp
modules/gui/qt4/dialogs/sout.cpp
+4
-27
No files found.
modules/gui/qt4/components/sout/sout_widgets.cpp
View file @
193c90fa
...
@@ -108,7 +108,8 @@ FileDestBox::FileDestBox( QWidget *_parent ) : VirtualDestBox( _parent )
...
@@ -108,7 +108,8 @@ FileDestBox::FileDestBox( QWidget *_parent ) : VirtualDestBox( _parent )
BUTTONACT
(
fileSelectButton
,
fileBrowse
()
);
BUTTONACT
(
fileSelectButton
,
fileBrowse
()
);
}
}
QString
FileDestBox
::
getMRL
(
const
QString
&
mux
)
QString
FileDestBox
::
getMRL
(
const
QString
&
mux
,
const
int
,
const
bool
,
const
QString
&
,
const
QString
&
)
{
{
if
(
fileEdit
->
text
().
isEmpty
()
)
return
""
;
if
(
fileEdit
->
text
().
isEmpty
()
)
return
""
;
...
@@ -173,7 +174,8 @@ HTTPDestBox::HTTPDestBox( QWidget *_parent ) : VirtualDestBox( _parent )
...
@@ -173,7 +174,8 @@ HTTPDestBox::HTTPDestBox( QWidget *_parent ) : VirtualDestBox( _parent )
CT
(
HTTPEdit
);
CT
(
HTTPEdit
);
}
}
QString
HTTPDestBox
::
getMRL
(
const
QString
&
mux
)
QString
HTTPDestBox
::
getMRL
(
const
QString
&
mux
,
const
int
,
const
bool
,
const
QString
&
,
const
QString
&
)
{
{
if
(
HTTPEdit
->
text
().
isEmpty
()
)
return
""
;
if
(
HTTPEdit
->
text
().
isEmpty
()
)
return
""
;
...
@@ -232,7 +234,8 @@ MMSHDestBox::MMSHDestBox( QWidget *_parent ) : VirtualDestBox( _parent )
...
@@ -232,7 +234,8 @@ MMSHDestBox::MMSHDestBox( QWidget *_parent ) : VirtualDestBox( _parent )
CT
(
MMSHEdit
);
CT
(
MMSHEdit
);
}
}
QString
MMSHDestBox
::
getMRL
(
const
QString
&
)
QString
MMSHDestBox
::
getMRL
(
const
QString
&
,
const
int
,
const
bool
,
const
QString
&
,
const
QString
&
)
{
{
if
(
MMSHEdit
->
text
().
isEmpty
()
)
return
""
;
if
(
MMSHEdit
->
text
().
isEmpty
()
)
return
""
;
...
@@ -277,7 +280,8 @@ RTSPDestBox::RTSPDestBox( QWidget *_parent ) : VirtualDestBox( _parent )
...
@@ -277,7 +280,8 @@ RTSPDestBox::RTSPDestBox( QWidget *_parent ) : VirtualDestBox( _parent )
CT
(
RTSPEdit
);
CT
(
RTSPEdit
);
}
}
QString
RTSPDestBox
::
getMRL
(
const
QString
&
)
QString
RTSPDestBox
::
getMRL
(
const
QString
&
,
const
int
,
const
bool
,
const
QString
&
,
const
QString
&
)
{
{
if
(
RTSPEdit
->
text
().
isEmpty
()
)
return
""
;
if
(
RTSPEdit
->
text
().
isEmpty
()
)
return
""
;
...
@@ -326,16 +330,34 @@ UDPDestBox::UDPDestBox( QWidget *_parent ) : VirtualDestBox( _parent )
...
@@ -326,16 +330,34 @@ UDPDestBox::UDPDestBox( QWidget *_parent ) : VirtualDestBox( _parent )
CT
(
UDPEdit
);
CT
(
UDPEdit
);
}
}
QString
UDPDestBox
::
getMRL
(
const
QString
&
mux
)
QString
UDPDestBox
::
getMRL
(
const
QString
&
mux
,
const
int
ttl
,
const
bool
sap
,
const
QString
&
sapName
,
const
QString
&
sapGroup
)
{
{
if
(
UDPEdit
->
text
().
isEmpty
()
)
return
""
;
if
(
UDPEdit
->
text
().
isEmpty
()
)
return
""
;
SoutMrl
m
;
SoutMrl
m
;
m
.
begin
(
"udp"
);
m
.
begin
(
"std"
);
SoutMrl
access
;
access
.
begin
(
"udp"
);
access
.
option
(
"ttl"
,
ttl
);
access
.
end
();
m
.
option
(
"access"
,
access
.
getMrl
()
);
/* udp output, ts-mux is really only reasonable one to use*/
/* udp output, ts-mux is really only reasonable one to use*/
if
(
!
mux
.
isEmpty
()
&&
!
mux
.
compare
(
"ts"
)
)
if
(
!
mux
.
isEmpty
()
&&
!
mux
.
compare
(
"ts"
)
)
m
.
option
(
"mux"
,
mux
);
m
.
option
(
"mux"
,
mux
);
m
.
option
(
"dst"
,
UDPEdit
->
text
(),
UDPPort
->
value
()
);
m
.
option
(
"dst"
,
UDPEdit
->
text
(),
UDPPort
->
value
()
);
if
(
sap
)
{
m
.
option
(
"sap"
);
if
(
!
sapName
.
isEmpty
()
)
m
.
option
(
"name"
,
sapName
);
if
(
!
sapGroup
.
isEmpty
()
)
m
.
option
(
"group"
,
sapGroup
);
}
m
.
end
();
m
.
end
();
return
m
.
getMrl
();
return
m
.
getMrl
();
...
@@ -374,7 +396,8 @@ RTPDestBox::RTPDestBox( QWidget *_parent, const char *_mux )
...
@@ -374,7 +396,8 @@ RTPDestBox::RTPDestBox( QWidget *_parent, const char *_mux )
CT
(
RTPEdit
);
CT
(
RTPEdit
);
}
}
QString
RTPDestBox
::
getMRL
(
const
QString
&
)
QString
RTPDestBox
::
getMRL
(
const
QString
&
,
const
int
ttl
,
const
bool
sap
,
const
QString
&
sapName
,
const
QString
&
)
{
{
if
(
RTPEdit
->
text
().
isEmpty
()
)
return
""
;
if
(
RTPEdit
->
text
().
isEmpty
()
)
return
""
;
...
@@ -385,6 +408,13 @@ QString RTPDestBox::getMRL( const QString& )
...
@@ -385,6 +408,13 @@ QString RTPDestBox::getMRL( const QString& )
/* mp4-mux ain't usable in rtp-output either */
/* mp4-mux ain't usable in rtp-output either */
if
(
mux
!=
NULL
)
if
(
mux
!=
NULL
)
m
.
option
(
"mux"
,
qfu
(
mux
)
);
m
.
option
(
"mux"
,
qfu
(
mux
)
);
if
(
sap
)
{
m
.
option
(
"sap"
);
if
(
!
sapName
.
isEmpty
()
)
m
.
option
(
"name"
,
sapName
);
}
m
.
option
(
"ttl"
,
ttl
);
m
.
end
();
m
.
end
();
return
m
.
getMrl
();
return
m
.
getMrl
();
...
@@ -435,7 +465,8 @@ ICEDestBox::ICEDestBox( QWidget *_parent ) : VirtualDestBox( _parent )
...
@@ -435,7 +465,8 @@ ICEDestBox::ICEDestBox( QWidget *_parent ) : VirtualDestBox( _parent )
#undef CS
#undef CS
#undef CT
#undef CT
QString
ICEDestBox
::
getMRL
(
const
QString
&
)
QString
ICEDestBox
::
getMRL
(
const
QString
&
,
const
int
,
const
bool
,
const
QString
&
,
const
QString
&
)
{
{
if
(
ICEEdit
->
text
().
isEmpty
()
)
return
""
;
if
(
ICEEdit
->
text
().
isEmpty
()
)
return
""
;
...
...
modules/gui/qt4/components/sout/sout_widgets.hpp
View file @
193c90fa
...
@@ -49,7 +49,8 @@ class VirtualDestBox : public QWidget
...
@@ -49,7 +49,8 @@ class VirtualDestBox : public QWidget
Q_OBJECT
Q_OBJECT
public:
public:
VirtualDestBox
(
QWidget
*
_parent
=
NULL
)
:
QWidget
(
_parent
){}
VirtualDestBox
(
QWidget
*
_parent
=
NULL
)
:
QWidget
(
_parent
){}
virtual
QString
getMRL
(
const
QString
&
)
=
0
;
virtual
QString
getMRL
(
const
QString
&
,
const
int
,
const
bool
,
const
QString
&
,
const
QString
&
)
=
0
;
protected:
protected:
QString
mrl
;
QString
mrl
;
signals:
signals:
...
@@ -61,7 +62,8 @@ class FileDestBox: public VirtualDestBox
...
@@ -61,7 +62,8 @@ class FileDestBox: public VirtualDestBox
Q_OBJECT
Q_OBJECT
public:
public:
FileDestBox
(
QWidget
*
_parent
=
NULL
);
FileDestBox
(
QWidget
*
_parent
=
NULL
);
virtual
QString
getMRL
(
const
QString
&
);
virtual
QString
getMRL
(
const
QString
&
,
const
int
,
const
bool
,
const
QString
&
,
const
QString
&
);
private:
private:
QLineEdit
*
fileEdit
;
QLineEdit
*
fileEdit
;
private
slots
:
private
slots
:
...
@@ -73,7 +75,8 @@ class HTTPDestBox: public VirtualDestBox
...
@@ -73,7 +75,8 @@ class HTTPDestBox: public VirtualDestBox
Q_OBJECT
Q_OBJECT
public:
public:
HTTPDestBox
(
QWidget
*
_parent
=
NULL
);
HTTPDestBox
(
QWidget
*
_parent
=
NULL
);
virtual
QString
getMRL
(
const
QString
&
);
virtual
QString
getMRL
(
const
QString
&
,
const
int
,
const
bool
,
const
QString
&
,
const
QString
&
);
private:
private:
QLineEdit
*
HTTPEdit
;
QLineEdit
*
HTTPEdit
;
QSpinBox
*
HTTPPort
;
QSpinBox
*
HTTPPort
;
...
@@ -84,7 +87,8 @@ class MMSHDestBox: public VirtualDestBox
...
@@ -84,7 +87,8 @@ class MMSHDestBox: public VirtualDestBox
Q_OBJECT
Q_OBJECT
public:
public:
MMSHDestBox
(
QWidget
*
_parent
=
NULL
);
MMSHDestBox
(
QWidget
*
_parent
=
NULL
);
virtual
QString
getMRL
(
const
QString
&
);
virtual
QString
getMRL
(
const
QString
&
,
const
int
,
const
bool
,
const
QString
&
,
const
QString
&
);
private:
private:
QLineEdit
*
MMSHEdit
;
QLineEdit
*
MMSHEdit
;
QSpinBox
*
MMSHPort
;
QSpinBox
*
MMSHPort
;
...
@@ -95,7 +99,8 @@ class RTSPDestBox: public VirtualDestBox
...
@@ -95,7 +99,8 @@ class RTSPDestBox: public VirtualDestBox
Q_OBJECT
Q_OBJECT
public:
public:
RTSPDestBox
(
QWidget
*
_parent
=
NULL
);
RTSPDestBox
(
QWidget
*
_parent
=
NULL
);
virtual
QString
getMRL
(
const
QString
&
);
virtual
QString
getMRL
(
const
QString
&
,
const
int
,
const
bool
,
const
QString
&
,
const
QString
&
);
private:
private:
QLineEdit
*
RTSPEdit
;
QLineEdit
*
RTSPEdit
;
QSpinBox
*
RTSPPort
;
QSpinBox
*
RTSPPort
;
...
@@ -106,7 +111,8 @@ class UDPDestBox: public VirtualDestBox
...
@@ -106,7 +111,8 @@ class UDPDestBox: public VirtualDestBox
Q_OBJECT
Q_OBJECT
public:
public:
UDPDestBox
(
QWidget
*
_parent
=
NULL
);
UDPDestBox
(
QWidget
*
_parent
=
NULL
);
virtual
QString
getMRL
(
const
QString
&
);
virtual
QString
getMRL
(
const
QString
&
,
const
int
,
const
bool
,
const
QString
&
,
const
QString
&
);
private:
private:
QLineEdit
*
UDPEdit
;
QLineEdit
*
UDPEdit
;
QSpinBox
*
UDPPort
;
QSpinBox
*
UDPPort
;
...
@@ -117,7 +123,8 @@ class RTPDestBox: public VirtualDestBox
...
@@ -117,7 +123,8 @@ class RTPDestBox: public VirtualDestBox
Q_OBJECT
Q_OBJECT
public:
public:
RTPDestBox
(
QWidget
*
_parent
=
NULL
,
const
char
*
mux
=
NULL
);
RTPDestBox
(
QWidget
*
_parent
=
NULL
,
const
char
*
mux
=
NULL
);
virtual
QString
getMRL
(
const
QString
&
);
virtual
QString
getMRL
(
const
QString
&
,
const
int
,
const
bool
,
const
QString
&
,
const
QString
&
);
private:
private:
QLineEdit
*
RTPEdit
;
QLineEdit
*
RTPEdit
;
QSpinBox
*
RTPPort
;
QSpinBox
*
RTPPort
;
...
@@ -129,7 +136,8 @@ class ICEDestBox: public VirtualDestBox
...
@@ -129,7 +136,8 @@ class ICEDestBox: public VirtualDestBox
Q_OBJECT
Q_OBJECT
public:
public:
ICEDestBox
(
QWidget
*
_parent
=
NULL
);
ICEDestBox
(
QWidget
*
_parent
=
NULL
);
virtual
QString
getMRL
(
const
QString
&
);
virtual
QString
getMRL
(
const
QString
&
,
const
int
,
const
bool
,
const
QString
&
,
const
QString
&
);
private:
private:
QLineEdit
*
ICEEdit
;
QLineEdit
*
ICEEdit
;
QLineEdit
*
ICEMountEdit
;
QLineEdit
*
ICEMountEdit
;
...
...
modules/gui/qt4/dialogs/sout.cpp
View file @
193c90fa
...
@@ -229,7 +229,10 @@ void SoutDialog::updateMRL()
...
@@ -229,7 +229,10 @@ void SoutDialog::updateMRL()
if
(
!
vdb
)
if
(
!
vdb
)
continue
;
continue
;
QString
tempMRL
=
vdb
->
getMRL
(
qs_mux
);
QString
tempMRL
=
vdb
->
getMRL
(
qs_mux
,
ui
.
ttl
->
value
(),
ui
.
sap
->
isChecked
(),
ui
.
sapName
->
text
(),
ui
.
sapGroup
->
text
()
);
if
(
tempMRL
.
isEmpty
()
)
continue
;
if
(
tempMRL
.
isEmpty
()
)
continue
;
if
(
multi
)
if
(
multi
)
...
@@ -255,33 +258,7 @@ void SoutDialog::updateMRL()
...
@@ -255,33 +258,7 @@ void SoutDialog::updateMRL()
mrl
=
smrl
.
getMrl
();
mrl
=
smrl
.
getMrl
();
if
(
ui
.
sap
->
isChecked
()
)
{
QString
group
=
ui
.
sapGroup
->
text
();
QString
name
=
ui
.
sapName
->
text
();
/* FIXME: This sucks. We should really return a QStringList instead of
* (mis)quoting, concatainating and split input item paramters. */
name
=
name
.
replace
(
" "
,
" "
);
group
=
group
.
replace
(
" "
,
" "
);
/* We need to add options for both standard and rtp targets */
/* This is inelegant but simple and functional */
mrl
.
append
(
qfu
(
" :sout-rtp-sap"
)
);
mrl
.
append
(
qfu
(
" :sout-rtp-name="
)
+
name
);
mrl
.
append
(
qfu
(
" :sout-standard-sap"
)
);
mrl
.
append
(
qfu
(
" :sout-standard-name="
)
+
name
);
mrl
.
append
(
qfu
(
" :sout-standard-group="
)
+
group
);
}
else
{
mrl
.
append
(
qfu
(
" :no-sout-rtp-sap"
)
);
mrl
.
append
(
qfu
(
" :no-sout-standard-sap"
)
);
}
if
(
ui
.
soutAll
->
isChecked
()
)
mrl
.
append
(
" :sout-all"
);
if
(
ui
.
soutAll
->
isChecked
()
)
mrl
.
append
(
" :sout-all"
);
mrl
.
append
(
qfu
(
" :ttl="
)
+
QString
::
number
(
ui
.
ttl
->
value
()
)
);
mrl
.
append
(
" :sout-keep"
);
mrl
.
append
(
" :sout-keep"
);
ui
.
mrlEdit
->
setPlainText
(
mrl
);
ui
.
mrlEdit
->
setPlainText
(
mrl
);
...
...
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