summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/SDLH264Packetizer.h
diff options
context:
space:
mode:
authorSho Amano <samano@xevo.com>2017-04-14 20:13:47 +0900
committerSho Amano <samano@xevo.com>2017-08-23 15:11:35 +0900
commit07f9f71a56d79bab7493d3488c10da51ebd407aa (patch)
treea376dba4588aa63f283417dee278ce16daee451b /SmartDeviceLink/SDLH264Packetizer.h
parent2a68f4bfd314211c79b9e5eb893f1d8de954f944 (diff)
downloadsdl_ios-07f9f71a56d79bab7493d3488c10da51ebd407aa.tar.gz
Extract H.264 ByteStream packetizer from SDLVideoEncoder
Diffstat (limited to 'SmartDeviceLink/SDLH264Packetizer.h')
-rw-r--r--SmartDeviceLink/SDLH264Packetizer.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/SmartDeviceLink/SDLH264Packetizer.h b/SmartDeviceLink/SDLH264Packetizer.h
new file mode 100644
index 000000000..5327022ef
--- /dev/null
+++ b/SmartDeviceLink/SDLH264Packetizer.h
@@ -0,0 +1,27 @@
+//
+// SDLH264Packetizer.h
+// SmartDeviceLink-iOS
+//
+// Created by Sho Amano on 4/11/17.
+// Copyright © 2017 Xevo Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@protocol SDLH264Packetizer
+
+/**
+ * Creates packets from given H.264 NAL units and presentation timestamp.
+ *
+ * @param nalUnits List of NAL units to create packets.
+ * @param pts Presentation timestamp associated to the NAL units, in seconds.
+ *
+ * @return List of NSData. Each NSData holds a packet.
+ *
+ * @note This method cannot be called more than once with same pts value.
+ * All NAL units that belongs to a frame should be included in
+ * nalUnits array.
+ */
+- (NSArray *)createPackets:(NSArray *)nalUnits pts:(double)pts;
+
+@end