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
c7c447ce
Commit
c7c447ce
authored
Sep 06, 2007
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4 - Optimization of mrl generator. Only needed things are generated.
patch by Jean-François Massol
parent
f77ac5c8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
12 deletions
+51
-12
modules/gui/qt4/dialogs/sout.cpp
modules/gui/qt4/dialogs/sout.cpp
+49
-11
modules/gui/qt4/dialogs/sout.hpp
modules/gui/qt4/dialogs/sout.hpp
+1
-0
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/dialogs_provider.cpp
+1
-1
No files found.
modules/gui/qt4/dialogs/sout.cpp
View file @
c7c447ce
...
@@ -89,7 +89,7 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf,
...
@@ -89,7 +89,7 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf,
"when you change the above settings,
\n
but you can update it manually."
)
)
;
"when you change the above settings,
\n
but you can update it manually."
)
)
;
// /* Connect everything to the updateMRL function */
// /* Connect everything to the updateMRL function */
#define CB( x ) CONNECT( ui.x,
click
ed( bool ), this, updateMRL() );
#define CB( x ) CONNECT( ui.x,
toggl
ed( bool ), this, updateMRL() );
#define CT( x ) CONNECT( ui.x, textChanged( const QString ), this, updateMRL() );
#define CT( x ) CONNECT( ui.x, textChanged( const QString ), this, updateMRL() );
#define CS( x ) CONNECT( ui.x, valueChanged( int ), this, updateMRL() );
#define CS( x ) CONNECT( ui.x, valueChanged( int ), this, updateMRL() );
#define CC( x ) CONNECT( ui.x, currentIndexChanged( int ), this, updateMRL() );
#define CC( x ) CONNECT( ui.x, currentIndexChanged( int ), this, updateMRL() );
...
@@ -129,6 +129,11 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf,
...
@@ -129,6 +129,11 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf,
if
(
b_transcode_only
)
toggleSout
();
if
(
b_transcode_only
)
toggleSout
();
}
}
QString
SoutDialog
::
getMrl
()
{
return
this
->
mrl
;
}
void
SoutDialog
::
fileBrowse
()
void
SoutDialog
::
fileBrowse
()
{
{
ui
.
tabWidget
->
setTabEnabled
(
0
,
false
);
ui
.
tabWidget
->
setTabEnabled
(
0
,
false
);
...
@@ -256,6 +261,7 @@ void SoutDialog::updateMRL()
...
@@ -256,6 +261,7 @@ void SoutDialog::updateMRL()
{
{
sout_gui_descr_t
sout
;
sout_gui_descr_t
sout
;
memset
(
&
sout
,
0
,
sizeof
(
sout_gui_descr_t
)
);
memset
(
&
sout
,
0
,
sizeof
(
sout_gui_descr_t
)
);
int
counter
=
0
;
sout
.
b_local
=
ui
.
localOutput
->
isChecked
();
sout
.
b_local
=
ui
.
localOutput
->
isChecked
();
sout
.
b_file
=
ui
.
fileOutput
->
isChecked
();
sout
.
b_file
=
ui
.
fileOutput
->
isChecked
();
...
@@ -281,6 +287,22 @@ void SoutDialog::updateMRL()
...
@@ -281,6 +287,22 @@ void SoutDialog::updateMRL()
sout
.
psz_group
=
strdup
(
qtu
(
ui
.
sapGroup
->
text
()
)
);
sout
.
psz_group
=
strdup
(
qtu
(
ui
.
sapGroup
->
text
()
)
);
sout
.
psz_name
=
strdup
(
qtu
(
ui
.
sapName
->
text
()
)
);
sout
.
psz_name
=
strdup
(
qtu
(
ui
.
sapName
->
text
()
)
);
#define COUNT() \
{ \
if ( sout.b_local ) \
counter += 1; \
if ( sout.b_file ) \
counter += 1; \
if ( sout.b_http ) \
counter += 1; \
if ( sout.b_mms ) \
counter += 1; \
if ( sout.b_udp ) \
counter += 1; \
}
COUNT
()
#define SMUX( x, txt ) if( ui.x->isChecked() ) sout.psz_mux = strdup( txt );
#define SMUX( x, txt ) if( ui.x->isChecked() ) sout.psz_mux = strdup( txt );
SMUX
(
PSMux
,
"ps"
);
SMUX
(
PSMux
,
"ps"
);
SMUX
(
TSMux
,
"ts"
);
SMUX
(
TSMux
,
"ts"
);
...
@@ -340,26 +362,39 @@ void SoutDialog::updateMRL()
...
@@ -340,26 +362,39 @@ void SoutDialog::updateMRL()
#define ISMORE() if ( more ) mrl.append( "," );
#define ISMORE() if ( more ) mrl.append( "," );
#define ATLEASTONE() \
if ( counter > 1 ) \
{ \
mrl.append( "dst=" ); \
}
if
(
trans
)
if
(
trans
)
{
{
mrl
.
append
(
":duplicate{
"
);
mrl
.
append
(
":
"
);
}
}
else
else
{
{
mrl
=
":sout=#"
;
mrl
=
":sout=#"
;
}
}
if
(
counter
>
1
)
{
mrl
.
append
(
"duplicate{"
);
}
if
(
sout
.
b_local
)
if
(
sout
.
b_local
)
{
{
ISMORE
();
ISMORE
();
mrl
.
append
(
"dst=display"
);
ATLEASTONE
()
mrl
.
append
(
"display"
);
more
=
true
;
more
=
true
;
}
}
if
(
sout
.
b_file
)
if
(
sout
.
b_file
)
{
{
ISMORE
();
ISMORE
();
mrl
.
append
(
"dst=std{access=file,mux="
);
ATLEASTONE
()
mrl
.
append
(
"std{access=file,mux="
);
mrl
.
append
(
sout
.
psz_mux
);
mrl
.
append
(
sout
.
psz_mux
);
mrl
.
append
(
",dst="
);
mrl
.
append
(
",dst="
);
mrl
.
append
(
sout
.
psz_file
);
mrl
.
append
(
sout
.
psz_file
);
...
@@ -370,7 +405,8 @@ void SoutDialog::updateMRL()
...
@@ -370,7 +405,8 @@ void SoutDialog::updateMRL()
if
(
sout
.
b_http
)
if
(
sout
.
b_http
)
{
{
ISMORE
();
ISMORE
();
mrl
.
append
(
"dst=std{access=http,mux="
);
ATLEASTONE
()
mrl
.
append
(
"std{access=http,mux="
);
mrl
.
append
(
sout
.
psz_mux
);
mrl
.
append
(
sout
.
psz_mux
);
mrl
.
append
(
",dst="
);
mrl
.
append
(
",dst="
);
mrl
.
append
(
sout
.
psz_http
);
mrl
.
append
(
sout
.
psz_http
);
...
@@ -383,7 +419,8 @@ void SoutDialog::updateMRL()
...
@@ -383,7 +419,8 @@ void SoutDialog::updateMRL()
if
(
sout
.
b_mms
)
if
(
sout
.
b_mms
)
{
{
ISMORE
();
ISMORE
();
mrl
.
append
(
"dst=std{access=mmsh,mux="
);
ATLEASTONE
()
mrl
.
append
(
"std{access=mmsh,mux="
);
mrl
.
append
(
sout
.
psz_mux
);
mrl
.
append
(
sout
.
psz_mux
);
mrl
.
append
(
",dst="
);
mrl
.
append
(
",dst="
);
mrl
.
append
(
sout
.
psz_mms
);
mrl
.
append
(
sout
.
psz_mms
);
...
@@ -396,7 +433,8 @@ void SoutDialog::updateMRL()
...
@@ -396,7 +433,8 @@ void SoutDialog::updateMRL()
if
(
sout
.
b_udp
)
if
(
sout
.
b_udp
)
{
{
ISMORE
();
ISMORE
();
mrl
.
append
(
"dst=std{access=udp,mux="
);
ATLEASTONE
()
mrl
.
append
(
"std{access=udp,mux="
);
mrl
.
append
(
sout
.
psz_mux
);
mrl
.
append
(
sout
.
psz_mux
);
mrl
.
append
(
",dst="
);
mrl
.
append
(
",dst="
);
mrl
.
append
(
sout
.
psz_udp
);
mrl
.
append
(
sout
.
psz_udp
);
...
@@ -416,7 +454,7 @@ void SoutDialog::updateMRL()
...
@@ -416,7 +454,7 @@ void SoutDialog::updateMRL()
more
=
true
;
more
=
true
;
}
}
if
(
trans
)
if
(
counter
>
1
)
{
{
mrl
.
append
(
"}"
);
mrl
.
append
(
"}"
);
}
}
...
...
modules/gui/qt4/dialogs/sout.hpp
View file @
c7c447ce
...
@@ -43,6 +43,7 @@ public:
...
@@ -43,6 +43,7 @@ public:
bool
_transcode_only
=
false
);
bool
_transcode_only
=
false
);
virtual
~
SoutDialog
()
{}
virtual
~
SoutDialog
()
{}
QString
getMrl
();
QString
mrl
;
QString
mrl
;
//sout_gui_descr_t *sout;
//sout_gui_descr_t *sout;
private:
private:
...
...
modules/gui/qt4/dialogs_provider.cpp
View file @
c7c447ce
...
@@ -400,7 +400,7 @@ void DialogsProvider::streamingDialog( QString mrl, bool b_transcode_only )
...
@@ -400,7 +400,7 @@ void DialogsProvider::streamingDialog( QString mrl, bool b_transcode_only )
/* Just do it */
/* Just do it */
int
i_len
=
strlen
(
qtu
(
s
->
mrl
)
)
+
10
;
int
i_len
=
strlen
(
qtu
(
s
->
mrl
)
)
+
10
;
char
*
psz_option
=
(
char
*
)
malloc
(
i_len
);
char
*
psz_option
=
(
char
*
)
malloc
(
i_len
);
snprintf
(
psz_option
,
i_len
-
1
,
"
:sout=
%s"
,
qtu
(
s
->
mrl
));
snprintf
(
psz_option
,
i_len
-
1
,
"%s"
,
qtu
(
s
->
mrl
));
playlist_AddExt
(
THEPL
,
qtu
(
mrl
),
"Streaming"
,
playlist_AddExt
(
THEPL
,
qtu
(
mrl
),
"Streaming"
,
PLAYLIST_APPEND
|
PLAYLIST_GO
,
PLAYLIST_END
,
PLAYLIST_APPEND
|
PLAYLIST_GO
,
PLAYLIST_END
,
...
...
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