[vlc-devel] [PATCH 04/13] VLCKit: migrate VLCVideoLayer to ARC

Florent Pillet fpillet at gmail.com
Mon Jul 7 12:41:19 CEST 2014


---
 Headers/Public/VLCVideoLayer.h |  9 +++------
 Sources/VLCVideoLayer.m        | 19 ++++++-------------
 2 files changed, 9 insertions(+), 19 deletions(-)

diff --git a/Headers/Public/VLCVideoLayer.h b/Headers/Public/VLCVideoLayer.h
index a50ddf1..99221c1 100644
--- a/Headers/Public/VLCVideoLayer.h
+++ b/Headers/Public/VLCVideoLayer.h
@@ -25,11 +25,8 @@
 #import <QuartzCore/QuartzCore.h>
 
 @interface VLCVideoLayer : CALayer
-{
-    BOOL hasVideo;
-}
 
-/* Properties */
- at property (readonly) BOOL hasVideo;
- at property BOOL fillScreen;
+ at property (nonatomic, readonly) BOOL hasVideo;
+ at property (nonatomic) BOOL fillScreen;
+
 @end
diff --git a/Sources/VLCVideoLayer.m b/Sources/VLCVideoLayer.m
index d40ef6f..9691be9 100644
--- a/Sources/VLCVideoLayer.m
+++ b/Sources/VLCVideoLayer.m
@@ -38,16 +38,15 @@
 #import <QuartzCore/QuartzCore.h>
 
 /******************************************************************************
- * VLCVideoView (Private)
+ * VLCVideoLayer (Private)
  */
 
- at interface VLCVideoLayer (Private)
-/* Method */
+ at interface VLCVideoLayer ()
+
+ at property (nonatomic, readwrite) BOOL hasVideo;
+
 - (void)addVoutLayer:(CALayer *)aLayer;
- at end
 
- at interface VLCVideoLayer ()
- at property (readwrite) BOOL hasVideo;
 @end
 
 /******************************************************************************
@@ -55,7 +54,6 @@
  */
 
 @implementation VLCVideoLayer
- at synthesize hasVideo;
 
 - (BOOL)fillScreen
 {
@@ -68,15 +66,10 @@
     [self setNeedsLayout];
 }
 
- at end
-
 /******************************************************************************
  * Implementation VLCVideoLayer  (Private)
  */
 
- at implementation VLCVideoLayer (Private)
-
-
 /* This is called by the libvlc module 'opengllayer' as soon as there is one
  * vout available
  */
@@ -109,7 +102,7 @@
 
     /* Trigger by hand, as it doesn't go through else. Assumed bug from Cocoa */
     [self willChangeValueForKey:@"hasVideo"];
-    self.hasVideo = NO;
+    _hasVideo = NO;
     [self didChangeValueForKey:@"hasVideo"];
 }
 
-- 
1.8.5.2 (Apple Git-48)




More information about the vlc-devel mailing list