Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
0b3b1edf
Commit
0b3b1edf
authored
Jun 10, 2018
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
variables: use table of vlc_value_t for VLC_VAR_GETCHOICES
This simplifies the notation. No function differences.
parent
7a51579a
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
144 additions
and
155 deletions
+144
-155
lib/audio.c
lib/audio.c
+3
-3
lib/media_player.c
lib/media_player.c
+3
-3
lib/video.c
lib/video.c
+9
-10
modules/control/gestures.c
modules/control/gestures.c
+8
-10
modules/control/hotkeys.c
modules/control/hotkeys.c
+53
-61
modules/control/oldrc.c
modules/control/oldrc.c
+15
-15
modules/gui/macosx/VLCMainMenu.m
modules/gui/macosx/VLCMainMenu.m
+9
-9
modules/gui/ncurses.c
modules/gui/ncurses.c
+4
-4
modules/gui/qt/components/controller_widget.cpp
modules/gui/qt/components/controller_widget.cpp
+4
-4
modules/gui/qt/components/extended_panels.cpp
modules/gui/qt/components/extended_panels.cpp
+7
-7
modules/gui/qt/input_manager.cpp
modules/gui/qt/input_manager.cpp
+4
-4
modules/gui/qt/menus.cpp
modules/gui/qt/menus.cpp
+3
-3
modules/lua/libs/variables.c
modules/lua/libs/variables.c
+8
-6
src/audio_output/output.c
src/audio_output/output.c
+3
-3
src/input/input.c
src/input/input.c
+3
-3
src/misc/variables.c
src/misc/variables.c
+5
-6
test/src/misc/variables.c
test/src/misc/variables.c
+3
-4
No files found.
lib/audio.c
View file @
0b3b1edf
...
...
@@ -381,7 +381,7 @@ int libvlc_audio_get_track( libvlc_media_player_t *p_mi )
int
libvlc_audio_set_track
(
libvlc_media_player_t
*
p_mi
,
int
i_track
)
{
input_thread_t
*
p_input_thread
=
libvlc_get_input_thread
(
p_mi
);
vlc_
list
_t
val_list
;
vlc_
value
_t
*
val_list
;
size_t
count
;
int
i_ret
=
-
1
;
...
...
@@ -392,7 +392,7 @@ int libvlc_audio_set_track( libvlc_media_player_t *p_mi, int i_track )
&
count
,
&
val_list
,
(
char
***
)
NULL
);
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
{
if
(
i_track
==
val_list
.
p_values
[
i
].
i_int
)
if
(
i_track
==
val_list
[
i
].
i_int
)
{
if
(
var_SetInteger
(
p_input_thread
,
"audio-es"
,
i_track
)
<
0
)
break
;
...
...
@@ -402,7 +402,7 @@ int libvlc_audio_set_track( libvlc_media_player_t *p_mi, int i_track )
}
libvlc_printerr
(
"Track identifier not found"
);
end:
free
(
val_list
.
p_values
);
free
(
val_list
);
vlc_object_release
(
p_input_thread
);
return
i_ret
;
}
...
...
lib/media_player.c
View file @
0b3b1edf
...
...
@@ -1787,7 +1787,7 @@ libvlc_track_description_t *
if
(
!
p_input
)
return
NULL
;
vlc_
list
_t
val_list
;
vlc_
value
_t
*
val_list
;
char
**
text_list
;
size_t
count
;
...
...
@@ -1806,13 +1806,13 @@ libvlc_track_description_t *
}
*
pp
=
tr
;
tr
->
i_id
=
val_list
.
p_values
[
i
].
i_int
;
tr
->
i_id
=
val_list
[
i
].
i_int
;
tr
->
psz_name
=
text_list
[
i
];
pp
=
&
tr
->
p_next
;
}
*
pp
=
NULL
;
free
(
val_list
.
p_values
);
free
(
val_list
);
free
(
text_list
);
vlc_object_release
(
p_input
);
...
...
lib/video.c
View file @
0b3b1edf
...
...
@@ -353,7 +353,7 @@ libvlc_track_description_t *
int
libvlc_video_set_spu
(
libvlc_media_player_t
*
p_mi
,
int
i_spu
)
{
input_thread_t
*
p_input_thread
=
libvlc_get_input_thread
(
p_mi
);
vlc_
list
_t
list
;
vlc_
value
_t
*
list
;
size_t
count
;
int
i_ret
=
-
1
;
...
...
@@ -364,7 +364,7 @@ int libvlc_video_set_spu( libvlc_media_player_t *p_mi, int i_spu )
&
count
,
&
list
,
(
char
***
)
NULL
);
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
{
if
(
i_spu
==
list
.
p_values
[
i
].
i_int
)
if
(
i_spu
==
list
[
i
].
i_int
)
{
if
(
var_SetInteger
(
p_input_thread
,
"spu-es"
,
i_spu
)
<
0
)
break
;
...
...
@@ -375,7 +375,7 @@ int libvlc_video_set_spu( libvlc_media_player_t *p_mi, int i_spu )
libvlc_printerr
(
"Track identifier not found"
);
end:
vlc_object_release
(
p_input_thread
);
free
(
list
.
p_values
);
free
(
list
);
return
i_ret
;
}
...
...
@@ -452,17 +452,16 @@ static void teletext_enable( input_thread_t *p_input_thread, bool b_enable )
{
if
(
b_enable
)
{
vlc_
list
_t
list
;
vlc_
value
_t
*
list
;
size_t
count
;
if
(
!
var_Change
(
p_input_thread
,
"teletext-es"
,
VLC_VAR_GETCHOICES
,
&
count
,
&
list
,
(
char
***
)
NULL
)
)
{
if
(
count
>
0
)
var_SetInteger
(
p_input_thread
,
"spu-es"
,
list
.
p_values
[
0
].
i_int
);
var_SetInteger
(
p_input_thread
,
"spu-es"
,
list
[
0
].
i_int
);
free
(
list
.
p_values
);
free
(
list
);
}
}
else
...
...
@@ -571,7 +570,7 @@ int libvlc_video_get_track( libvlc_media_player_t *p_mi )
int
libvlc_video_set_track
(
libvlc_media_player_t
*
p_mi
,
int
i_track
)
{
input_thread_t
*
p_input_thread
=
libvlc_get_input_thread
(
p_mi
);
vlc_
list
_t
val_list
;
vlc_
value
_t
*
val_list
;
size_t
count
;
int
i_ret
=
-
1
;
...
...
@@ -582,7 +581,7 @@ int libvlc_video_set_track( libvlc_media_player_t *p_mi, int i_track )
&
count
,
&
val_list
,
(
char
***
)
NULL
);
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
{
if
(
i_track
==
val_list
.
p_values
[
i
].
i_int
)
if
(
i_track
==
val_list
[
i
].
i_int
)
{
if
(
var_SetInteger
(
p_input_thread
,
"video-es"
,
i_track
)
<
0
)
break
;
...
...
@@ -592,7 +591,7 @@ int libvlc_video_set_track( libvlc_media_player_t *p_mi, int i_track )
}
libvlc_printerr
(
"Track identifier not found"
);
end:
free
(
val_list
.
p_values
);
free
(
val_list
);
vlc_object_release
(
p_input_thread
);
return
i_ret
;
}
...
...
modules/control/gestures.c
View file @
0b3b1edf
...
...
@@ -277,7 +277,7 @@ static void ProcessGesture( intf_thread_t *p_intf )
if
(
p_input
==
NULL
)
break
;
vlc_
list
_t
list
;
vlc_
value
_t
*
list
;
size_t
count
;
var_Change
(
p_input
,
"audio-es"
,
VLC_VAR_GETCHOICES
,
...
...
@@ -289,7 +289,7 @@ static void ProcessGesture( intf_thread_t *p_intf )
size_t
i
;
for
(
i
=
0
;
i
<
count
;
i
++
)
if
(
i_audio_es
==
list
.
p_values
[
i
].
i_int
)
if
(
i_audio_es
==
list
[
i
].
i_int
)
break
;
/* value of audio-es was not in choices list */
if
(
i
==
count
)
...
...
@@ -302,10 +302,9 @@ static void ProcessGesture( intf_thread_t *p_intf )
i
=
1
;
else
i
++
;
var_SetInteger
(
p_input
,
"audio-es"
,
list
.
p_values
[
i
].
i_int
);
var_SetInteger
(
p_input
,
"audio-es"
,
list
[
i
].
i_int
);
}
free
(
list
.
p_values
);
free
(
list
);
vlc_object_release
(
p_input
);
break
;
}
...
...
@@ -316,7 +315,7 @@ static void ProcessGesture( intf_thread_t *p_intf )
if
(
p_input
==
NULL
)
break
;
vlc_
list
_t
list
;
vlc_
value
_t
*
list
;
size_t
count
;
var_Change
(
p_input
,
"spu-es"
,
VLC_VAR_GETCHOICES
,
...
...
@@ -328,7 +327,7 @@ static void ProcessGesture( intf_thread_t *p_intf )
size_t
i
;
for
(
i
=
0
;
i
<
count
;
i
++
)
if
(
i_audio_es
==
list
.
p_values
[
i
].
i_int
)
if
(
i_audio_es
==
list
[
i
].
i_int
)
break
;
/* value of audio-es was not in choices list */
if
(
i
==
count
)
...
...
@@ -341,10 +340,9 @@ static void ProcessGesture( intf_thread_t *p_intf )
i
=
1
;
else
i
++
;
var_SetInteger
(
p_input
,
"audio-es"
,
list
.
p_values
[
i
].
i_int
);
var_SetInteger
(
p_input
,
"audio-es"
,
list
[
i
].
i_int
);
}
free
(
list
.
p_values
);
free
(
list
);
vlc_object_release
(
p_input
);
break
;
}
...
...
modules/control/hotkeys.c
View file @
0b3b1edf
...
...
@@ -107,21 +107,21 @@ vlc_module_begin ()
vlc_module_end
()
static
void
var_FreeList
(
vlc_list
_t
values
,
char
**
texts
)
static
void
var_FreeList
(
size_t
n
,
vlc_value
_t
*
values
,
char
**
texts
)
{
free
(
values
.
p_values
);
free
(
values
);
for
(
in
t
i
=
0
;
i
<
values
.
i_count
;
i
++
)
for
(
size_
t
i
=
0
;
i
<
n
;
i
++
)
free
(
texts
[
i
]
);
free
(
texts
);
}
static
void
var_FreeStringList
(
vlc_list
_t
values
,
char
**
texts
)
static
void
var_FreeStringList
(
size_t
n
,
vlc_value
_t
*
values
,
char
**
texts
)
{
for
(
in
t
i
=
0
;
i
<
values
.
i_count
;
i
++
)
free
(
values
.
p_
values
[
i
].
psz_string
);
for
(
size_
t
i
=
0
;
i
<
n
;
i
++
)
free
(
values
[
i
].
psz_string
);
var_FreeList
(
values
,
texts
);
var_FreeList
(
n
,
values
,
texts
);
}
static
int
MovedEvent
(
vlc_object_t
*
p_this
,
char
const
*
psz_var
,
...
...
@@ -645,7 +645,7 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
if
(
p_input
)
{
vlc_value_t
val
;
vlc_
list
_t
list
;
vlc_
value
_t
*
list
;
size_t
count
;
var_Get
(
p_input
,
"spu-es"
,
&
val
);
...
...
@@ -662,7 +662,7 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
DisplayMessage
(
p_vout
,
_
(
"Sub sync: bookmarked subtitle time"
));
}
free
(
list
.
p_values
);
free
(
list
);
}
break
;
case
ACTIONID_SUBSYNC_APPLY
:
...
...
@@ -716,7 +716,7 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
if
(
p_input
)
{
vlc_value_t
val
;
vlc_
list
_t
list
;
vlc_
value
_t
*
list
;
size_t
count
;
var_Get
(
p_input
,
"spu-es"
,
&
val
);
...
...
@@ -726,7 +726,7 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
if
(
count
<
1
||
val
.
i_int
<
0
)
{
DisplayMessage
(
p_vout
,
_
(
"No active subtitle"
)
);
free
(
list
.
p_values
);
free
(
list
);
break
;
}
int64_t
i_delay
=
var_GetInteger
(
p_input
,
"spu-delay"
)
+
diff
;
...
...
@@ -735,7 +735,7 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
ClearChannels
(
p_vout
,
slider_chan
);
DisplayMessage
(
p_vout
,
_
(
"Subtitle delay %i ms"
),
(
int
)(
i_delay
/
1000
)
);
free
(
list
.
p_values
);
free
(
list
);
}
break
;
}
...
...
@@ -760,7 +760,7 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
if
(
p_input
)
{
vlc_value_t
val
;
vlc_
list
_t
list
;
vlc_
value
_t
*
list
;
char
**
list2
;
size_t
count
;
...
...
@@ -773,12 +773,8 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
size_t
i
;
for
(
i
=
0
;
i
<
count
;
i
++
)
{
if
(
val
.
i_int
==
list
.
p_values
[
i
].
i_int
)
{
if
(
val
.
i_int
==
list
[
i
].
i_int
)
break
;
}
}
/* value of audio-es was not in choices list */
if
(
i
==
count
)
{
...
...
@@ -790,10 +786,10 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
i
=
1
;
else
i
++
;
var_Set
(
p_input
,
"audio-es"
,
list
.
p_values
[
i
]
);
var_Set
(
p_input
,
"audio-es"
,
list
[
i
]
);
DisplayMessage
(
p_vout
,
_
(
"Audio track: %s"
),
list2
[
i
]
);
}
var_FreeList
(
list
,
list2
);
var_FreeList
(
count
,
list
,
list2
);
}
break
;
...
...
@@ -802,7 +798,7 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
if
(
p_input
)
{
vlc_value_t
val
;
vlc_
list
_t
list
;
vlc_
value
_t
*
list
;
char
**
list2
;
size_t
count
,
i
;
var_Get
(
p_input
,
"spu-es"
,
&
val
);
...
...
@@ -814,11 +810,11 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
{
DisplayMessage
(
p_vout
,
_
(
"Subtitle track: %s"
),
_
(
"N/A"
)
);
var_FreeList
(
list
,
list2
);
var_FreeList
(
count
,
list
,
list2
);
break
;
}
for
(
i
=
0
;
i
<
count
;
i
++
)
if
(
val
.
i_int
==
list
.
p_values
[
i
].
i_int
)
if
(
val
.
i_int
==
list
[
i
].
i_int
)
break
;
/* value of spu-es was not in choices list */
if
(
i
==
count
)
...
...
@@ -833,15 +829,15 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
i
=
count
-
1
;
else
i
=
(
i_action
==
ACTIONID_SUBTITLE_TRACK
)
?
i
+
1
:
i
-
1
;
var_SetInteger
(
p_input
,
"spu-es"
,
list
.
p_values
[
i
].
i_int
);
var_SetInteger
(
p_input
,
"spu-es"
,
list
[
i
].
i_int
);
DisplayMessage
(
p_vout
,
_
(
"Subtitle track: %s"
),
list2
[
i
]
);
var_FreeList
(
list
,
list2
);
var_FreeList
(
count
,
list
,
list2
);
}
break
;
case
ACTIONID_SUBTITLE_TOGGLE
:
if
(
p_input
)
{
vlc_
list
_t
list
;
vlc_
value
_t
*
list
;
char
**
list2
;
size_t
count
;
...
...
@@ -852,7 +848,7 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
{
DisplayMessage
(
p_vout
,
_
(
"Subtitle track: %s"
),
_
(
"N/A"
)
);
var_FreeList
(
list
,
list2
);
var_FreeList
(
count
,
list
,
list2
);
break
;
}
...
...
@@ -878,17 +874,17 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
{
for
(
size_t
i
=
0
;
i
<
count
;
++
i
)
{
if
(
i_new_id
==
list
.
p_values
[
i
].
i_int
)
if
(
i_new_id
==
list
[
i
].
i_int
)
{
i_new_index
=
i
;
break
;
}
}
}
var_SetInteger
(
p_input
,
"spu-es"
,
list
.
p_values
[
i_new_index
].
i_int
);
var_SetInteger
(
p_input
,
"spu-es"
,
list
[
i_new_index
].
i_int
);
DisplayMessage
(
p_vout
,
_
(
"Subtitle track: %s"
),
list2
[
i_new_index
]
);
var_FreeList
(
list
,
list2
);
var_FreeList
(
count
,
list
,
list2
);
}
break
;
case
ACTIONID_PROGRAM_SID_NEXT
:
...
...
@@ -896,7 +892,7 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
if
(
p_input
)
{
vlc_value_t
val
;
vlc_
list
_t
list
;
vlc_
value
_t
*
list
;
char
**
list2
;
size_t
count
,
i
;
var_Get
(
p_input
,
"program"
,
&
val
);
...
...
@@ -908,11 +904,11 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
{
DisplayMessage
(
p_vout
,
_
(
"Program Service ID: %s"
),
_
(
"N/A"
)
);
var_FreeList
(
list
,
list2
);
var_FreeList
(
count
,
list
,
list2
);
break
;
}
for
(
i
=
0
;
i
<
count
;
i
++
)
if
(
val
.
i_int
==
list
.
p_values
[
i
].
i_int
)
if
(
val
.
i_int
==
list
[
i
].
i_int
)
break
;
/* value of program sid was not in choices list */
if
(
i
==
count
)
...
...
@@ -933,10 +929,10 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
else
i
--
;
}
var_Set
(
p_input
,
"program"
,
list
.
p_values
[
i
]
);
var_Set
(
p_input
,
"program"
,
list
[
i
]
);
DisplayMessage
(
p_vout
,
_
(
"Program Service ID: %s"
),
list2
[
i
]
);
var_FreeList
(
list
,
list2
);
var_FreeList
(
count
,
list
,
list2
);
}
break
;
...
...
@@ -1060,7 +1056,7 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
if
(
p_vout
)
{
vlc_value_t
val
;
vlc_
list
_t
val_list
;
vlc_
value
_t
*
val_list
;
char
**
text_list
;
size_t
count
;
...
...
@@ -1071,8 +1067,7 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
size_t
i
;
for
(
i
=
0
;
i
<
count
;
i
++
)
{
if
(
!
strcmp
(
val_list
.
p_values
[
i
].
psz_string
,
val
.
psz_string
)
)
if
(
!
strcmp
(
val_list
[
i
].
psz_string
,
val
.
psz_string
)
)
{
i
++
;
break
;
...
...
@@ -1080,11 +1075,11 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
}
if
(
i
==
count
)
i
=
0
;
var_SetString
(
p_vout
,
"aspect-ratio"
,
val_list
.
p_values
[
i
].
psz_string
);
val_list
[
i
].
psz_string
);
DisplayMessage
(
p_vout
,
_
(
"Aspect ratio: %s"
),
text_list
[
i
]
);
var_FreeStringList
(
val_list
,
text_list
);
var_FreeStringList
(
count
,
val_list
,
text_list
);
}
free
(
val
.
psz_string
);
}
...
...
@@ -1094,7 +1089,7 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
if
(
p_vout
)
{
vlc_value_t
val
;
vlc_
list
_t
val_list
;
vlc_
value
_t
*
val_list
;
char
**
text_list
;
size_t
count
;
...
...
@@ -1105,19 +1100,17 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
size_t
i
;
for
(
i
=
0
;
i
<
count
;
i
++
)
{
if
(
!
strcmp
(
val_list
.
p_values
[
i
].
psz_string
,
val
.
psz_string
)
)
if
(
!
strcmp
(
val_list
[
i
].
psz_string
,
val
.
psz_string
)
)
{
i
++
;
break
;
}
}
if
(
i
==
count
)
i
=
0
;
var_SetString
(
p_vout
,
"crop"
,
val_list
.
p_values
[
i
].
psz_string
);
var_SetString
(
p_vout
,
"crop"
,
val_list
[
i
].
psz_string
);
DisplayMessage
(
p_vout
,
_
(
"Crop: %s"
),
text_list
[
i
]
);
var_FreeStringList
(
val_list
,
text_list
);
var_FreeStringList
(
count
,
val_list
,
text_list
);
}
free
(
val
.
psz_string
);
}
...
...
@@ -1245,7 +1238,7 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
if
(
p_vout
)
{
vlc_value_t
val
;
vlc_
list
_t
val_list
;
vlc_
value
_t
*
val_list
;
char
**
text_list
;
size_t
count
;
...
...
@@ -1256,7 +1249,7 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
size_t
i
;
for
(
i
=
0
;
i
<
count
;
i
++
)
{
if
(
val_list
.
p_values
[
i
].
f_float
==
val
.
f_float
)
if
(
val_list
[
i
].
f_float
==
val
.
f_float
)
{
if
(
i_action
==
ACTIONID_ZOOM
)
i
++
;
...
...
@@ -1267,11 +1260,10 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
}
if
(
i
==
count
)
i
=
0
;
if
(
i
==
(
size_t
)
-
1
)
i
=
count
-
1
;
var_SetFloat
(
p_vout
,
"zoom"
,
val_list
.
p_values
[
i
].
f_float
);
var_SetFloat
(
p_vout
,
"zoom"
,
val_list
[
i
].
f_float
);
DisplayMessage
(
p_vout
,
_
(
"Zoom mode: %s"
),
text_list
[
i
]
);
var_FreeStringList
(
val_list
,
text_list
);
var_FreeStringList
(
count
,
val_list
,
text_list
);
}
}
break
;
...
...
@@ -1290,7 +1282,7 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
var_SetInteger
(
p_vout
,
"deinterlace"
,
1
);
char
*
psz_mode
=
var_GetString
(
p_vout
,
"deinterlace-mode"
);
vlc_
list
_t
vlist
;
vlc_
value
_t
*
vlist
;
char
**
tlist
;
size_t
count
;
...
...
@@ -1299,7 +1291,7 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
const
char
*
psz_text
=
NULL
;
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
{
if
(
!
strcmp
(
vlist
.
p_values
[
i
].
psz_string
,
psz_mode
)
)
if
(
!
strcmp
(
vlist
[
i
].
psz_string
,
psz_mode
)
)
{
psz_text
=
tlist
[
i
];
break
;
...
...
@@ -1308,7 +1300,7 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
DisplayMessage
(
p_vout
,
"%s (%s)"
,
_
(
"Deinterlace on"
),
psz_text
?
psz_text
:
psz_mode
);
var_FreeStringList
(
vlist
,
tlist
);
var_FreeStringList
(
count
,
vlist
,
tlist
);
}
free
(
psz_mode
);
}
...
...
@@ -1318,7 +1310,7 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
if
(
p_vout
)
{
char
*
psz_mode
=
var_GetString
(
p_vout
,
"deinterlace-mode"
);
vlc_
list
_t
vlist
;
vlc_
value
_t
*
vlist
;
char
**
tlist
;
size_t
count
;
...
...
@@ -1329,7 +1321,7 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
for
(
i
=
0
;
i
<
count
;
i
++
)
{
if
(
!
strcmp
(
vlist
.
p_values
[
i
].
psz_string
,
psz_mode
)
)
if
(
!
strcmp
(
vlist
[
i
].
psz_string
,
psz_mode
)
)
{
i
++
;
break
;
...
...
@@ -1337,7 +1329,7 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
}
if
(
i
==
count
)
i
=
0
;
psz_text
=
tlist
[
i
];
var_SetString
(
p_vout
,
"deinterlace-mode"
,
vlist
.
p_values
[
i
].
psz_string
);
var_SetString
(
p_vout
,
"deinterlace-mode"
,
vlist
[
i
].
psz_string
);
int
i_deinterlace
=
var_GetInteger
(
p_vout
,
"deinterlace"
);
if
(
i_deinterlace
!=
0
)
...
...
@@ -1351,7 +1343,7 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
psz_text
?
psz_text
:
psz_mode
);
}
var_FreeStringList
(
vlist
,
tlist
);
var_FreeStringList
(
count
,
vlist
,
tlist
);
}
free
(
psz_mode
);
}
...
...
@@ -1363,7 +1355,7 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
if
(
p_input
)
{
vlc_value_t
val
;
vlc_
list
_t
list
;
vlc_
value
_t
*
list
;
size_t
count
;
var_Get
(
p_input
,
"spu-es"
,
&
val
);
...
...
@@ -1374,7 +1366,7 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
{
DisplayMessage
(
p_vout
,
_
(
"Subtitle position: no active subtitle"
)
);
free
(
list
.
p_values
);
free
(
list
);
break
;
}
...
...
@@ -1386,7 +1378,7 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
ClearChannels
(
p_vout
,
slider_chan
);
DisplayMessage
(
p_vout
,
_
(
"Subtitle position %d px"
),
i_pos
);
free
(
list
.
p_values
);
free
(
list
);
}
break
;
}
...
...
modules/control/oldrc.c
View file @
0b3b1edf
...
...
@@ -1122,7 +1122,7 @@ static int Input( vlc_object_t *p_this, char const *psz_cmd,
else
{
/* get */
vlc_
list
_t
val
;
vlc_
value
_t
*
val
;
char
**
text
;
size_t
count
;
...
...
@@ -1138,12 +1138,12 @@ static int Input( vlc_object_t *p_this, char const *psz_cmd,
msg_rc
(
"+----[ %s ]"
,
name
);
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
{
msg_rc
(
"| %"
PRId64
" - %s%s"
,
val
.
p_values
[
i
].
i_int
,
text
[
i
],
(
i_value
==
val
.
p_values
[
i
].
i_int
)
?
" *"
:
""
);
msg_rc
(
"| %"
PRId64
" - %s%s"
,
val
[
i
].
i_int
,
text
[
i
],
(
i_value
==
val
[
i
].
i_int
)
?
" *"
:
""
);
free
(
text
[
i
]);
}
free
(
text
);
free
(
val
.
p_values
);
free
(
val
);
msg_rc
(
"+----[ end of %s ]"
,
name
);
}
free
(
name
);
...
...
@@ -1556,7 +1556,7 @@ static int VideoConfig( vlc_object_t *p_this, char const *psz_cmd,
{
/* get */
char
*
name
;
vlc_
list
_t
val
;
vlc_
value
_t
*
val
;
char
**
text
;
float
f_value
=
0
.;
char
*
psz_value
=
NULL
;
...
...
@@ -1591,8 +1591,8 @@ static int VideoConfig( vlc_object_t *p_this, char const *psz_cmd,
{
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
{
msg_rc
(
"| %f - %s%s"
,
val
.
p_values
[
i
].
f_float
,
text
[
i
],
f_value
==
val
.
p_values
[
i
].
f_float
?
" *"
:
""
);
msg_rc
(
"| %f - %s%s"
,
val
[
i
].
f_float
,
text
[
i
],
f_value
==
val
[
i
].
f_float
?
" *"
:
""
);
free
(
text
[
i
]);
}
}
...
...
@@ -1600,16 +1600,16 @@ static int VideoConfig( vlc_object_t *p_this, char const *psz_cmd,
{
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
{
msg_rc
(
"| %s - %s%s"
,
val
.
p_values
[
i