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
Show 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 @@
...
@@ -25,4 +25,8 @@
#import <QuartzCore/QuartzCore.h>
#import <QuartzCore/QuartzCore.h>
@interface
VLCVideoLayer
:
CALayer
@interface
VLCVideoLayer
:
CALayer
{
BOOL
hasVideo
;
}
@property
(
readonly
)
BOOL
hasVideo
;
@end
@end
extras/MacOSX/Framework/Headers/Public/VLCVideoView.h
View file @
fb76e3b6
...
@@ -31,11 +31,11 @@
...
@@ -31,11 +31,11 @@
NSColor
*
backColor
;
NSColor
*
backColor
;
BOOL
stretchesVideo
;
BOOL
stretchesVideo
;
id
layoutManager
;
id
layoutManager
;
// TODO: Allow for view to report transparency to do some cool effects
BOOL
hasVideo
;
// with the video?
}
}
@property
(
assign
)
id
delegate
;
@property
(
assign
)
id
delegate
;
@property
(
copy
)
NSColor
*
backColor
;
@property
(
copy
)
NSColor
*
backColor
;
@property
BOOL
fillScreen
;
@property
BOOL
fillScreen
;
@property
(
readonly
)
BOOL
hasVideo
;
@end
@end
extras/MacOSX/Framework/Sources/VLCVideoLayer.m
View file @
fb76e3b6
...
@@ -42,20 +42,25 @@
...
@@ -42,20 +42,25 @@
-
(
void
)
addVoutLayer
:(
CALayer
*
)
aLayer
;
-
(
void
)
addVoutLayer
:(
CALayer
*
)
aLayer
;
@end
@end
@interface
VLCVideoLayer
()
@property
(
readwrite
)
BOOL
hasVideo
;
@end
/******************************************************************************
/******************************************************************************
* Implementation VLCVideoLayer
* Implementation VLCVideoLayer
*/
*/
@implementation
VLCVideoLayer
@implementation
VLCVideoLayer
@synthesize
hasVideo
;
@end
@end
/******************************************************************************
/******************************************************************************
* Implementation VLCVideoLayer (Private)
* Implementation VLCVideoLayer (Private)
*/
*/
@implementation
VLCVideoLayer
(
Private
)
@implementation
VLCVideoLayer
(
Private
)
/* This is called by the libvlc module 'opengllayer' as soon as there is one
/* This is called by the libvlc module 'opengllayer' as soon as there is one
* vout available
* vout available
*/
*/
...
@@ -73,6 +78,7 @@
...
@@ -73,6 +78,7 @@
[
self
setNeedsDisplayOnBoundsChange
:
YES
];
[
self
setNeedsDisplayOnBoundsChange
:
YES
];
[
CATransaction
commit
];
[
CATransaction
commit
];
self
.
hasVideo
=
YES
;
}
}
-
(
void
)
removeVoutLayer
:(
CALayer
*
)
voutLayer
-
(
void
)
removeVoutLayer
:(
CALayer
*
)
voutLayer
...
@@ -80,6 +86,7 @@
...
@@ -80,6 +86,7 @@
[
CATransaction
begin
];
[
CATransaction
begin
];
[
voutLayer
removeFromSuperlayer
];
[
voutLayer
removeFromSuperlayer
];
[
CATransaction
commit
];
[
CATransaction
commit
];
self
.
hasVideo
=
NO
;
}
}
@end
@end
extras/MacOSX/Framework/Sources/VLCVideoView.m
View file @
fb76e3b6
...
@@ -62,6 +62,10 @@
...
@@ -62,6 +62,10 @@
-
(
void
)
addVoutLayer
:(
CALayer
*
)
aLayer
;
-
(
void
)
addVoutLayer
:(
CALayer
*
)
aLayer
;
@end
@end
@interface
VLCVideoView
()
@property
(
readwrite
)
BOOL
hasVideo
;
@end
/******************************************************************************
/******************************************************************************
* Implementation VLCVideoView
* Implementation VLCVideoView
*/
*/
...
@@ -77,6 +81,7 @@
...
@@ -77,6 +81,7 @@
[
self
setStretchesVideo
:
NO
];
[
self
setStretchesVideo
:
NO
];
[
self
setAutoresizesSubviews
:
YES
];
[
self
setAutoresizesSubviews
:
YES
];
[
self
setFillScreen
:
NO
];
[
self
setFillScreen
:
NO
];
self
.
hasVideo
=
NO
;
layoutManager
=
[[
VLCVideoLayoutManager
layoutManager
]
retain
];
layoutManager
=
[[
VLCVideoLayoutManager
layoutManager
]
retain
];
}
}
return
self
;
return
self
;
...
@@ -105,6 +110,7 @@
...
@@ -105,6 +110,7 @@
@synthesize
delegate
;
@synthesize
delegate
;
@synthesize
backColor
;
@synthesize
backColor
;
@synthesize
hasVideo
;
-
(
BOOL
)
fillScreen
-
(
BOOL
)
fillScreen
{
{
...
@@ -141,10 +147,12 @@
...
@@ -141,10 +147,12 @@
[
aLayer
setNeedsLayout
];
[
aLayer
setNeedsLayout
];
[
aLayer
setNeedsDisplay
];
[
aLayer
setNeedsDisplay
];
[
rootLayer
setNeedsDisplayOnBoundsChange
:
YES
];
[
rootLayer
setNeedsDisplayOnBoundsChange
:
YES
];
[
rootLayer
setNeedsDisplay
];
[
rootLayer
setNeedsDisplay
];
[
rootLayer
layoutIfNeeded
];
[
rootLayer
layoutIfNeeded
];
[
CATransaction
commit
];
[
CATransaction
commit
];
self
.
hasVideo
=
YES
;
}
}
-
(
void
)
removeVoutLayer
:(
CALayer
*
)
voutLayer
-
(
void
)
removeVoutLayer
:(
CALayer
*
)
voutLayer
...
@@ -152,6 +160,7 @@
...
@@ -152,6 +160,7 @@
[
CATransaction
begin
];
[
CATransaction
begin
];
[
voutLayer
removeFromSuperlayer
];
[
voutLayer
removeFromSuperlayer
];
[
CATransaction
commit
];
[
CATransaction
commit
];
self
.
hasVideo
=
NO
;
}
}
@end
@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