Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
9cc1a264
Commit
9cc1a264
authored
Jun 14, 2005
by
Derk-Jan Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* backport of [11424]
parent
7f6abd8c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
11 deletions
+20
-11
modules/gui/macosx/voutgl.m
modules/gui/macosx/voutgl.m
+13
-4
modules/video_output/opengl.c
modules/video_output/opengl.c
+7
-7
No files found.
modules/gui/macosx/voutgl.m
View file @
9cc1a264
...
...
@@ -279,6 +279,8 @@ static void Unlock( vout_thread_t * p_vout )
{
int
x
,
y
;
vlc_value_t
val
;
Lock
(
p_vout
);
NSRect
bounds
=
[
self
bounds
];
[[
self
openGLContext
]
makeCurrentContext
];
...
...
@@ -301,16 +303,15 @@ static void Unlock( vout_thread_t * p_vout )
y
=
bounds
.
size
.
width
*
VOUT_ASPECT_FACTOR
/
p_vout
->
render
.
i_aspect
;
}
Lock
(
p_vout
);
glViewport
(
(
bounds
.
size
.
width
-
x
)
/
2
,
(
bounds
.
size
.
height
-
y
)
/
2
,
x
,
y
);
Unlock
(
p_vout
);
if
(
p_vout
->
p_sys
->
b_got_frame
)
{
/* Ask the opengl module to redraw */
vout_thread_t
*
p_parent
;
p_parent
=
(
vout_thread_t
*
)
p_vout
->
p_parent
;
Unlock
(
p_vout
);
if
(
p_parent
&&
p_parent
->
pf_display
)
{
p_parent
->
pf_display
(
p_parent
,
NULL
);
...
...
@@ -318,17 +319,25 @@ static void Unlock( vout_thread_t * p_vout )
}
else
{
Lock
(
p_vout
);
glClear
(
GL_COLOR_BUFFER_BIT
);
Unlock
(
p_vout
);
}
[
super
reshape
];
}
-
(
void
)
update
{
Lock
(
p_vout
);
[
super
update
];
Unlock
(
p_vout
);
}
-
(
void
)
drawRect
:
(
NSRect
)
rect
{
[[
self
openGLContext
]
makeCurrentContext
];
Lock
(
p_vout
);
[[
self
openGLContext
]
makeCurrentContext
];
glFlush
();
[
super
drawRect
:
rect
];
Unlock
(
p_vout
);
}
...
...
modules/video_output/opengl.c
View file @
9cc1a264
...
...
@@ -562,6 +562,13 @@ static void DisplayVideo( vout_thread_t *p_vout, picture_t *p_pic )
vout_sys_t
*
p_sys
=
p_vout
->
p_sys
;
float
f_width
,
f_height
;
if
(
p_sys
->
p_vout
->
pf_lock
&&
p_sys
->
p_vout
->
pf_lock
(
p_sys
->
p_vout
)
)
{
msg_Warn
(
p_vout
,
"could not lock OpenGL provider"
);
return
;
}
/* glTexCoord works differently with GL_TEXTURE_2D and
GL_TEXTURE_RECTANGLE_EXT */
#ifdef SYS_DARWIN
...
...
@@ -576,13 +583,6 @@ static void DisplayVideo( vout_thread_t *p_vout, picture_t *p_pic )
OpenGL providers can call pf_display to force redraw. Currently,
the OS X provider uses it to get a smooth window resizing */
if
(
p_sys
->
p_vout
->
pf_lock
&&
p_sys
->
p_vout
->
pf_lock
(
p_sys
->
p_vout
)
)
{
msg_Warn
(
p_vout
,
"could not lock OpenGL provider"
);
return
;
}
glClear
(
GL_COLOR_BUFFER_BIT
);
if
(
p_sys
->
i_effect
==
OPENGL_EFFECT_NONE
)
...
...
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