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
c54715a1
Commit
c54715a1
authored
Mar 15, 2009
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: split correctly the input options for Convertion and Sout Dialogs.
parent
b42755d7
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
22 deletions
+50
-22
modules/gui/qt4/components/playlist/playlist_model.cpp
modules/gui/qt4/components/playlist/playlist_model.cpp
+1
-1
modules/gui/qt4/dialogs/open.cpp
modules/gui/qt4/dialogs/open.cpp
+5
-3
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/dialogs_provider.cpp
+39
-14
modules/gui/qt4/dialogs_provider.hpp
modules/gui/qt4/dialogs_provider.hpp
+5
-4
No files found.
modules/gui/qt4/components/playlist/playlist_model.cpp
View file @
c54715a1
...
...
@@ -903,7 +903,7 @@ void PLModel::popupSave()
{
QStringList
mrls
=
selectedURIs
();
if
(
!
mrls
.
isEmpty
()
)
THEDP
->
streamingDialog
(
NULL
,
mrls
[
0
]
,
true
);
THEDP
->
streamingDialog
(
NULL
,
mrls
[
0
]
);
}
#include <QUrl>
...
...
modules/gui/qt4/dialogs/open.cpp
View file @
c54715a1
...
...
@@ -360,7 +360,8 @@ void OpenDialog::finish( bool b_enqueue = false )
QString
qs
=
optionsList
[
j
].
trimmed
();
if
(
!
qs
.
isEmpty
()
)
{
input_item_AddOption
(
p_input
,
qtu
(
qs
),
VLC_INPUT_OPTION_TRUSTED
);
input_item_AddOption
(
p_input
,
qtu
(
qs
),
VLC_INPUT_OPTION_TRUSTED
);
#ifdef DEBUG_QT
msg_Warn
(
p_intf
,
"Input option: %s"
,
qtu
(
qs
)
);
#endif
...
...
@@ -387,13 +388,14 @@ void OpenDialog::transcode()
void
OpenDialog
::
stream
(
bool
b_transcode_only
)
{
QString
soutMRL
=
getMRL
();
QString
soutMRL
=
getMRL
(
false
);
if
(
soutMRL
.
isEmpty
()
)
return
;
toggleVisible
();
/* Dbg and send :D */
msg_Dbg
(
p_intf
,
"MRL passed to the Sout: %s"
,
qtu
(
soutMRL
)
);
THEDP
->
streamingDialog
(
this
,
soutMRL
,
b_transcode_only
);
THEDP
->
streamingDialog
(
this
,
soutMRL
,
b_transcode_only
,
ui
.
advancedLineInput
->
text
().
split
(
":"
)
);
}
/* Update the MRL */
...
...
modules/gui/qt4/dialogs_provider.cpp
View file @
c54715a1
...
...
@@ -566,43 +566,68 @@ void DialogsProvider::saveAPlaylist()
* Sout emulation
****************************************************************************/
void
DialogsProvider
::
streamingDialog
(
QWidget
*
parent
,
QString
mrl
,
bool
b_transcode_only
)
void
DialogsProvider
::
streamingDialog
(
QWidget
*
parent
,
QString
mrl
,
bool
b_transcode_only
,
QStringList
options
)
{
char
*
psz_option
;
char
*
psz_soutoption
;
/* Stream */
if
(
!
b_transcode_only
)
{
SoutDialog
*
s
=
SoutDialog
::
getInstance
(
parent
,
p_intf
,
mrl
);
if
(
s
->
exec
()
==
QDialog
::
Accepted
)
{
psz_option
=
strdup
(
qtu
(
s
->
getMrl
()
)
);
psz_
sout
option
=
strdup
(
qtu
(
s
->
getMrl
()
)
);
delete
s
;
}
else
{
delete
s
;
return
;
delete
s
;
return
;
}
}
else
{
/* Convert */
ConvertDialog
*
s
=
new
ConvertDialog
(
parent
,
p_intf
,
mrl
);
if
(
s
->
exec
()
==
QDialog
::
Accepted
)
{
psz_option
=
strdup
(
qtu
(
s
->
getMrl
()
)
);
psz_
sout
option
=
strdup
(
qtu
(
s
->
getMrl
()
)
);
delete
s
;
}
else
{
delete
s
;
return
;
delete
s
;
return
;
}
}
if
(
!
EMPTY_STR
(
psz_option
)
)
/* Get SoutMRL */
if
(
!
EMPTY_STR
(
psz_soutoption
)
)
{
/* Create Input */
input_item_t
*
p_input
;
p_input
=
input_item_New
(
p_intf
,
qtu
(
mrl
),
_
(
"Streaming"
)
);
/* Add normal Options */
for
(
int
j
=
0
;
j
<
options
.
size
();
j
++
)
{
QString
qs
=
options
[
j
].
trimmed
();
if
(
!
qs
.
isEmpty
()
)
{
msg_Dbg
(
p_intf
,
"Streaming MRL is: %s"
,
psz_option
);
playlist_AddExt
(
THEPL
,
qtu
(
mrl
),
_
(
"Streaming"
),
PLAYLIST_APPEND
|
PLAYLIST_GO
,
PLAYLIST_END
,
-
1
,
1
,
&
psz_option
,
VLC_INPUT_OPTION_TRUSTED
,
true
,
pl_Unlocked
);
input_item_AddOption
(
p_input
,
qtu
(
qs
),
VLC_INPUT_OPTION_TRUSTED
);
}
}
/* Add SoutMRL */
msg_Dbg
(
p_intf
,
"Streaming MRL is: %s"
,
psz_soutoption
);
input_item_AddOption
(
p_input
,
psz_soutoption
,
VLC_INPUT_OPTION_TRUSTED
);
/* Switch between enqueuing and starting the item */
/* FIXME: playlist_AddInput() can fail */
playlist_AddInput
(
THEPL
,
p_input
,
PLAYLIST_APPEND
|
PLAYLIST_GO
,
PLAYLIST_END
,
true
,
pl_Unlocked
);
vlc_gc_decref
(
p_input
);
RecentsMRL
::
getInstance
(
p_intf
)
->
addRecent
(
mrl
);
}
}
...
...
modules/gui/qt4/dialogs_provider.hpp
View file @
c54715a1
...
...
@@ -22,8 +22,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef _DIALOGS_PROVIDER_H_
#define _DIALOGS_PROVIDER_H_
#ifndef
QVLC
_DIALOGS_PROVIDER_H_
#define
QVLC
_DIALOGS_PROVIDER_H_
#ifdef HAVE_CONFIG_H
# include "config.h"
...
...
@@ -82,6 +82,7 @@ enum {
class
QEvent
;
class
QSignalMapper
;
class
QVLCMenu
;
#include <QStringList>
class
DialogsProvider
:
public
QObject
{
...
...
@@ -176,8 +177,8 @@ public slots:
void
PLAppendDir
();
void
MLAppendDir
();
void
streamingDialog
(
QWidget
*
parent
,
QString
mrl
=
""
,
bool
b_stream
=
true
);
void
streamingDialog
(
QWidget
*
parent
,
QString
mrl
,
bool
b_stream
=
true
,
QStringList
options
=
QStringList
(
""
)
);
void
openAndStreamingDialogs
();
void
openAndTranscodingDialogs
();
...
...
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