Permalink
Browse files

Add ReGift

  • Loading branch information...
1 parent 9fecfae commit 8f4e093e5263cf375e05e302aee88392ce634dd0 @onmyway133 committed Mar 2, 2017

Large diffs are not rendered by default.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -782,7 +782,6 @@
</view>
<connections>
<outlet property="bottomBox" destination="75W-Fc-kTw" id="xUH-P5-KQc"/>
- <outlet property="bottomView" destination="9oc-hO-DER" id="jbA-25-pkg"/>
<outlet property="heightTextField" destination="fvq-ew-ueG" id="EIa-GT-g3U"/>
<outlet property="recordButton" destination="sI1-mv-qbT" id="OfQ-bF-LIm"/>
<outlet property="stopButton" destination="DUo-9A-BPE" id="Etv-y1-0At"/>
@@ -83,5 +83,7 @@ extension CameraMan: AVCaptureFileOutputRecordingDelegate {
func capture(_ captureOutput: AVCaptureFileOutput!, didFinishRecordingToOutputFileAt outputFileURL: URL!, fromConnections connections: [Any]!, error: Error!) {
+ let converter = Converter()
+ converter.convert(videoUrl: outputFileURL)
}
}
View
@@ -0,0 +1,19 @@
+//
+// Converter.swift
+// GifCapture
+//
+// Created by Khoa Pham on 02/03/2017.
+// Copyright © 2017 Fantageek. All rights reserved.
+//
+
+import Foundation
+import Regift
+
+struct Converter {
+
+ func convert(videoUrl: URL) {
+ Regift.createGIFFromSource(videoUrl, frameCount: 24, delayTime: 0) { (result) in
+ print("Gif saved to \(result)")
+ }
+ }
+}
View
14 Podfile
@@ -0,0 +1,14 @@
+target 'GifCapture' do
+ use_frameworks!
+
+ pod 'Regift', '~> 1.3'
+
+ target 'GifCaptureTests' do
+ inherit! :search_paths
+ end
+
+ target 'GifCaptureUITests' do
+ inherit! :search_paths
+ end
+
+end
View
@@ -0,0 +1,12 @@
+PODS:
+ - Regift (1.3.0)
+
+DEPENDENCIES:
+ - Regift (~> 1.3)
+
+SPEC CHECKSUMS:
+ Regift: 43c5e057949a9e2b16de0bcf0a221a5dbd033211
+
+PODFILE CHECKSUM: b24bde26b211ae94cf275ae7dd2b538c7f53c11f
+
+COCOAPODS: 1.2.0

0 comments on commit 8f4e093

Please sign in to comment.