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
9d926a9e
Commit
9d926a9e
authored
Mar 05, 2009
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minimal_macosx: "drawable-agl" and "drawable-gl" split
parent
054e7db9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
13 deletions
+18
-13
modules/gui/minimal_macosx/VLCOpenGLVoutView.m
modules/gui/minimal_macosx/VLCOpenGLVoutView.m
+4
-4
modules/gui/minimal_macosx/voutagl.m
modules/gui/minimal_macosx/voutagl.m
+6
-4
modules/gui/minimal_macosx/voutgl.m
modules/gui/minimal_macosx/voutgl.m
+8
-5
No files found.
modules/gui/minimal_macosx/VLCOpenGLVoutView.m
View file @
9d926a9e
/*****************************************************************************
/*****************************************************************************
* VLCOpenGLVoutView.m: MacOS X OpenGL provider
* VLCOpenGLVoutView.m: MacOS X OpenGL provider
*****************************************************************************
*****************************************************************************
* Copyright (C) 2001-200
7
the VideoLAN team
* Copyright (C) 2001-200
9
the VideoLAN team
* $Id$
* $Id$
*
*
* Authors: Colin Delacroix <colin@zoy.org>
* Authors: Colin Delacroix <colin@zoy.org>
...
@@ -49,8 +49,8 @@ int cocoaglvoutviewInit( vout_thread_t * p_vout )
...
@@ -49,8 +49,8 @@ int cocoaglvoutviewInit( vout_thread_t * p_vout )
msg_Dbg
(
p_vout
,
"Mac OS X Vout is opening"
);
msg_Dbg
(
p_vout
,
"Mac OS X Vout is opening"
);
var_Create
(
p_vout
,
"drawable"
,
VLC_VAR_DOINHERIT
);
var_Create
(
p_vout
,
"drawable
-gl
"
,
VLC_VAR_DOINHERIT
);
var_Get
(
p_vout
,
"drawabl
e
"
,
&
value_drawable
);
var_Get
(
p_vout
,
"drawabl
-gl
"
,
&
value_drawable
);
p_vout
->
p_sys
->
o_pool
=
[[
NSAutoreleasePool
alloc
]
init
];
p_vout
->
p_sys
->
o_pool
=
[[
NSAutoreleasePool
alloc
]
init
];
...
@@ -81,7 +81,7 @@ void cocoaglvoutviewEnd( vout_thread_t * p_vout )
...
@@ -81,7 +81,7 @@ void cocoaglvoutviewEnd( vout_thread_t * p_vout )
id
<
VLCOpenGLVoutEmbedding
>
o_cocoaglview_container
;
id
<
VLCOpenGLVoutEmbedding
>
o_cocoaglview_container
;
msg_Dbg
(
p_vout
,
"Mac OS X Vout is closing"
);
msg_Dbg
(
p_vout
,
"Mac OS X Vout is closing"
);
var_Destroy
(
p_vout
,
"drawable"
);
var_Destroy
(
p_vout
,
"drawable
-gl
"
);
o_cocoaglview_container
=
[
p_vout
->
p_sys
->
o_glview
container
];
o_cocoaglview_container
=
[
p_vout
->
p_sys
->
o_glview
container
];
...
...
modules/gui/minimal_macosx/voutagl.m
View file @
9d926a9e
...
@@ -77,14 +77,15 @@ int aglInit( vout_thread_t * p_vout )
...
@@ -77,14 +77,15 @@ int aglInit( vout_thread_t * p_vout )
msg
_
Err
(
p
_
vout
,
"Cannot create AGL context."
)
;
msg
_
Err
(
p
_
vout
,
"Cannot create AGL context."
)
;
return
VLC
_
EGENERIC
;
return
VLC
_
EGENERIC
;
}
}
else
{
else
{
//
tell
opengl
not
to
sync
buffer
swap
with
vertical
retrace
(
too
inefficient
)
//
tell
opengl
not
to
sync
buffer
swap
with
vertical
retrace
(
too
inefficient
)
GLint
param
=
0
;
GLint
param
=
0
;
aglSetInteger
(
p
_
vout
->
p
_
sys
->
agl
_
ctx
,
AGL
_
SWAP
_
INTERVAL
,
&
param
)
;
aglSetInteger
(
p
_
vout
->
p
_
sys
->
agl
_
ctx
,
AGL
_
SWAP
_
INTERVAL
,
&
param
)
;
aglEnable
(
p
_
vout
->
p
_
sys
->
agl
_
ctx
,
AGL
_
SWAP
_
INTERVAL
)
;
aglEnable
(
p
_
vout
->
p
_
sys
->
agl
_
ctx
,
AGL
_
SWAP
_
INTERVAL
)
;
}
}
var
_
Get
(
p
_
vout
->
p
_
libvlc
,
"drawable"
,
&
val
)
;
var
_
Get
(
p
_
vout
->
p
_
libvlc
,
"drawable
-agl
"
,
&
val
)
;
p
_
vout
->
p
_
sys
->
agl
_
drawable
=
(
AGLDrawable
)
val
.
i
_
int
;
p
_
vout
->
p
_
sys
->
agl
_
drawable
=
(
AGLDrawable
)
val
.
i
_
int
;
aglSetDrawable
(
p
_
vout
->
p
_
sys
->
agl
_
ctx
,
p
_
vout
->
p
_
sys
->
agl
_
drawable
)
;
aglSetDrawable
(
p
_
vout
->
p
_
sys
->
agl
_
ctx
,
p
_
vout
->
p
_
sys
->
agl
_
drawable
)
;
...
@@ -123,7 +124,8 @@ int aglInit( vout_thread_t * p_vout )
...
@@ -123,7 +124,8 @@ int aglInit( vout_thread_t * p_vout )
void
aglEnd
(
vout
_
thread
_
t
*
p
_
vout
)
void
aglEnd
(
vout
_
thread
_
t
*
p
_
vout
)
{
{
aglSetCurrentContext
(
NULL
)
;
aglSetCurrentContext
(
NULL
)
;
if
(
p
_
vout
->
p
_
sys
->
theWindow
)
DisposeWindow
(
p
_
vout
->
p
_
sys
->
theWindow
)
;
if
(
p
_
vout
->
p
_
sys
->
theWindow
)
DisposeWindow
(
p
_
vout
->
p
_
sys
->
theWindow
)
;
aglDestroyContext
(
p
_
vout
->
p
_
sys
->
agl
_
ctx
)
;
aglDestroyContext
(
p
_
vout
->
p
_
sys
->
agl
_
ctx
)
;
}
}
...
@@ -205,7 +207,7 @@ int aglManage( vout_thread_t * p_vout )
...
@@ -205,7 +207,7 @@ int aglManage( vout_thread_t * p_vout )
Rect
viewBounds
;
Rect
viewBounds
;
Rect
clipBounds
;
Rect
clipBounds
;
var
_
Get
(
p
_
vout
->
p
_
libvlc
,
"drawable"
,
&
val
)
;
var
_
Get
(
p
_
vout
->
p
_
libvlc
,
"drawable
-agl
"
,
&
val
)
;
p
_
vout
->
p
_
sys
->
agl
_
drawable
=
(
AGLDrawable
)
val
.
i
_
int
;
p
_
vout
->
p
_
sys
->
agl
_
drawable
=
(
AGLDrawable
)
val
.
i
_
int
;
aglSetDrawable
(
p
_
vout
->
p
_
sys
->
agl
_
ctx
,
p
_
vout
->
p
_
sys
->
agl
_
drawable
)
;
aglSetDrawable
(
p
_
vout
->
p
_
sys
->
agl
_
ctx
,
p
_
vout
->
p
_
sys
->
agl
_
drawable
)
;
...
...
modules/gui/minimal_macosx/voutgl.m
View file @
9d926a9e
...
@@ -36,7 +36,8 @@
...
@@ -36,7 +36,8 @@
int OpenVideoGL ( vlc_object_t * p_this )
int OpenVideoGL ( vlc_object_t * p_this )
{
{
vout_thread_t * p_vout = (vout_thread_t *) p_this;
vout_thread_t * p_vout = (vout_thread_t *) p_this;
vlc_value_t value_drawable;
int i_drawable_agl;
int i_drawable_gl;
if( !CGDisplayUsesOpenGLAcceleration( kCGDirectMainDisplay ) )
if( !CGDisplayUsesOpenGLAcceleration( kCGDirectMainDisplay ) )
{
{
...
@@ -53,9 +54,11 @@ int OpenVideoGL ( vlc_object_t * p_this )
...
@@ -53,9 +54,11 @@ int OpenVideoGL ( vlc_object_t * p_this )
memset( p_vout->p_sys, 0, sizeof( vout_sys_t ) );
memset( p_vout->p_sys, 0, sizeof( vout_sys_t ) );
var_Get( p_vout->p_libvlc, "drawable",
&
value_drawable );
i_drawable_agl = var_GetInteger( p_vout->p_libvlc, "drawable-agl" );
i_drawable_gl = var_GetInteger( p_vout->p_libvlc, "drawable-gl" );
if( 0 /* Are we in the mozilla plugin ? XXX: get that from drawable */ )
/* Are we in the mozilla plugin ? */
if( i_drawable_agl > 0 )
{
{
p_vout->pf_init = aglInit;
p_vout->pf_init = aglInit;
p_vout->pf_end = aglEnd;
p_vout->pf_end = aglEnd;
...
@@ -65,7 +68,7 @@ int OpenVideoGL ( vlc_object_t * p_this )
...
@@ -65,7 +68,7 @@ int OpenVideoGL ( vlc_object_t * p_this )
p_vout->pf_lock = aglLock;
p_vout->pf_lock = aglLock;
p_vout->pf_unlock = aglUnlock;
p_vout->pf_unlock = aglUnlock;
}
}
else
else
/*if( i_drawable_gl > 0 )*/
{
{
/* Let's use the VLCOpenGLVoutView.m class */
/* Let's use the VLCOpenGLVoutView.m class */
p_vout->pf_init = cocoaglvoutviewInit;
p_vout->pf_init = cocoaglvoutviewInit;
...
...
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