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
c39e826c
Commit
c39e826c
authored
Sep 03, 2015
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caopengllayer: drop legacy NSAutoreleasePool pattern
parent
b8b5a70c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
84 additions
and
83 deletions
+84
-83
modules/video_output/caopengllayer.m
modules/video_output/caopengllayer.m
+84
-83
No files found.
modules/video_output/caopengllayer.m
View file @
c39e826c
...
...
@@ -114,8 +114,7 @@ static int Open (vlc_object_t *p_this)
if
(
sys
==
NULL
)
return
VLC_EGENERIC
;
NSAutoreleasePool
*
pool
=
[[
NSAutoreleasePool
alloc
]
init
];
@autoreleasepool
{
id
container
=
var_CreateGetAddress
(
vd
,
"drawable-nsobject"
);
if
(
container
)
vout_display_DeleteWindow
(
vd
,
NULL
);
...
...
@@ -137,12 +136,15 @@ static int Open (vlc_object_t *p_this)
sys
->
cgLayer
=
[[
VLCCAOpenGLLayer
alloc
]
init
];
[
sys
->
cgLayer
setVoutDisplay
:
vd
];
[
sys
->
cgLayer
performSelectorOnMainThread
:
@selector
(
display
)
withObject
:
nil
waitUntilDone
:
YES
];
[
sys
->
cgLayer
performSelectorOnMainThread
:
@selector
(
display
)
withObject:
nil
waitUntilDone:
YES
];
if
([
container
respondsToSelector
:
@selector
(
addVoutLayer
:)])
{
msg_Dbg
(
vd
,
"container implements implicit protocol"
);
[
container
addVoutLayer
:
sys
->
cgLayer
];
}
else
if
([
container
respondsToSelector
:
@selector
(
addSublayer
:)]
||
[
container
isKindOfClass
:[
CALayer
class
]])
{
}
else
if
([
container
respondsToSelector
:
@selector
(
addSublayer
:)]
||
[
container
isKindOfClass
:[
CALayer
class
]])
{
msg_Dbg
(
vd
,
"container doesn't implement implicit protocol, fallback mode used"
);
[
container
addSublayer
:
sys
->
cgLayer
];
}
else
{
...
...
@@ -196,13 +198,12 @@ static int Open (vlc_object_t *p_this)
vout_display_SendEventFullscreen
(
vd
,
false
);
vout_display_SendEventDisplaySize
(
vd
,
(
int
)
outputSize
.
width
,
(
int
)
outputSize
.
height
);
[
pool
release
];
return
VLC_SUCCESS
;
bailout:
[
pool
release
];
bailout:
Close
(
p_this
);
return
VLC_EGENERIC
;
}
}
static
void
Close
(
vlc_object_t
*
p_this
)
...
...
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