Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
edaffcc8
Commit
edaffcc8
authored
Nov 03, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modified vout_SetDisplayAspect() to take a DAR instead of a SAR.
parent
d22b9922
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
9 deletions
+12
-9
include/vlc_vout_wrapper.h
include/vlc_vout_wrapper.h
+1
-1
src/video_output/display.c
src/video_output/display.c
+11
-1
src/video_output/video_output.c
src/video_output/video_output.c
+0
-7
No files found.
include/vlc_vout_wrapper.h
View file @
edaffcc8
...
...
@@ -85,7 +85,7 @@ VLC_EXPORT(void, vout_SetDisplayFullscreen, (vout_display_t *, bool is_fullscree
VLC_EXPORT
(
void
,
vout_SetDisplayFilled
,
(
vout_display_t
*
,
bool
is_filled
));
VLC_EXPORT
(
void
,
vout_SetDisplayZoom
,
(
vout_display_t
*
,
int
num
,
int
den
));
VLC_EXPORT
(
void
,
vout_SetWindowState
,
(
vout_display_t
*
,
unsigned
state
));
VLC_EXPORT
(
void
,
vout_SetDisplayAspect
,
(
vout_display_t
*
,
unsigned
sar_num
,
unsigned
s
ar_den
));
VLC_EXPORT
(
void
,
vout_SetDisplayAspect
,
(
vout_display_t
*
,
unsigned
dar_num
,
unsigned
d
ar_den
));
VLC_EXPORT
(
void
,
vout_SetDisplayCrop
,
(
vout_display_t
*
,
unsigned
crop_num
,
unsigned
crop_den
,
unsigned
x
,
unsigned
y
,
unsigned
width
,
unsigned
height
));
VLC_EXPORT
(
vout_opengl_t
*
,
vout_GetDisplayOpengl
,
(
vout_display_t
*
));
...
...
src/video_output/display.c
View file @
edaffcc8
...
...
@@ -1128,10 +1128,20 @@ void vout_SetWindowState(vout_display_t *vd, unsigned state)
vlc_mutex_unlock
(
&
osys
->
lock
);
}
void
vout_SetDisplayAspect
(
vout_display_t
*
vd
,
unsigned
sar_num
,
unsigned
s
ar_den
)
void
vout_SetDisplayAspect
(
vout_display_t
*
vd
,
unsigned
dar_num
,
unsigned
d
ar_den
)
{
vout_display_owner_sys_t
*
osys
=
vd
->
owner
.
sys
;
unsigned
sar_num
,
sar_den
;
if
(
dar_num
>
0
&&
dar_den
>
0
)
{
sar_num
=
dar_num
*
osys
->
source
.
i_visible_height
;
sar_den
=
dar_den
*
osys
->
source
.
i_visible_width
;
vlc_ureduce
(
&
sar_num
,
&
sar_den
,
sar_num
,
sar_den
,
0
);
}
else
{
sar_num
=
0
;
sar_den
=
0
;
}
if
(
osys
->
sar
.
num
!=
sar_num
||
osys
->
sar
.
den
!=
sar_den
)
{
osys
->
ch_sar
=
true
;
osys
->
sar
.
num
=
sar_num
;
...
...
src/video_output/video_output.c
View file @
edaffcc8
...
...
@@ -1175,13 +1175,6 @@ static void ThreadChangeZoom(vout_thread_t *vout, int num, int den)
static
void
ThreadChangeAspectRatio
(
vout_thread_t
*
vout
,
unsigned
num
,
unsigned
den
)
{
const
video_format_t
*
source
=
&
vout
->
p
->
original
;
if
(
num
>
0
&&
den
>
0
)
{
num
*=
source
->
i_visible_height
;
den
*=
source
->
i_visible_width
;
vlc_ureduce
(
&
num
,
&
den
,
num
,
den
,
0
);
}
vout_SetDisplayAspect
(
vout
->
p
->
display
.
vd
,
num
,
den
);
}
...
...
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