motion-capture 1.2.4 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/project/motion-capture.rb +11 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01995d1b733c94c5488a143581561388ba1a1da4
|
4
|
+
data.tar.gz: ed9d092385cff36b92ea2e3abca95fcb072b3411
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 265a593eba5add1be3cd5452ed61b73668a35165f1ed4388ac5a31db97d1c3744dbf803bb415258d49b9399e8f484f40ac9b683d38d190520ee2e9417515e932
|
7
|
+
data.tar.gz: cc94fe1e5cae8c9843cbc8bfde0833b403999523eb6dd8620df61479172002376a0d045a4a5bc0badbd1c8a10dd0a8785345205498c22861c4d00c4b8dbf4eba
|
@@ -147,10 +147,20 @@ module Motion; class Capture
|
|
147
147
|
|
148
148
|
def still_image_connection
|
149
149
|
still_image_output.connectionWithMediaType(AVMediaTypeVideo).tap do |connection|
|
150
|
-
|
150
|
+
device_orientation = UIDevice.currentDevice.orientation
|
151
|
+
video_orientation = orientation_mapping.fetch(device_orientation, AVCaptureVideoOrientationPortrait)
|
152
|
+
|
153
|
+
connection.setVideoOrientation(video_orientation) if connection.videoOrientationSupported?
|
151
154
|
end
|
152
155
|
end
|
153
156
|
|
157
|
+
def orientation_mapping
|
158
|
+
{ UIDeviceOrientationPortrait => AVCaptureVideoOrientationPortrait,
|
159
|
+
UIDeviceOrientationPortraitUpsideDown => AVCaptureVideoOrientationPortraitUpsideDown,
|
160
|
+
UIDeviceOrientationLandscapeRight => AVCaptureVideoOrientationLandscapeRight,
|
161
|
+
UIDeviceOrientationLandscapeLeft => AVCaptureVideoOrientationLandscapeLeft }
|
162
|
+
end
|
163
|
+
|
154
164
|
def assets_library
|
155
165
|
@assets_library ||= ALAssetsLibrary.alloc.init
|
156
166
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: motion-capture
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Devon Blandin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|