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
41d4b8bd
Commit
41d4b8bd
authored
Oct 22, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed and simplify --monitor-par support.
parent
b5b258f7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
39 deletions
+9
-39
src/video_output/video_output.c
src/video_output/video_output.c
+8
-4
src/video_output/vout_internal.h
src/video_output/vout_internal.h
+0
-4
src/video_output/vout_intf.c
src/video_output/vout_intf.c
+1
-31
No files found.
src/video_output/video_output.c
View file @
41d4b8bd
...
...
@@ -118,8 +118,6 @@ static vout_thread_t *VoutCreate(vlc_object_t *object,
vout_control_PushVoid
(
&
vout
->
p
->
control
,
VOUT_CONTROL_INIT
);
vout_statistic_Init
(
&
vout
->
p
->
statistic
);
vout
->
p
->
i_par_num
=
vout
->
p
->
i_par_den
=
1
;
vout_snapshot_Init
(
&
vout
->
p
->
snapshot
);
...
...
@@ -526,8 +524,14 @@ static void VoutGetDisplayCfg(vout_thread_t *vout, vout_display_cfg_t *cfg, cons
cfg
->
display
.
width
=
display_width
>
0
?
display_width
:
0
;
cfg
->
display
.
height
=
display_height
>
0
?
display_height
:
0
;
cfg
->
is_display_filled
=
var_CreateGetBool
(
vout
,
"autoscale"
);
cfg
->
display
.
sar
.
num
=
1
;
/* TODO monitor AR */
cfg
->
display
.
sar
.
den
=
1
;
unsigned
msar_num
,
msar_den
;
if
(
var_InheritURational
(
vout
,
&
msar_num
,
&
msar_den
,
"monitor-par"
)
||
msar_num
<=
0
||
msar_den
<=
0
)
{
msar_num
=
1
;
msar_den
=
1
;
}
cfg
->
display
.
sar
.
num
=
msar_num
;
cfg
->
display
.
sar
.
den
=
msar_den
;
unsigned
zoom_den
=
1000
;
unsigned
zoom_num
=
zoom_den
*
var_CreateGetFloat
(
vout
,
"scale"
);
vlc_ureduce
(
&
zoom_num
,
&
zoom_den
,
zoom_num
,
zoom_den
,
0
);
...
...
src/video_output/vout_internal.h
View file @
41d4b8bd
...
...
@@ -71,10 +71,6 @@ struct vout_thread_sys_t
vlc_mutex_t
spu_lock
;
spu_t
*
p_spu
;
/* Monitor Pixel Aspect Ratio */
unsigned
int
i_par_num
;
unsigned
int
i_par_den
;
/* Video output window */
struct
{
bool
is_unused
;
...
...
src/video_output/vout_intf.c
View file @
41d4b8bd
...
...
@@ -153,7 +153,6 @@ static void AddCustomRatios( vout_thread_t *p_vout, const char *psz_var,
void
vout_IntfInit
(
vout_thread_t
*
p_vout
)
{
vlc_value_t
val
,
text
,
old_val
;
bool
b_force_par
=
false
;
char
*
psz_buf
;
int
i
;
...
...
@@ -250,35 +249,6 @@ void vout_IntfInit( vout_thread_t *p_vout )
/* Monitor pixel aspect-ratio */
var_Create
(
p_vout
,
"monitor-par"
,
VLC_VAR_STRING
|
VLC_VAR_DOINHERIT
);
var_Get
(
p_vout
,
"monitor-par"
,
&
val
);
if
(
val
.
psz_string
&&
*
val
.
psz_string
)
{
char
*
psz_parser
=
strchr
(
val
.
psz_string
,
':'
);
unsigned
int
i_aspect_num
=
0
,
i_aspect_den
=
0
;
float
i_aspect
=
0
;
if
(
psz_parser
)
{
i_aspect_num
=
strtol
(
val
.
psz_string
,
0
,
10
);
i_aspect_den
=
strtol
(
++
psz_parser
,
0
,
10
);
}
else
{
i_aspect
=
us_atof
(
val
.
psz_string
);
vlc_ureduce
(
&
i_aspect_num
,
&
i_aspect_den
,
i_aspect
*
VOUT_ASPECT_FACTOR
,
VOUT_ASPECT_FACTOR
,
0
);
}
if
(
!
i_aspect_num
||
!
i_aspect_den
)
i_aspect_num
=
i_aspect_den
=
1
;
p_vout
->
p
->
i_par_num
=
i_aspect_num
;
p_vout
->
p
->
i_par_den
=
i_aspect_den
;
vlc_ureduce
(
&
p_vout
->
p
->
i_par_num
,
&
p_vout
->
p
->
i_par_den
,
p_vout
->
p
->
i_par_num
,
p_vout
->
p
->
i_par_den
,
0
);
msg_Dbg
(
p_vout
,
"overriding monitor pixel aspect-ratio: %i:%i"
,
p_vout
->
p
->
i_par_num
,
p_vout
->
p
->
i_par_den
);
b_force_par
=
true
;
}
free
(
val
.
psz_string
);
/* Aspect-ratio object var */
var_Create
(
p_vout
,
"aspect-ratio"
,
VLC_VAR_STRING
|
VLC_VAR_ISCOMMAND
|
...
...
@@ -307,7 +277,7 @@ void vout_IntfInit( vout_thread_t *p_vout )
var_AddCallback
(
p_vout
,
"aspect-ratio"
,
AspectCallback
,
NULL
);
var_Get
(
p_vout
,
"aspect-ratio"
,
&
old_val
);
if
(
(
old_val
.
psz_string
&&
*
old_val
.
psz_string
)
||
b_force_par
)
if
(
(
old_val
.
psz_string
&&
*
old_val
.
psz_string
)
)
var_TriggerCallback
(
p_vout
,
"aspect-ratio"
);
free
(
old_val
.
psz_string
);
...
...
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