Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
8cffc346
Commit
8cffc346
authored
Oct 23, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib: use "zoom" rather than "scale" (like interfaces)
parent
8a202039
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
+6
-8
lib/media_player.c
lib/media_player.c
+2
-4
lib/video.c
lib/video.c
+4
-4
No files found.
lib/media_player.c
View file @
8cffc346
...
...
@@ -526,10 +526,8 @@ libvlc_media_player_new( libvlc_instance_t *instance )
var_SetBool
(
mp
,
"mouse-events"
,
true
);
var_Create
(
mp
,
"fullscreen"
,
VLC_VAR_BOOL
);
var_Create
(
mp
,
"autoscale"
,
VLC_VAR_BOOL
);
var_SetBool
(
mp
,
"autoscale"
,
true
);
var_Create
(
mp
,
"scale"
,
VLC_VAR_FLOAT
);
var_SetFloat
(
mp
,
"scale"
,
1
.);
var_Create
(
mp
,
"autoscale"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
var_Create
(
mp
,
"zoom"
,
VLC_VAR_FLOAT
|
VLC_VAR_DOINHERIT
);
var_Create
(
mp
,
"aspect-ratio"
,
VLC_VAR_STRING
);
var_Create
(
mp
,
"crop"
,
VLC_VAR_STRING
);
var_Create
(
mp
,
"deinterlace"
,
VLC_VAR_INTEGER
);
...
...
lib/video.c
View file @
8cffc346
...
...
@@ -230,16 +230,16 @@ unsigned libvlc_media_player_has_vout( libvlc_media_player_t *p_mi )
float
libvlc_video_get_scale
(
libvlc_media_player_t
*
mp
)
{
float
f_scale
=
var_GetFloat
(
mp
,
"
scale
"
);
float
f_scale
=
var_GetFloat
(
mp
,
"
zoom
"
);
if
(
var_GetBool
(
mp
,
"autoscale"
))
f_scale
=
0
.;
f_scale
=
0
.
f
;
return
f_scale
;
}
void
libvlc_video_set_scale
(
libvlc_media_player_t
*
p_mp
,
float
f_scale
)
{
if
(
isfinite
(
f_scale
)
&&
f_scale
!=
0
.
f
)
var_SetFloat
(
p_mp
,
"
scale
"
,
f_scale
);
var_SetFloat
(
p_mp
,
"
zoom
"
,
f_scale
);
var_SetBool
(
p_mp
,
"autoscale"
,
f_scale
==
0
.
f
);
/* Apply to current video outputs (if any) */
...
...
@@ -250,7 +250,7 @@ void libvlc_video_set_scale( libvlc_media_player_t *p_mp, float f_scale )
vout_thread_t
*
p_vout
=
pp_vouts
[
i
];
if
(
isfinite
(
f_scale
)
&&
f_scale
!=
0
.
f
)
var_SetFloat
(
p_vout
,
"
scale
"
,
f_scale
);
var_SetFloat
(
p_vout
,
"
zoom
"
,
f_scale
);
var_SetBool
(
p_vout
,
"autoscale"
,
f_scale
==
0
.
f
);
vlc_object_release
(
p_vout
);
}
...
...
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