diff options
author | Sho Amano <samano@xevo.com> | 2017-08-28 20:12:22 +0900 |
---|---|---|
committer | Sho Amano <samano@xevo.com> | 2017-08-28 20:12:22 +0900 |
commit | afecd283f0e65c47e43d9d47c67753575caeb675 (patch) | |
tree | 0315a9a04ae10050a61f62d96d9f631feb9e21f1 | |
parent | e2f4b79478713152233d8893b0b93f130db897b0 (diff) | |
download | sdl_ios-afecd283f0e65c47e43d9d47c67753575caeb675.tar.gz |
Add NS_ASSUME_NONNULL_BEGIN / NS_ASSUME_NONNULL_END
Reflecting code review comments.
-rw-r--r-- | SmartDeviceLink/SDLH264ByteStreamPacketizer.h | 6 | ||||
-rw-r--r-- | SmartDeviceLink/SDLH264ByteStreamPacketizer.m | 6 | ||||
-rw-r--r-- | SmartDeviceLink/SDLH264Packetizer.h | 6 | ||||
-rw-r--r-- | SmartDeviceLink/SDLRTPH264Packetizer.h | 6 | ||||
-rw-r--r-- | SmartDeviceLink/SDLRTPH264Packetizer.m | 6 |
5 files changed, 25 insertions, 5 deletions
diff --git a/SmartDeviceLink/SDLH264ByteStreamPacketizer.h b/SmartDeviceLink/SDLH264ByteStreamPacketizer.h index c70c00549..ee3a671b7 100644 --- a/SmartDeviceLink/SDLH264ByteStreamPacketizer.h +++ b/SmartDeviceLink/SDLH264ByteStreamPacketizer.h @@ -9,6 +9,8 @@ #import <Foundation/Foundation.h> #import "SDLH264Packetizer.h" +NS_ASSUME_NONNULL_BEGIN + @interface SDLH264ByteStreamPacketizer : NSObject <SDLH264Packetizer> /** @@ -27,6 +29,8 @@ * @note This packetizer consolidates all NAL units into one NSData object * to keep compatibility with previous implementation. */ -- (NSArray *)createPackets:(NSArray *)nalUnits pts:(double)pts; +- (nullable NSArray *)createPackets:(NSArray *)nalUnits pts:(double)pts; @end + +NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLH264ByteStreamPacketizer.m b/SmartDeviceLink/SDLH264ByteStreamPacketizer.m index d3528528d..bd237fd71 100644 --- a/SmartDeviceLink/SDLH264ByteStreamPacketizer.m +++ b/SmartDeviceLink/SDLH264ByteStreamPacketizer.m @@ -9,6 +9,8 @@ #import <Foundation/Foundation.h> #import "SDLH264ByteStreamPacketizer.h" +NS_ASSUME_NONNULL_BEGIN + @interface SDLH264ByteStreamPacketizer () <SDLH264Packetizer> @property (nonatomic) NSData *startCode; @end @@ -25,7 +27,7 @@ return self; } -- (NSArray *)createPackets:(NSArray *)nalUnits pts:(double)pts { +- (nullable NSArray *)createPackets:(NSArray *)nalUnits pts:(double)pts { NSMutableArray *array = [NSMutableArray arrayWithCapacity:1]; NSMutableData *elementaryStream = [NSMutableData data]; @@ -40,3 +42,5 @@ } @end + +NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLH264Packetizer.h b/SmartDeviceLink/SDLH264Packetizer.h index 5327022ef..8635cdd16 100644 --- a/SmartDeviceLink/SDLH264Packetizer.h +++ b/SmartDeviceLink/SDLH264Packetizer.h @@ -8,6 +8,8 @@ #import <Foundation/Foundation.h> +NS_ASSUME_NONNULL_BEGIN + @protocol SDLH264Packetizer /** @@ -22,6 +24,8 @@ * All NAL units that belongs to a frame should be included in * nalUnits array. */ -- (NSArray *)createPackets:(NSArray *)nalUnits pts:(double)pts; +- (nullable NSArray *)createPackets:(NSArray *)nalUnits pts:(double)pts; @end + +NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLRTPH264Packetizer.h b/SmartDeviceLink/SDLRTPH264Packetizer.h index c5a76bc3c..b851e95a9 100644 --- a/SmartDeviceLink/SDLRTPH264Packetizer.h +++ b/SmartDeviceLink/SDLRTPH264Packetizer.h @@ -9,6 +9,8 @@ #import <Foundation/Foundation.h> #import "SDLH264Packetizer.h" +NS_ASSUME_NONNULL_BEGIN + @interface SDLRTPH264Packetizer : NSObject <SDLH264Packetizer> /** @@ -42,6 +44,8 @@ * All NAL units that belongs to a frame should be included in * nalUnits array. */ -- (NSArray *)createPackets:(NSArray *)nalUnits pts:(double)pts; +- (nullable NSArray *)createPackets:(NSArray *)nalUnits pts:(double)pts; @end + +NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLRTPH264Packetizer.m b/SmartDeviceLink/SDLRTPH264Packetizer.m index 31934c4fa..ca44b9207 100644 --- a/SmartDeviceLink/SDLRTPH264Packetizer.m +++ b/SmartDeviceLink/SDLRTPH264Packetizer.m @@ -42,6 +42,8 @@ static inline void writeLongInNBO(UInt8 *p, UInt32 value) { p[3] = value & 0xFF; } +NS_ASSUME_NONNULL_BEGIN + @interface SDLRTPH264Packetizer () <SDLH264Packetizer> @property (assign, nonatomic) UInt32 initialTimestamp; @property (assign, nonatomic) UInt16 sequenceNum; @@ -69,7 +71,7 @@ static inline void writeLongInNBO(UInt8 *p, UInt32 value) { } } -- (NSArray *)createPackets:(NSArray *)nalUnits pts:(double)pts { +- (nullable NSArray *)createPackets:(NSArray *)nalUnits pts:(double)pts { NSMutableArray *rtpFrames = [NSMutableArray array]; NSUInteger nalUnitsCount = [nalUnits count]; @@ -181,3 +183,5 @@ static inline void writeLongInNBO(UInt8 *p, UInt32 value) { } @end + +NS_ASSUME_NONNULL_END |