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
156136fb
Commit
156136fb
authored
Feb 26, 2004
by
Derk-Jan Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Something I forgot
--macosx-stretch mode. Ignore aspect ratio and stretch video to fill window.
parent
b8ed3905
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
11 deletions
+32
-11
modules/gui/macosx/macosx.m
modules/gui/macosx/macosx.m
+8
-1
modules/gui/macosx/vout.m
modules/gui/macosx/vout.m
+24
-10
No files found.
modules/gui/macosx/macosx.m
View file @
156136fb
...
...
@@ -2,7 +2,7 @@
* macosx.m: MacOS X module for vlc
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
* $Id: macosx.m,v 1.2
1 2004/02/09 17:42:12 titer
Exp $
* $Id: macosx.m,v 1.2
2 2004/02/26 13:04:55 hartman
Exp $
*
* Authors: Colin Delacroix
<colin
@
zoy
.
org
>
* Eugenio Jarosiewicz
<ej0
@
cise
.
ufl
.
edu
>
...
...
@@ -54,6 +54,11 @@ void E_(CloseVideo) ( vlc_object_t * );
"Set the transparency of the video output. 1 is non-transparent (default) " \
"0 is fully transparent.")
#define STRETCH_TEXT N_("Stretch Aspect Ratio")
#define STRETCH_LONGTEXT N_("Instead of keeping the aspect ratio " \
"of the movie when resizing the video, stretch the video " \
"to fill the entire window." )
#define OPENGL_TEXT N_("Use OpenGL")
#define OPENGL_LONGTEXT N_("Use OpenGL instead of QuickTime to " \
"render the video on the screen.")
...
...
@@ -77,6 +82,8 @@ vlc_module_begin();
set_callbacks( E_(OpenVideo), E_(CloseVideo) );
add_integer( "macosx-vdev", 0, NULL, VDEV_TEXT, VDEV_LONGTEXT,
VLC_FALSE );
add_bool( "macosx-stretch", 0, NULL, STRETCH_TEXT, STRETCH_LONGTEXT,
VLC_FALSE );
add_float_with_range( "macosx-opaqueness", 1, 0, 1, NULL,
OPAQUENESS_TEXT, OPAQUENESS_LONGTEXT, VLC_TRUE );
add_bool( "macosx-opengl", 0, NULL, OPENGL_TEXT,
...
...
modules/gui/macosx/vout.m
View file @
156136fb
...
...
@@ -2,7 +2,7 @@
* vout.m: MacOS X video output module
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
* $Id: vout.m,v 1.8
2 2004/02/25 19:27:23 titer
Exp $
* $Id: vout.m,v 1.8
3 2004/02/26 13:04:55 hartman
Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Florian G. Pflug <fgp@phlo.org>
...
...
@@ -657,7 +657,15 @@ static void QTScaleMatrix( vout_thread_t *p_vout )
i_width
=
s_rect
.
right
-
s_rect
.
left
;
i_height
=
s_rect
.
bottom
-
s_rect
.
top
;
if
(
i_height
*
p_vout
->
output
.
i_aspect
<
i_width
*
VOUT_ASPECT_FACTOR
)
if
(
config_GetInt
(
p_vout
,
"macosx-stretch"
)
)
{
factor_x
=
FixDiv
(
Long2Fix
(
i_width
),
Long2Fix
(
p_vout
->
output
.
i_width
)
);
factor_y
=
FixDiv
(
Long2Fix
(
i_height
),
Long2Fix
(
p_vout
->
output
.
i_height
)
);
}
else
if
(
i_height
*
p_vout
->
output
.
i_aspect
<
i_width
*
VOUT_ASPECT_FACTOR
)
{
int
i_adj_width
=
i_height
*
p_vout
->
output
.
i_aspect
/
VOUT_ASPECT_FACTOR
;
...
...
@@ -686,12 +694,7 @@ static void QTScaleMatrix( vout_thread_t *p_vout )
ScaleMatrix
(
p_vout
->
p_sys
->
p_matrix
,
factor_x
,
factor_y
,
Long2Fix
(
0
),
Long2Fix
(
0
)
);
TranslateMatrix
(
p_vout
->
p_sys
->
p_matrix
,
Long2Fix
(
i_offset_x
),
Long2Fix
(
i_offset_y
)
);
Long2Fix
(
i_offset_x
),
Long2Fix
(
i_offset_y
)
);
}
/*****************************************************************************
...
...
@@ -1374,7 +1377,12 @@ static void QTFreePicture( vout_thread_t *p_vout, picture_t *p_pic )
(
GLint
)
bounds
.
size
.
height
);
/* Quad size is set in order to preserve the aspect ratio */
if
(
bounds
.
size
.
height
*
p_vout
->
render
.
i_aspect
<
if
(
config_GetInt
(
p_vout
,
"macosx-stretch"
)
)
{
f_x
=
1
.
0
;
f_y
=
1
.
0
;
}
else
if
(
bounds
.
size
.
height
*
p_vout
->
render
.
i_aspect
<
bounds
.
size
.
width
*
VOUT_ASPECT_FACTOR
)
{
f_x
=
bounds
.
size
.
height
*
p_vout
->
render
.
i_aspect
/
...
...
@@ -1492,7 +1500,13 @@ static void QTFreePicture( vout_thread_t *p_vout, picture_t *p_pic )
[
fullScreenContext
makeCurrentContext
];
unsigned
width
=
CGDisplayPixelsWide
(
kCGDirectMainDisplay
);
unsigned
height
=
CGDisplayPixelsHigh
(
kCGDirectMainDisplay
);
if
(
height
*
p_vout
->
output
.
i_aspect
<
width
*
VOUT_ASPECT_FACTOR
)
if
(
config_GetInt
(
p_vout
,
"macosx-stretch"
)
)
{
f_x
=
1
.
0
;
f_y
=
1
.
0
;
}
else
if
(
height
*
p_vout
->
output
.
i_aspect
<
width
*
VOUT_ASPECT_FACTOR
)
{
f_x
=
(
float
)
height
*
p_vout
->
output
.
i_aspect
/
width
/
VOUT_ASPECT_FACTOR
;
...
...
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