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
fb76e3b6
Commit
fb76e3b6
authored
Jan 16, 2008
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MacOSX/Framework/VLCVideoLayer: Implement hasVideo.
parent
0b0a9159
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
4 deletions
+24
-4
extras/MacOSX/Framework/Headers/Public/VLCVideoLayer.h
extras/MacOSX/Framework/Headers/Public/VLCVideoLayer.h
+4
-0
extras/MacOSX/Framework/Headers/Public/VLCVideoView.h
extras/MacOSX/Framework/Headers/Public/VLCVideoView.h
+2
-2
extras/MacOSX/Framework/Sources/VLCVideoLayer.m
extras/MacOSX/Framework/Sources/VLCVideoLayer.m
+9
-2
extras/MacOSX/Framework/Sources/VLCVideoView.m
extras/MacOSX/Framework/Sources/VLCVideoView.m
+9
-0
No files found.
extras/MacOSX/Framework/Headers/Public/VLCVideoLayer.h
View file @
fb76e3b6
...
...
@@ -25,4 +25,8 @@
#import <QuartzCore/QuartzCore.h>
@interface
VLCVideoLayer
:
CALayer
{
BOOL
hasVideo
;
}
@property
(
readonly
)
BOOL
hasVideo
;
@end
extras/MacOSX/Framework/Headers/Public/VLCVideoView.h
View file @
fb76e3b6
...
...
@@ -31,11 +31,11 @@
NSColor
*
backColor
;
BOOL
stretchesVideo
;
id
layoutManager
;
// TODO: Allow for view to report transparency to do some cool effects
// with the video?
BOOL
hasVideo
;
}
@property
(
assign
)
id
delegate
;
@property
(
copy
)
NSColor
*
backColor
;
@property
BOOL
fillScreen
;
@property
(
readonly
)
BOOL
hasVideo
;
@end
extras/MacOSX/Framework/Sources/VLCVideoLayer.m
View file @
fb76e3b6
...
...
@@ -42,20 +42,25 @@
-
(
void
)
addVoutLayer
:(
CALayer
*
)
aLayer
;
@end
@interface
VLCVideoLayer
()
@property
(
readwrite
)
BOOL
hasVideo
;
@end
/******************************************************************************
* Implementation VLCVideoLayer
*/
@implementation
VLCVideoLayer
@synthesize
hasVideo
;
@end
/******************************************************************************
* Implementation VLCVideoLayer (Private)
*/
@implementation
VLCVideoLayer
(
Private
)
/* This is called by the libvlc module 'opengllayer' as soon as there is one
* vout available
*/
...
...
@@ -73,6 +78,7 @@
[
self
setNeedsDisplayOnBoundsChange
:
YES
];
[
CATransaction
commit
];
self
.
hasVideo
=
YES
;
}
-
(
void
)
removeVoutLayer
:(
CALayer
*
)
voutLayer
...
...
@@ -80,6 +86,7 @@
[
CATransaction
begin
];
[
voutLayer
removeFromSuperlayer
];
[
CATransaction
commit
];
self
.
hasVideo
=
NO
;
}
@end
\ No newline at end of file
@end
extras/MacOSX/Framework/Sources/VLCVideoView.m
View file @
fb76e3b6
...
...
@@ -62,6 +62,10 @@
-
(
void
)
addVoutLayer
:(
CALayer
*
)
aLayer
;
@end
@interface
VLCVideoView
()
@property
(
readwrite
)
BOOL
hasVideo
;
@end
/******************************************************************************
* Implementation VLCVideoView
*/
...
...
@@ -77,6 +81,7 @@
[
self
setStretchesVideo
:
NO
];
[
self
setAutoresizesSubviews
:
YES
];
[
self
setFillScreen
:
NO
];
self
.
hasVideo
=
NO
;
layoutManager
=
[[
VLCVideoLayoutManager
layoutManager
]
retain
];
}
return
self
;
...
...
@@ -105,6 +110,7 @@
@synthesize
delegate
;
@synthesize
backColor
;
@synthesize
hasVideo
;
-
(
BOOL
)
fillScreen
{
...
...
@@ -141,10 +147,12 @@
[
aLayer
setNeedsLayout
];
[
aLayer
setNeedsDisplay
];
[
rootLayer
setNeedsDisplayOnBoundsChange
:
YES
];
[
rootLayer
setNeedsDisplay
];
[
rootLayer
layoutIfNeeded
];
[
CATransaction
commit
];
self
.
hasVideo
=
YES
;
}
-
(
void
)
removeVoutLayer
:(
CALayer
*
)
voutLayer
...
...
@@ -152,6 +160,7 @@
[
CATransaction
begin
];
[
voutLayer
removeFromSuperlayer
];
[
CATransaction
commit
];
self
.
hasVideo
=
NO
;
}
@end
...
...
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