Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
2c5d2a34
Commit
2c5d2a34
authored
Aug 03, 2008
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try to fix Sout Dialog ( Part 2 )
Should fix RTP generation and Icecast generation.
parent
d8f50ad6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
202 additions
and
114 deletions
+202
-114
modules/gui/qt4/dialogs/sout.cpp
modules/gui/qt4/dialogs/sout.cpp
+100
-51
modules/gui/qt4/dialogs/sout.hpp
modules/gui/qt4/dialogs/sout.hpp
+1
-0
modules/gui/qt4/ui/sout.ui
modules/gui/qt4/ui/sout.ui
+101
-63
No files found.
modules/gui/qt4/dialogs/sout.cpp
View file @
2c5d2a34
...
...
@@ -64,6 +64,8 @@ struct sout_gui_descr_t
int32_t
i_http
;
/*< http port number */
int32_t
i_mms
;
/*< mms port number */
int32_t
i_rtp
;
/*< rtp port number */
int32_t
i_rtp_audio
;
/*< rtp port number */
int32_t
i_rtp_video
;
/*< rtp port number */
int32_t
i_udp
;
/*< udp port number */
int32_t
i_icecast
;
/*< icecast port number */
...
...
@@ -160,28 +162,31 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf,
#define CT( x ) CONNECT( ui.x, textChanged( const QString ), this, updateMRL() );
#define CS( x ) CONNECT( ui.x, valueChanged( int ), this, updateMRL() );
#define CC( x ) CONNECT( ui.x, currentIndexChanged( int ), this, updateMRL() );
//
/* Output */
/* Output */
CB
(
fileOutput
);
CB
(
HTTPOutput
);
CB
(
localOutput
);
CB
(
RTPOutput
);
CB
(
MMSHOutput
);
CB
(
rawInput
);
CB
(
UDPOutput
);
CT
(
fileEdit
);
CT
(
HTTPEdit
);
CT
(
RTPEdit
);
CT
(
MMSHEdit
);
CT
(
UDPEdit
);
CT
(
IcecastEdit
);
CT
(
IcecastMountpointEdit
);
CT
(
IcecastNamePassEdit
);
CS
(
HTTPPort
);
CS
(
RTPPort
);
CS
(
MMSHPort
);
CS
(
UDPPort
);
//
/* Transcode */
CS
(
HTTPPort
);
CS
(
RTPPort
);
CS
(
RTPPort2
);
CS
(
MMSHPort
);
CS
(
UDPPort
);
/* Transcode */
CC
(
vCodecBox
);
CC
(
subsCodecBox
);
CC
(
aCodecBox
)
;
CB
(
transcodeVideo
);
CB
(
transcodeAudio
);
CB
(
transcodeSubs
);
// CB( sOverlay );
/* CB( sOverlay ); */
CS
(
vBitrateSpin
);
CS
(
aBitrateSpin
);
CS
(
aChannelsSpin
);
CC
(
vScaleBox
);
//
/* Mux */
/* Mux */
CB
(
PSMux
);
CB
(
TSMux
);
CB
(
MPEG1Mux
);
CB
(
OggMux
);
CB
(
ASFMux
);
CB
(
MP4Mux
);
CB
(
MOVMux
);
CB
(
WAVMux
);
CB
(
RAWMux
);
CB
(
FLVMux
);
//
/* Misc */
/* Misc */
CB
(
soutAll
);
CS
(
ttl
);
CT
(
sapName
);
CT
(
sapGroup
);
//
CONNECT
(
ui
.
profileBox
,
activated
(
const
QString
&
),
this
,
setOptions
()
);
CONNECT
(
ui
.
fileSelectButton
,
clicked
()
,
this
,
fileBrowse
()
);
CONNECT
(
ui
.
transcodeVideo
,
toggled
(
bool
),
this
,
setVTranscodeOptions
(
bool
)
);
CONNECT
(
ui
.
transcodeAudio
,
toggled
(
bool
),
this
,
setATranscodeOptions
(
bool
)
);
CONNECT
(
ui
.
transcodeSubs
,
toggled
(
bool
),
this
,
setSTranscodeOptions
(
bool
)
);
CONNECT
(
ui
.
transcodeVideo
,
toggled
(
bool
),
this
,
setVTranscodeOptions
(
bool
)
);
CONNECT
(
ui
.
transcodeAudio
,
toggled
(
bool
),
this
,
setATranscodeOptions
(
bool
)
);
CONNECT
(
ui
.
transcodeSubs
,
toggled
(
bool
),
this
,
setSTranscodeOptions
(
bool
)
);
CONNECT
(
ui
.
rawInput
,
toggled
(
bool
),
this
,
setRawOptions
(
bool
)
);
okButton
=
new
QPushButton
(
qtr
(
"&Stream"
)
);
...
...
@@ -196,7 +201,9 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf,
if
(
b_transcode_only
)
toggleSout
();
CONNECT
(
ui
.
UDPOutput
,
toggled
(
bool
),
this
,
changeUDPandRTPmess
(
bool
)
);}
CONNECT
(
ui
.
UDPOutput
,
toggled
(
bool
),
this
,
changeUDPandRTPmess
(
bool
)
);
CONNECT
(
ui
.
RTPOutput
,
clicked
(
bool
),
this
,
RTPtoggled
(
bool
)
);
}
void
SoutDialog
::
fileBrowse
()
{
...
...
@@ -303,8 +310,34 @@ void SoutDialog::changeUDPandRTPmess( bool b_udp )
ui
.
RTPPortLabel
->
setVisible
(
!
b_udp
);
ui
.
UDPEdit
->
setVisible
(
b_udp
);
ui
.
UDPLabel
->
setVisible
(
b_udp
);
ui
.
UDPPortLabel
->
setText
(
b_udp
?
qtr
(
"Port:"
)
:
qtr
(
"Video Port:"
)
);
ui
.
RTPPortLabel
->
setText
(
b_udp
?
qtr
(
"Port:"
)
:
qtr
(
"Audio Port:"
)
);
ui
.
UDPPortLabel
->
setText
(
b_udp
?
qtr
(
"Port:"
)
:
qtr
(
"Audio Port:"
)
);
ui
.
RTPPort2
->
setVisible
(
!
b_udp
);
ui
.
RTPPortLabel2
->
setVisible
(
!
b_udp
);
}
void
SoutDialog
::
RTPtoggled
(
bool
b_en
)
{
if
(
!
b_en
)
{
if
(
ui
.
RTPPort
->
value
()
==
ui
.
UDPPort
->
value
()
)
{
ui
.
UDPPort
->
setValue
(
ui
.
UDPPort
->
value
()
+
1
);
}
while
(
ui
.
RTPPort2
->
value
()
==
ui
.
UDPPort
->
value
()
||
ui
.
RTPPort2
->
value
()
==
ui
.
RTPPort
->
value
()
)
{
ui
.
RTPPort2
->
setValue
(
ui
.
RTPPort2
->
value
()
+
1
);
}
}
ui
.
sap
->
setEnabled
(
b_en
);
ui
.
RTPLabel
->
setEnabled
(
b_en
);
ui
.
RTPEdit
->
setEnabled
(
b_en
);
ui
.
UDPOutput
->
setEnabled
(
b_en
);
ui
.
UDPPort
->
setEnabled
(
b_en
);
ui
.
UDPPortLabel
->
setEnabled
(
b_en
);
ui
.
RTPPort2
->
setEnabled
(
b_en
);
ui
.
RTPPortLabel2
->
setEnabled
(
b_en
);
}
void
SoutDialog
::
ok
()
...
...
@@ -349,7 +382,8 @@ void SoutDialog::updateMRL()
sout
.
i_http
=
ui
.
HTTPPort
->
value
();
sout
.
i_mms
=
ui
.
MMSHPort
->
value
();
sout
.
i_rtp
=
ui
.
RTPPort
->
value
();
sout
.
i_udp
=
ui
.
UDPPort
->
value
();
sout
.
i_rtp_audio
=
sout
.
i_udp
=
ui
.
UDPPort
->
value
();
sout
.
i_rtp_video
=
ui
.
RTPPort2
->
value
();
sout
.
i_icecast
=
ui
.
IcecastPort
->
value
();
sout
.
i_ab
=
ui
.
aBitrateSpin
->
value
();
sout
.
i_vb
=
ui
.
vBitrateSpin
->
value
();
...
...
@@ -421,12 +455,13 @@ void SoutDialog::updateMRL()
mrl
.
append
(
"}"
);
}
/* Protocol output */
if
(
sout
.
b_local
||
sout
.
b_file
||
sout
.
b_http
||
sout
.
b_mms
||
sout
.
b_rtp
||
sout
.
b_udp
)
sout
.
b_mms
||
sout
.
b_rtp
||
sout
.
b_udp
||
sout
.
b_icecast
)
{
#define ISMORE() if ( more ) mrl.append( "," )
;
#define ATLEASTONE() if ( counter ) mrl.append( "dst=" )
;
#define ISMORE() if ( more ) mrl.append( "," )
#define ATLEASTONE() if ( counter ) mrl.append( "dst=" )
#define CHECKMUX() \
if( sout.psz_mux ) \
...
...
@@ -436,32 +471,26 @@ void SoutDialog::updateMRL()
}
if
(
trans
)
{
mrl
.
append
(
":"
);
}
else
{
mrl
=
":sout=#"
;
}
if
(
counter
)
{
mrl
.
append
(
"duplicate{"
);
}
if
(
sout
.
b_local
)
{
ISMORE
();
ATLEASTONE
()
mrl
.
append
(
"display"
);
ATLEASTONE
()
;
mrl
.
append
(
"display"
);
more
=
true
;
}
if
(
sout
.
b_file
)
{
ISMORE
();
ATLEASTONE
()
mrl
.
append
(
"std{access=file"
);
ATLEASTONE
()
;
mrl
.
append
(
"std{access=file"
);
CHECKMUX
();
mrl
.
append
(
",dst="
);
mrl
.
append
(
sout
.
psz_file
);
...
...
@@ -472,8 +501,8 @@ void SoutDialog::updateMRL()
if
(
sout
.
b_http
)
{
ISMORE
();
ATLEASTONE
()
mrl
.
append
(
"std{access=http"
);
ATLEASTONE
()
;
mrl
.
append
(
"std{access=http"
);
CHECKMUX
();
mrl
.
append
(
",dst="
);
mrl
.
append
(
sout
.
psz_http
);
...
...
@@ -486,8 +515,8 @@ void SoutDialog::updateMRL()
if
(
sout
.
b_mms
)
{
ISMORE
();
ATLEASTONE
()
mrl
.
append
(
"std{access=mmsh"
);
ATLEASTONE
()
;
mrl
.
append
(
"std{access=mmsh"
);
CHECKMUX
();
mrl
.
append
(
",dst="
);
mrl
.
append
(
sout
.
psz_mms
);
...
...
@@ -500,27 +529,34 @@ void SoutDialog::updateMRL()
if
(
sout
.
b_rtp
)
{
ISMORE
();
ATLEASTONE
()
ATLEASTONE
();
if
(
sout
.
b_udp
)
{
mrl
.
append
(
"std{access=udp"
);
CHECKMUX
();
mrl
.
append
(
",dst="
);
mrl
.
append
(
sout
.
psz_udp
);
mrl
.
append
(
":"
);
mrl
.
append
(
QString
::
number
(
sout
.
i_udp
,
10
)
);
}
else
{
mrl
.
append
(
"rtp{"
);
CHECKMUX
();
mrl
.
append
(
",dst="
);
mrl
.
append
(
sout
.
psz_rtp
);
mrl
.
append
(
":"
);
mrl
.
append
(
QString
::
number
(
sout
.
i_rtp
,
10
)
);
mrl
.
append
(
"}"
);
more
=
true
;
}
mrl
.
append
(
"dst="
);
mrl
.
append
(
sout
.
psz_rtp
);
CHECKMUX
();
mrl
.
append
(
",port="
);
mrl
.
append
(
QString
::
number
(
sout
.
i_rtp
,
10
)
);
if
(
!
sout
.
psz_mux
||
strncmp
(
sout
.
psz_mux
,
"ts"
,
2
)
)
{
mrl
.
append
(
",port-audio="
);
mrl
.
append
(
QString
::
number
(
sout
.
i_rtp_audio
,
10
)
);
mrl
.
append
(
",port-video="
);
mrl
.
append
(
QString
::
number
(
sout
.
i_rtp_video
,
10
)
);
}
}
if
(
sout
.
b_udp
)
{
ISMORE
();
ATLEASTONE
()
mrl
.
append
(
"std{access=udp"
);
CHECKMUX
();
mrl
.
append
(
",dst="
);
mrl
.
append
(
sout
.
psz_udp
);
mrl
.
append
(
":"
);
mrl
.
append
(
QString
::
number
(
sout
.
i_udp
,
10
)
);
/* SAP */
if
(
sout
.
b_sap
)
{
mrl
.
append
(
",sap,"
);
...
...
@@ -531,13 +567,26 @@ void SoutDialog::updateMRL()
mrl
.
append
(
sout
.
psz_name
);
mrl
.
append
(
"
\"
"
);
}
mrl
.
append
(
"}"
);
more
=
true
;
}
if
(
sout
.
b_icecast
)
{
// TODO
ISMORE
();
ATLEASTONE
();
mrl
.
append
(
"std{access=shout,mux=ogg"
);
mrl
.
append
(
",dst="
);
mrl
.
append
(
sout
.
sa_icecast
.
psz_username
);
mrl
.
append
(
"@"
);
mrl
.
append
(
sout
.
psz_icecast
);
mrl
.
append
(
":"
);
mrl
.
append
(
QString
::
number
(
sout
.
i_icecast
,
10
)
);
mrl
.
append
(
"/"
);
mrl
.
append
(
sout
.
psz_icecast_mountpoint
);
mrl
.
append
(
"}"
);
more
=
true
;
}
if
(
counter
)
...
...
modules/gui/qt4/dialogs/sout.hpp
View file @
2c5d2a34
...
...
@@ -87,6 +87,7 @@ private slots:
void
setSTranscodeOptions
(
bool
);
void
setRawOptions
(
bool
);
void
changeUDPandRTPmess
(
bool
);
void
RTPtoggled
(
bool
);
};
#endif
modules/gui/qt4/ui/sout.ui
View file @
2c5d2a34
...
...
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>726</width>
<height>
782
</height>
<height>
823
</height>
</rect>
</property>
<property name="sizePolicy" >
...
...
@@ -348,14 +348,14 @@
</property>
</widget>
</item>
<item row="
6
" column="0" >
<item row="
7
" column="0" >
<widget class="QCheckBox" name="IcecastOutput" >
<property name="text" >
<string>IceCast</string>
</property>
</widget>
</item>
<item row="
6
" column="1" >
<item row="
7
" column="1" >
<widget class="QLabel" name="IcecastLabel" >
<property name="enabled" >
<bool>false</bool>
...
...
@@ -365,10 +365,10 @@
</property>
</widget>
</item>
<item row="
6
" column="2" >
<item row="
7
" column="2" >
<widget class="QLineEdit" name="IcecastEdit" />
</item>
<item row="
6
" column="3" >
<item row="
7
" column="3" >
<widget class="QLabel" name="IcecastPortLabel" >
<property name="enabled" >
<bool>false</bool>
...
...
@@ -381,7 +381,7 @@
</property>
</widget>
</item>
<item row="
6
" column="4" >
<item row="
7
" column="4" >
<widget class="QSpinBox" name="IcecastPort" >
<property name="enabled" >
<bool>false</bool>
...
...
@@ -403,7 +403,7 @@
</property>
</widget>
</item>
<item row="
7
" column="1" >
<item row="
8
" column="1" >
<widget class="QLabel" name="IcecastMountpointLabel" >
<property name="enabled" >
<bool>false</bool>
...
...
@@ -413,10 +413,10 @@
</property>
</widget>
</item>
<item row="
7
" column="2" >
<item row="
8
" column="2" >
<widget class="QLineEdit" name="IcecastMountpointEdit" />
</item>
<item row="
7
" column="3" >
<item row="
8
" column="3" >
<widget class="QLabel" name="IcecastNameLabel" >
<property name="enabled" >
<bool>false</bool>
...
...
@@ -426,13 +426,67 @@
</property>
</widget>
</item>
<item row="
7
" column="4" >
<item row="
8
" column="4" >
<widget class="QLineEdit" name="IcecastNamePassEdit" >
<property name="enabled" >
<bool>false</bool>
</property>
</widget>
</item>
<item row="6" column="4" >
<widget class="QSpinBox" name="RTPPort2" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="maximumSize" >
<size>
<width>90</width>
<height>16777215</height>
</size>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="accelerated" >
<bool>true</bool>
</property>
<property name="maximum" >
<number>65355</number>
</property>
<property name="value" >
<number>1234</number>
</property>
</widget>
</item>
<item row="6" column="3" >
<widget class="QLabel" name="RTPPortLabel2" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="text" >
<string>_("Video Port")</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="6" column="2" >
<spacer name="verticalSpacer" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>29</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
...
...
@@ -458,7 +512,7 @@
<item row="3" column="0" colspan="2" >
<widget class="QTabWidget" name="tabWidget" >
<property name="currentIndex" >
<number>
1
</number>
<number>
0
</number>
</property>
<widget class="QWidget" name="muxer" >
<property name="geometry" >
...
...
@@ -466,7 +520,7 @@
<x>0</x>
<y>0</y>
<width>704</width>
<height>1
48
</height>
<height>1
54
</height>
</rect>
</property>
<attribute name="title" >
...
...
@@ -561,7 +615,7 @@
<x>0</x>
<y>0</y>
<width>704</width>
<height>1
48
</height>
<height>1
54
</height>
</rect>
</property>
<attribute name="title" >
...
...
@@ -658,7 +712,7 @@
<x>0</x>
<y>0</y>
<width>704</width>
<height>1
48
</height>
<height>1
54
</height>
</rect>
</property>
<attribute name="title" >
...
...
@@ -758,7 +812,7 @@
<x>0</x>
<y>0</y>
<width>704</width>
<height>1
48
</height>
<height>1
54
</height>
</rect>
</property>
<attribute name="title" >
...
...
@@ -920,54 +974,6 @@
</widget>
<resources/>
<connections>
<connection>
<sender>RTPOutput</sender>
<signal>clicked(bool)</signal>
<receiver>sap</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel" >
<x>68</x>
<y>175</y>
</hint>
<hint type="destinationlabel" >
<x>80</x>
<y>467</y>
</hint>
</hints>
</connection>
<connection>
<sender>RTPOutput</sender>
<signal>clicked(bool)</signal>
<receiver>RTPLabel</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel" >
<x>58</x>
<y>174</y>
</hint>
<hint type="destinationlabel" >
<x>147</x>
<y>184</y>
</hint>
</hints>
</connection>
<connection>
<sender>RTPOutput</sender>
<signal>clicked(bool)</signal>
<receiver>RTPEdit</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel" >
<x>63</x>
<y>186</y>
</hint>
<hint type="destinationlabel" >
<x>244</x>
<y>186</y>
</hint>
</hints>
</connection>
<connection>
<sender>MMSHOutput</sender>
<signal>clicked(bool)</signal>
...
...
@@ -1448,5 +1454,37 @@
</hint>
</hints>
</connection>
<connection>
<sender>RTPOutput</sender>
<signal>clicked(bool)</signal>
<receiver>RTPPort2</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel" >
<x>110</x>
<y>190</y>
</hint>
<hint type="destinationlabel" >
<x>597</x>
<y>260</y>
</hint>
</hints>
</connection>
<connection>
<sender>RTPOutput</sender>
<signal>clicked(bool)</signal>
<receiver>RTPPortLabel2</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel" >
<x>110</x>
<y>190</y>
</hint>
<hint type="destinationlabel" >
<x>497</x>
<y>260</y>
</hint>
</hints>
</connection>
</connections>
</ui>
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