Преглед на файлове

VLCKit: migrate VLCVideoLayer to ARC

Signed-off-by: Felix Paul Kühne <fkuehne@videolan.org>
Florent Pillet преди 11 години
родител
ревизия
cc800957bd
променени са 2 файла, в които са добавени 9 реда и са изтрити 19 реда
  1. 3 6
      Headers/Public/VLCVideoLayer.h
  2. 6 13
      Sources/VLCVideoLayer.m

+ 3 - 6
Headers/Public/VLCVideoLayer.h

@@ -25,11 +25,8 @@
 #import <QuartzCore/QuartzCore.h>
 
 @interface VLCVideoLayer : CALayer
-{
-    BOOL hasVideo;
-}
 
-/* Properties */
-@property (readonly) BOOL hasVideo;
-@property BOOL fillScreen;
+@property (nonatomic, readonly) BOOL hasVideo;
+@property (nonatomic) BOOL fillScreen;
+
 @end

+ 6 - 13
Sources/VLCVideoLayer.m

@@ -38,16 +38,15 @@
 #import <QuartzCore/QuartzCore.h>
 
 /******************************************************************************
- * VLCVideoView (Private)
+ * VLCVideoLayer (Private)
  */
 
-@interface VLCVideoLayer (Private)
-/* Method */
+@interface VLCVideoLayer ()
+
+@property (nonatomic, readwrite) BOOL hasVideo;
+
 - (void)addVoutLayer:(CALayer *)aLayer;
-@end
 
-@interface VLCVideoLayer ()
-@property (readwrite) BOOL hasVideo;
 @end
 
 /******************************************************************************
@@ -55,7 +54,6 @@
  */
 
 @implementation VLCVideoLayer
-@synthesize hasVideo;
 
 - (BOOL)fillScreen
 {
@@ -68,15 +66,10 @@
     [self setNeedsLayout];
 }
 
-@end
-
 /******************************************************************************
  * Implementation VLCVideoLayer  (Private)
  */
 
-@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"];
 }