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
9b247e7c
Commit
9b247e7c
authored
Feb 08, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4: encode disc MRL correctly (fix #5638)
parent
adf3d6f4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
25 deletions
+23
-25
modules/gui/qt4/components/open_panels.cpp
modules/gui/qt4/components/open_panels.cpp
+23
-25
No files found.
modules/gui/qt4/components/open_panels.cpp
View file @
9b247e7c
...
...
@@ -489,16 +489,9 @@ void DiscOpenPanel::updateButtons()
#undef setDrive
#if !defined( WIN32 ) && !defined( __OS2__ )
# define LOCALHOST ""
#else
# define LOCALHOST "/"
#endif
/* Update the current MRL */
void
DiscOpenPanel
::
updateMRL
()
{
QString
mrl
;
QString
discPath
;
QStringList
fileList
;
...
...
@@ -508,56 +501,61 @@ void DiscOpenPanel::updateMRL()
discPath
=
ui
.
deviceCombo
->
currentText
();
/* MRL scheme */
const
char
*
scheme
;
/* DVD */
if
(
ui
.
dvdRadioButton
->
isChecked
()
)
{
if
(
!
ui
.
dvdsimple
->
isChecked
()
)
mrl
=
"dvd://"
LOCALHOST
;
scheme
=
"dvd"
;
else
mrl
=
"dvdsimple://"
LOCALHOST
;
scheme
=
"dvdsimple"
;
}
else
if
(
ui
.
bdRadioButton
->
isChecked
()
)
mrl
=
"bluray://"
LOCALHOST
;
scheme
=
"bluray"
;
/* VCD */
else
if
(
ui
.
vcdRadioButton
->
isChecked
()
)
mrl
=
"vcd://"
LOCALHOST
;
scheme
=
"vcd"
;
/* CDDA */
else
mrl
=
"cdda://"
LOCALHOST
;
scheme
=
"cdda"
;
mrl
+=
discPath
;
char
*
mrl
=
make_URI
(
qtu
(
discPath
),
scheme
);
if
(
unlikely
(
mrl
==
NULL
)
)
return
;
/* Title/chapter encoded in MRL */
QString
anchor
=
""
;
if
(
ui
.
titleSpin
->
value
()
>
0
)
{
if
(
ui
.
dvdRadioButton
->
isChecked
()
||
ui
.
bdRadioButton
->
isChecked
()
)
{
mrl
+
=
QString
(
"#%1"
).
arg
(
ui
.
titleSpin
->
value
()
);
anchor
=
QString
(
"#%1"
).
arg
(
ui
.
titleSpin
->
value
()
);
if
(
ui
.
chapterSpin
->
value
()
>
0
)
mrl
+=
QString
(
":%1"
).
arg
(
ui
.
chapterSpin
->
value
()
);
anchor
+=
QString
(
":%1"
).
arg
(
ui
.
chapterSpin
->
value
()
);
}
else
if
(
ui
.
vcdRadioButton
->
isChecked
()
)
mrl
+
=
QString
(
"#%1"
).
arg
(
ui
.
titleSpin
->
value
()
);
anchor
=
QString
(
"#%1"
).
arg
(
ui
.
titleSpin
->
value
()
);
}
emit
methodChanged
(
"disc-caching"
);
fileList
<<
mrl
;
mrl
=
""
;
fileList
<<
(
qfu
(
mrl
)
+
anchor
);
free
(
mrl
);
QString
opts
=
""
;
/* Input item options */
if
(
ui
.
dvdRadioButton
->
isChecked
()
||
ui
.
vcdRadioButton
->
isChecked
()
)
{
if
(
ui
.
audioSpin
->
value
()
>=
0
)
{
mrl
+=
" :audio-track="
+
if
(
ui
.
audioSpin
->
value
()
>=
0
)
opts
+=
" :audio-track="
+
QString
(
"%1"
).
arg
(
ui
.
audioSpin
->
value
()
);
}
if
(
ui
.
subtitlesSpin
->
value
()
>=
0
)
{
mrl
+=
" :sub-track="
+
if
(
ui
.
subtitlesSpin
->
value
()
>=
0
)
opts
+=
" :sub-track="
+
QString
(
"%1"
).
arg
(
ui
.
subtitlesSpin
->
value
()
);
}
}
if
(
ui
.
audioCDRadioButton
->
isChecked
()
)
{
if
(
ui
.
titleSpin
->
value
()
>
0
)
mrl
+=
QString
(
" :cdda-track=%1"
).
arg
(
ui
.
titleSpin
->
value
()
);
opts
+=
QString
(
" :cdda-track=%1"
).
arg
(
ui
.
titleSpin
->
value
()
);
}
emit
mrlUpdated
(
fileList
,
mrl
);
emit
mrlUpdated
(
fileList
,
opts
);
}
void
DiscOpenPanel
::
browseDevice
()
...
...
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