diff --git a/StreamingKit/StreamingKit/NSMutableArray+STKAudioPlayer.h b/StreamingKit/StreamingKit/NSMutableArray+STKAudioPlayer.h index 12ca839..1e4de5f 100644 --- a/StreamingKit/StreamingKit/NSMutableArray+STKAudioPlayer.h +++ b/StreamingKit/StreamingKit/NSMutableArray+STKAudioPlayer.h @@ -8,10 +8,14 @@ #import +NS_ASSUME_NONNULL_BEGIN + @interface NSMutableArray (STKAudioPlayer) -(void) enqueue:(id)obj; -(void) skipQueue:(id)obj; -(void) skipQueueWithQueue:(NSMutableArray*)queue; --(id) dequeue; --(id) peek; +-(nullable id) dequeue; +-(nullable id) peek; @end + +NS_ASSUME_NONNULL_END diff --git a/StreamingKit/StreamingKit/STKAudioPlayer.h b/StreamingKit/StreamingKit/STKAudioPlayer.h index c6d429c..a1ff3b5 100644 --- a/StreamingKit/StreamingKit/STKAudioPlayer.h +++ b/StreamingKit/StreamingKit/STKAudioPlayer.h @@ -44,6 +44,8 @@ #include "UIKit/UIApplication.h" #endif +NS_ASSUME_NONNULL_BEGIN + typedef NS_OPTIONS(NSInteger, STKAudioPlayerState) { STKAudioPlayerStateReady, @@ -151,13 +153,13 @@ typedef void(^STKFrameFilter)(UInt32 channelsPerFrame, UInt32 bytesPerFrame, UIn /// Enables or disables the EQ @property (readwrite) BOOL equalizerEnabled; /// Returns an array of STKFrameFilterEntry objects representing the filters currently in use -@property (readonly) NSArray* frameFilters; +@property (readonly, nullable) NSArray* frameFilters; /// Returns the items pending to be played (includes buffering and upcoming items but does not include the current item) @property (readonly) NSArray* pendingQueue; /// The number of items pending to be played (includes buffering and upcoming items but does not include the current item) @property (readonly) NSUInteger pendingQueueCount; /// Gets the most recently queued item that is still pending to play -@property (readonly) NSObject* mostRecentlyQueuedStillPendingItem; +@property (readonly, nullable) NSObject* mostRecentlyQueuedStillPendingItem; /// Gets the current state of the player @property (readwrite) STKAudioPlayerState state; /// Gets the options provided to the player on startup @@ -254,7 +256,7 @@ typedef void(^STKFrameFilter)(UInt32 channelsPerFrame, UInt32 bytesPerFrame, UIn /// Appends a frame filter with the given name and filter block just after the filter with the given name. /// If the given name is nil, the filter will be inserted at the beginning of the filter change --(void) addFrameFilterWithName:(NSString*)name afterFilterWithName:(NSString*)afterFilterWithName block:(STKFrameFilter)block; +-(void) addFrameFilterWithName:(NSString*)name afterFilterWithName:(nullable NSString*)afterFilterWithName block:(STKFrameFilter)block; /// Reads the peak power in decibals for the given channel (0 or 1). /// Return values are between -60 (low) and 0 (high). @@ -268,3 +270,5 @@ typedef void(^STKFrameFilter)(UInt32 channelsPerFrame, UInt32 bytesPerFrame, UIn -(void) setGain:(float)gain forEqualizerBand:(int)bandIndex; @end + +NS_ASSUME_NONNULL_END diff --git a/StreamingKit/StreamingKit/STKAutoRecoveringHTTPDataSource.h b/StreamingKit/StreamingKit/STKAutoRecoveringHTTPDataSource.h index f9813ba..bab707b 100644 --- a/StreamingKit/StreamingKit/STKAutoRecoveringHTTPDataSource.h +++ b/StreamingKit/StreamingKit/STKAutoRecoveringHTTPDataSource.h @@ -36,6 +36,8 @@ #import "STKHTTPDataSource.h" #import "STKDataSourceWrapper.h" +NS_ASSUME_NONNULL_BEGIN + typedef struct { int watchdogPeriodSeconds; @@ -50,3 +52,5 @@ STKAutoRecoveringHTTPDataSourceOptions; @property (readonly) STKHTTPDataSource* innerDataSource; @end + +NS_ASSUME_NONNULL_END diff --git a/StreamingKit/StreamingKit/STKCoreFoundationDataSource.h b/StreamingKit/StreamingKit/STKCoreFoundationDataSource.h index b25a72e..b1dd325 100644 --- a/StreamingKit/StreamingKit/STKCoreFoundationDataSource.h +++ b/StreamingKit/StreamingKit/STKCoreFoundationDataSource.h @@ -34,6 +34,8 @@ #import "STKDataSource.h" +NS_ASSUME_NONNULL_BEGIN + @class STKCoreFoundationDataSource; @interface CoreFoundationDataSourceClientInfo : NSObject @@ -62,3 +64,5 @@ -(CFStreamStatus) status; @end + +NS_ASSUME_NONNULL_END diff --git a/StreamingKit/StreamingKit/STKDataSource.h b/StreamingKit/StreamingKit/STKDataSource.h index 8ca4150..0a1e716 100755 --- a/StreamingKit/StreamingKit/STKDataSource.h +++ b/StreamingKit/StreamingKit/STKDataSource.h @@ -35,6 +35,8 @@ #import #include +NS_ASSUME_NONNULL_BEGIN + @class STKDataSource; @protocol STKDataSourceDelegate @@ -50,8 +52,8 @@ @property (readonly) SInt64 length; @property (readonly) BOOL hasBytesAvailable; @property (nonatomic, readwrite, assign) double durationHint; -@property (readwrite, unsafe_unretained) id delegate; -@property (nonatomic, strong) NSURL *recordToFileUrl; +@property (readwrite, unsafe_unretained, nullable) id delegate; +@property (nonatomic, strong, nullable) NSURL *recordToFileUrl; -(BOOL) registerForEvents:(NSRunLoop*)runLoop; -(void) unregisterForEvents; @@ -62,3 +64,5 @@ -(AudioFileTypeID) audioFileTypeHint; @end + +NS_ASSUME_NONNULL_END diff --git a/StreamingKit/StreamingKit/STKDataSourceWrapper.h b/StreamingKit/StreamingKit/STKDataSourceWrapper.h index d91e9e5..cde9b73 100644 --- a/StreamingKit/StreamingKit/STKDataSourceWrapper.h +++ b/StreamingKit/StreamingKit/STKDataSourceWrapper.h @@ -34,6 +34,8 @@ #import "STKDataSource.h" +NS_ASSUME_NONNULL_BEGIN + @interface STKDataSourceWrapper : STKDataSource -(instancetype) initWithDataSource:(STKDataSource*)innerDataSource; @@ -41,3 +43,5 @@ @property (readonly) STKDataSource* innerDataSource; @end + +NS_ASSUME_NONNULL_END diff --git a/StreamingKit/StreamingKit/STKHTTPDataSource.h b/StreamingKit/StreamingKit/STKHTTPDataSource.h index d1cc366..691bbff 100644 --- a/StreamingKit/StreamingKit/STKHTTPDataSource.h +++ b/StreamingKit/StreamingKit/STKHTTPDataSource.h @@ -34,10 +34,12 @@ #import "STKCoreFoundationDataSource.h" +NS_ASSUME_NONNULL_BEGIN + @class STKHTTPDataSource; typedef void(^STKURLBlock)(NSURL* url); -typedef NSURL*(^STKURLProvider)(); +typedef NSURL* _Nonnull (^STKURLProvider)(); typedef void(^STKAsyncURLProvider)(STKHTTPDataSource* dataSource, BOOL forSeek, STKURLBlock callback); @interface STKHTTPDataSource : STKCoreFoundationDataSource @@ -54,3 +56,5 @@ typedef void(^STKAsyncURLProvider)(STKHTTPDataSource* dataSource, BOOL forSeek, -(void) reconnect; @end + +NS_ASSUME_NONNULL_END diff --git a/StreamingKit/StreamingKit/STKLocalFileDataSource.h b/StreamingKit/StreamingKit/STKLocalFileDataSource.h index ee918c7..581f42d 100644 --- a/StreamingKit/StreamingKit/STKLocalFileDataSource.h +++ b/StreamingKit/StreamingKit/STKLocalFileDataSource.h @@ -34,6 +34,8 @@ #import "STKCoreFoundationDataSource.h" +NS_ASSUME_NONNULL_BEGIN + @interface STKLocalFileDataSource : STKCoreFoundationDataSource +(AudioFileTypeID) audioFileTypeHintFromFileExtension:(NSString*)fileExtension; @@ -41,3 +43,5 @@ -(instancetype) initWithFilePath:(NSString*)filePath; @end + +NS_ASSUME_NONNULL_END diff --git a/StreamingKit/StreamingKit/STKQueueEntry.h b/StreamingKit/StreamingKit/STKQueueEntry.h index a5fa781..f13d277 100755 --- a/StreamingKit/StreamingKit/STKQueueEntry.h +++ b/StreamingKit/StreamingKit/STKQueueEntry.h @@ -10,6 +10,8 @@ #import "libkern/OSAtomic.h" #import "AudioToolbox/AudioToolbox.h" +NS_ASSUME_NONNULL_BEGIN + @interface STKQueueEntry : NSObject { @public @@ -43,4 +45,6 @@ -(double) calculatedBitRate; -(BOOL) isDefinitelyCompatible:(AudioStreamBasicDescription*)basicDescription; -@end \ No newline at end of file +@end + +NS_ASSUME_NONNULL_END