18 Commits

Author SHA1 Message Date
Ahmed Bekhit 959883ea03 Update README.md 2020-01-10 13:44:06 -05:00
Ahmed Bekhit 56ed236c31 Update version and pods 2020-01-10 12:56:05 -05:00
Ahmed Bekhit d7875a1b5b Release 1.5.11 2020-01-10 12:46:38 -05:00
Ahmed Bekhit d636abbe7e Release 1.5.11 2020-01-10 12:46:04 -05:00
Ahmed Bekhit 7124b79549 Update podspec file 2020-01-10 12:42:07 -05:00
Ahmed Bekhit eddae7758c Update README.md 2019-03-06 10:38:52 -05:00
Ahmed Bekhit 08ad254271 Update README.md 2019-03-06 10:38:28 -05:00
Ahmed Bekhit 720c1af699 Update README.md 2019-03-06 10:36:55 -05:00
Ahmed Bekhit e134ab9792 Update README.md 2019-03-06 10:35:40 -05:00
Ahmed Bekhit e9c7cfaaca Update README.md 2019-03-01 17:07:27 -05:00
Ahmed Bekhit 2f40c3d9f0 Update README.md 2019-03-01 17:06:33 -05:00
Ahmed Bekhit de62d34b9e Update README.md 2019-02-20 14:23:55 -05:00
Ahmed Bekhit fe093e65d6 Update README.md 2019-02-20 14:23:07 -05:00
AFathi b05e744dc6 minor performance improvements 2019-01-12 21:32:35 -05:00
AFathi c51fc0db85 iPhone X+ fixes 2018-12-17 12:02:01 -05:00
AFathi 61415aa9aa iPhone X+ fixes 2018-12-17 12:01:35 -05:00
AFathi b89bd27d59 few changes 2018-12-17 11:58:01 -05:00
Ahmed Bekhit 6037aa9619 Update README.md 2018-09-20 12:03:54 -04:00
8 changed files with 28 additions and 23 deletions
-1
View File
@@ -1 +0,0 @@
echo "4.0" > .swift-version
+5 -2
View File
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "ARVideoKit"
s.version = "1.3"
s.version = "1.5.12"
s.summary = "Capture & record ARKit videos 📹, photos 🌄, Live Photos 🎇, and GIFs 🎆."
s.description = "Enabling developers to capture videos 📹, photos 🌄, Live Photos 🎇, and GIFs 🎆 with augmented reality components."
s.homepage = "https://github.com/AFathi/ARVideoKit"
@@ -16,7 +16,10 @@ Pod::Spec.new do |s|
s.platform = :ios, "11.0"
s.source = { :git => "https://github.com/AFathi/ARVideoKit.git", :tag => "1.3" }
# ARVideoKit for Swift 4.0
s.source = { :git => "https://github.com/AFathi/ARVideoKit.git", :tag => "1.5.12" }
s.source_files = "ARVideoKit", "ARVideoKit/**/*.{h,m,swift}"
s.resources = "ARVideoKit/Assets/*.scnassets"
s.swift_version = '4.0'
end
@@ -18,7 +18,7 @@ import Photos
* [Email](mailto:me@ahmedbekhit.com)
*/
@available(iOS 9.1, *)
@objc public class PHLivePhotoPlus: PHLivePhoto {
@objc public class PHLivePhotoPlus: NSObject {
var pairedVideoPath: URL?
var keyPhotoPath: URL?
+2
View File
@@ -93,7 +93,9 @@ struct RenderAR {
} else {
renderedFrame = renderEngine.snapshot(atTime: time, with: size, antialiasingMode: .none)
}
guard let buffer = renderedFrame!.buffer else { return nil }
return buffer
} else if view is ARSKView {
guard let size = bufferSize else { return nil }
+9 -8
View File
@@ -33,9 +33,9 @@ class WritAR: NSObject, AVCaptureAudioDataOutputSampleBufferDelegate {
do {
assetWriter = try AVAssetWriter(outputURL: output, fileType: AVFileType.mp4)
} catch {
// FIXME: handle when failed to allocate AVAssetWriter.
return
fatalError("An error occurred while intializing an AVAssetWriter")
}
if audioEnabled {
if allowMix {
let audioOptions: AVAudioSessionCategoryOptions = [.mixWithOthers , .allowBluetooth, .defaultToSpeaker, .interruptSpokenAudioAndMixWithOthers]
@@ -57,15 +57,15 @@ class WritAR: NSObject, AVCaptureAudioDataOutputSampleBufferDelegate {
AVVideoHeightKey: height as AnyObject
]
let attributes: [String: Bool] = [
kCVPixelBufferCGImageCompatibilityKey as String: true,
kCVPixelBufferCGBitmapContextCompatibilityKey as String: true
]
// let attributes: [String: Bool] = [
// kCVPixelBufferCGImageCompatibilityKey as String: true,
// kCVPixelBufferCGBitmapContextCompatibilityKey as String: true
// ]
videoInput = AVAssetWriterInput(mediaType: .video, outputSettings: videoOutputSettings)
videoInput.expectsMediaDataInRealTime = true
pixelBufferInput = AVAssetWriterInputPixelBufferAdaptor(assetWriterInput: videoInput, sourcePixelBufferAttributes: attributes)
pixelBufferInput = AVAssetWriterInputPixelBufferAdaptor(assetWriterInput: videoInput, sourcePixelBufferAttributes: nil)
var angleEnabled: Bool {
for v in orientaions {
if UIDevice.current.orientation.rawValue == v.rawValue {
@@ -141,6 +141,7 @@ class WritAR: NSObject, AVCaptureAudioDataOutputSampleBufferDelegate {
if session.canAddInput(audioDeviceInput!) {
session.addInput(audioDeviceInput!)
}
if session.canAddOutput(audioDataOutput) {
session.addOutput(audioDataOutput)
}
+2 -2
View File
@@ -34,11 +34,11 @@ private var renderer: RenderAR!
/**
An object that passes the AR recorder errors and status in the protocol methods.
*/
@objc public var delegate: RecordARDelegate?
@objc public weak var delegate: RecordARDelegate?
/**
An object that passes the AR rendered content in the protocol method.
*/
@objc public var renderAR: RenderARDelegate?
@objc public weak var renderAR: RenderARDelegate?
/**
An object that returns the AR recorder current status.
*/
@@ -418,7 +418,7 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = P5DZ3XQ9FJ;
DEVELOPMENT_TEAM = LXD85S9DW4;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)",
@@ -440,7 +440,7 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = P5DZ3XQ9FJ;
DEVELOPMENT_TEAM = LXD85S9DW4;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)",
+7 -7
View File
@@ -1,4 +1,7 @@
> An update for Swift 4.2 is coming soon :) -Ahmed
# Swift 4.0 Branch
> Use [swift_4_2](https://github.com/AFathi/ARVideoKit/tree/swift_4_2) branch for projects written in Swift 4.2
> [swift_4_2](https://github.com/AFathi/ARVideoKit/tree/swift_4_2) branch has been set as the default branch for `ARVideoKit` as of March 6th, 2019.
![intro image](http://www.ahmedbekhit.com/projects/repo-header-arvideokit.png)
@@ -52,9 +55,9 @@ To try the example project, simply clone this repository and open the `Examples`
## Installation
### Cocoapods
1. Add this line to your project's `Podfile`
1. Add this line to your project's `Podfile` (for Swift 4.0)
```
pod 'ARVideoKit'
pod 'ARVideoKit', '~> 1.5.12'
```
2. Install the pod
```
@@ -72,10 +75,7 @@ $ carthage update
```
### Manual
Drag the `ARVideoKit.framework` file as an embedded binary of your project targets. `ARVideoKit.framework` can be found in the `/Framework Build/` folder of this repository.
![Tutorial](http://www.ahmedbekhit.com/arvideokit_install_new.gif)
Or you may drag `ARVideoKit.xcodeproj` into your project and click the **+** button in the embedded binaries section of your project's target.
Drag `ARVideoKit.xcodeproj` into your project and click the **+** button in the embedded binaries section of your project's target.
![example embed framework](http://www.ahmedbekhit.com/embeddedBinary.png)
## Implementation
### Swift