Skip to content

Commit

Permalink
Horizon SDK 2.5
Browse files Browse the repository at this point in the history
* Fixed main thread accessing bug
* Added new methods that allow developers to set a
specific AVCaptureDevice object as an active device
instead of just specifying the resolution. That gives
developers the ability to pass the new lenses of the
iPhone Plus and iPhone X device models to the SDK.
* Introduced a new method for setting the outputMovieSize
called `-(BOOL)setOutputMovieSize:error:` that reports
whether the set has been successful or not.
* Updated documentation.
* Various bug fixes and performance optimizations.
  • Loading branch information
Stelios Petrakis committed Nov 18, 2017
1 parent 5ca620a commit bf5288a
Show file tree
Hide file tree
Showing 64 changed files with 771 additions and 49 deletions.
2 changes: 1 addition & 1 deletion HorizonSDK.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'HorizonSDK'
s.version = '2.4'
s.version = '2.5'
s.license = { :type => 'Commercial', :text => "See https://horizon.camera/sdk/termsofservice" }
s.homepage = 'https://horizon.camera/sdk/'
s.documentation_url = 'https://horizon.camera/sdk/docs/'
Expand Down
Binary file modified HorizonSDK/HorizonSDK.framework/HVTCameraController.nib
Binary file not shown.
Binary file modified HorizonSDK/HorizonSDK.framework/HVTCameraPlaybackController.nib
Binary file not shown.
53 changes: 53 additions & 0 deletions HorizonSDK/HorizonSDK.framework/Headers/HVTCamera.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,33 @@
The default value matches the cameraResolution, until set explicetely via this property.
outputMovieSize cannot be set if the captureMode is set to HVTCaptureModePhoto.
@see setOutputMovieSize:error: For a more fine grained control on whether the
property has been successfully set or not.
It is recommended that you call this property setter (or the `setOutputMovieSize:error:`
method after setting up the resolution.
*/
@property (nonatomic) CGSize outputMovieSize;

/**
Specifies the output movie size of the final video file,
providing more info about whether the method had succeeded or not.
For example outputMovieSize cannot be set if the captureMode is set
to HVTCaptureModePhoto. If you call just the property setter (`setOutputMovieSize:`)
you will not get an error if the method doesn't allow you to set this
property while in photo mode.
This method will return NO and provide
and NSError about it.
@param outputMovieSize The desired output movie size
@param outError The error object in case that setting the size was unsuccessful
@return YES if the outputMovieSize has been set, NO otherwise
*/
- (BOOL)setOutputMovieSize:(CGSize)outputMovieSize error:(NSError **)outError;

/**
Reports whether the instance is currently recording video or not.
Expand Down Expand Up @@ -533,6 +557,35 @@
*/
- (BOOL)setCameraPosition:(AVCaptureDevicePosition)newPosition withResolution:(CGSize)cameraResolution frameRate:(int)frameRate error:(NSError **)outError;

/**
Sets a specific camera device provided by the user.
@warning If you call the method while the receiver isRunning, a connection to the new cameraDevice will be established, which
can take some time. The call will block until the connection has been established.
@param captureDevice The new capture device
@param outError The output error
@return `YES` if the camera device has been changed and `NO` if there was an error while changing the camera device
*/
- (BOOL)setCaptureDevice:(AVCaptureDevice *)captureDevice error:(NSError **)outError;

/**
Sets a specific camera device with a given resolution and framerate provided by the user.
@warning If you call the method while the receiver isRunning, a connection to the new cameraDevice will be established, which
can take some time. The call will block until the connection has been established.
@param captureDevice The new capture device
@param cameraResolution The new camera resolution.
@param frameRate The new frame rate.
@param outError The output error.
@return `YES` if the camera resolution has been changed and `NO` if there was an error while changing the camera resolution
(check outError for more).
*/
- (BOOL)setCaptureDevice:(AVCaptureDevice *)captureDevice resolution:(CGSize)cameraResolution frameRate:(int)frameRate error:(NSError **)outError;

#pragma mark Video Stabilization Settings
/**----------------------------------------------------------------------
* @name Managing the Video Stabilization Settings
Expand Down
4 changes: 4 additions & 0 deletions HorizonSDK/HorizonSDK.framework/Headers/HVTVars.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ typedef NS_ENUM(NSInteger, HVTErrorCode) {
HVTErrorPhotoModeNotEnabled = -3305,
/** HDR not supported by the device, or the camera is not currently in photo mode.*/
HVTErrorPhotoHDRNotSupported = -3306,
/** Capture device was not provided. */
HVTErrorCaptureDeviceNotProvided = -3307,
/** Video mode was not active during the call of the particular method.*/
HVTErrorVideoModeNotEnabled = -3308
};

/**
Expand Down
Binary file modified HorizonSDK/HorizonSDK.framework/HorizonSDK
Binary file not shown.
Binary file modified HorizonSDK/HorizonSDK.framework/Info.plist
Binary file not shown.
245 changes: 244 additions & 1 deletion docs/Classes/HVTCamera.html
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,16 @@ <h1 id="library-title">

<option value="//api/name/setCameraResolution:frameRate:error:">- setCameraResolution:frameRate:error:</option>

<option value="//api/name/setCaptureDevice:error:">- setCaptureDevice:error:</option>

<option value="//api/name/setCaptureDevice:resolution:frameRate:error:">- setCaptureDevice:resolution:frameRate:error:</option>

<option value="//api/name/setCaptureMode:cameraPosition:">- setCaptureMode:cameraPosition:</option>

<option value="//api/name/setGPSMetadata:">- setGPSMetadata:</option>

<option value="//api/name/setOutputMovieSize:error:">- setOutputMovieSize:error:</option>

<option value="//api/name/setSampleBufferDelegate:queue:">- setSampleBufferDelegate:queue:</option>

<option value="//api/name/startRecordingWithMovieURL:">- startRecordingWithMovieURL:</option>
Expand Down Expand Up @@ -787,6 +793,94 @@ <h4 class="method-subtitle">Discussion</h4>



<div class="method-subsection see-also-section">
<h4 class="method-subtitle">See Also</h4>
<ul>

<li><code><p><a href="#//api/name/setOutputMovieSize:error:">- setOutputMovieSize:error:</a> For a more fine grained control on whether the
property has been successfully set or not.</p>

<p>It is recommended that you call this property setter (or the <code>setOutputMovieSize:error:</code>
method after setting up the resolution.</p></code></li>

</ul>
</div>



<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<p><code class="declared-in-ref">HVTCamera.h</code></p>
</div>


</div>
</div>
</div><div class="section-method">
<a name="//api/name/setOutputMovieSize:error:" title="setOutputMovieSize:error:"></a>
<h3 class="method-title"><code><a href="#//api/name/setOutputMovieSize:error:">&ndash;&nbsp;setOutputMovieSize:error:</a></code>
</h3>

<div class="method-info">
<div class="pointy-thing"></div>

<div class="method-info-container">


<div class="method-subsection brief-description">
<p>Specifies the output movie size of the final video file,
providing more info about whether the method had succeeded or not.</p>
</div>



<div class="method-subsection method-declaration"><code>- (BOOL)setOutputMovieSize:(CGSize)<em>outputMovieSize</em> error:(NSError **)<em>outError</em></code></div>



<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<table class="argument-def parameter-def">

<tr>
<th scope="row" class="argument-name"><code>outputMovieSize</code></th>
<td><p>The desired output movie size</p></td>
</tr>

<tr>
<th scope="row" class="argument-name"><code>outError</code></th>
<td><p>The error object in case that setting the size was unsuccessful</p></td>
</tr>

</table>
</div>



<div class="method-subsection return">
<h4 class="method-subtitle parameter-title">Return Value</h4>
<p>YES if the <a href="#//api/name/outputMovieSize">outputMovieSize</a> has been set, NO otherwise</p>
</div>





<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>For example <a href="#//api/name/outputMovieSize">outputMovieSize</a> cannot be set if the <a href="#//api/name/captureMode">captureMode</a> is set
to HVTCaptureModePhoto. If you call just the property setter (<a href="#//api/name/outputMovieSize"><code>setOutputMovieSize:</code></a>)
you will not get an error if the method doesn&rsquo;t allow you to set this
property while in photo mode.</p>

<p>This method will return NO and provide
and NSError about it.</p>
</div>







<div class="method-subsection declared-in-section">
Expand Down Expand Up @@ -2525,6 +2619,155 @@ <h4 class="method-subtitle">Discussion</h4>



<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<p><code class="declared-in-ref">HVTCamera.h</code></p>
</div>


</div>
</div>
</div><div class="section-method">
<a name="//api/name/setCaptureDevice:error:" title="setCaptureDevice:error:"></a>
<h3 class="method-title"><code><a href="#//api/name/setCaptureDevice:error:">&ndash;&nbsp;setCaptureDevice:error:</a></code>
</h3>

<div class="method-info">
<div class="pointy-thing"></div>

<div class="method-info-container">


<div class="method-subsection brief-description">
<p>Sets a specific camera device provided by the user.</p>
</div>



<div class="method-subsection method-declaration"><code>- (BOOL)setCaptureDevice:(AVCaptureDevice *)<em>captureDevice</em> error:(NSError **)<em>outError</em></code></div>



<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<table class="argument-def parameter-def">

<tr>
<th scope="row" class="argument-name"><code>captureDevice</code></th>
<td><p>The new capture device</p></td>
</tr>

<tr>
<th scope="row" class="argument-name"><code>outError</code></th>
<td><p>The output error</p></td>
</tr>

</table>
</div>



<div class="method-subsection return">
<h4 class="method-subtitle parameter-title">Return Value</h4>
<p><code>YES</code> if the camera device has been changed and <code>NO</code> if there was an error while changing the camera device</p>
</div>





<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<div class="warning"><p><strong>Warning:</strong> If you call the method while the receiver <a href="#//api/name/isRunning">isRunning</a>, a connection to the new <a href="#//api/name/cameraDevice">cameraDevice</a> will be established, which
can take some time. The call will block until the connection has been established.</p></div>
</div>







<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<p><code class="declared-in-ref">HVTCamera.h</code></p>
</div>


</div>
</div>
</div><div class="section-method">
<a name="//api/name/setCaptureDevice:resolution:frameRate:error:" title="setCaptureDevice:resolution:frameRate:error:"></a>
<h3 class="method-title"><code><a href="#//api/name/setCaptureDevice:resolution:frameRate:error:">&ndash;&nbsp;setCaptureDevice:resolution:frameRate:error:</a></code>
</h3>

<div class="method-info">
<div class="pointy-thing"></div>

<div class="method-info-container">


<div class="method-subsection brief-description">
<p>Sets a specific camera device with a given resolution and framerate provided by the user.</p>
</div>



<div class="method-subsection method-declaration"><code>- (BOOL)setCaptureDevice:(AVCaptureDevice *)<em>captureDevice</em> resolution:(CGSize)<em>cameraResolution</em> frameRate:(int)<em>frameRate</em> error:(NSError **)<em>outError</em></code></div>



<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<table class="argument-def parameter-def">

<tr>
<th scope="row" class="argument-name"><code>captureDevice</code></th>
<td><p>The new capture device</p></td>
</tr>

<tr>
<th scope="row" class="argument-name"><code>cameraResolution</code></th>
<td><p>The new camera resolution.</p></td>
</tr>

<tr>
<th scope="row" class="argument-name"><code>frameRate</code></th>
<td><p>The new frame rate.</p></td>
</tr>

<tr>
<th scope="row" class="argument-name"><code>outError</code></th>
<td><p>The output error.</p></td>
</tr>

</table>
</div>



<div class="method-subsection return">
<h4 class="method-subtitle parameter-title">Return Value</h4>
<p><code>YES</code> if the camera resolution has been changed and <code>NO</code> if there was an error while changing the camera resolution
(check outError for more).</p>
</div>





<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<div class="warning"><p><strong>Warning:</strong> If you call the method while the receiver <a href="#//api/name/isRunning">isRunning</a>, a connection to the new <a href="#//api/name/cameraDevice">cameraDevice</a> will be established, which
can take some time. The call will block until the connection has been established.</p></div>
</div>







<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<p><code class="declared-in-ref">HVTCamera.h</code></p>
Expand Down Expand Up @@ -3015,7 +3258,7 @@ <h4 class="method-subtitle">Declared In</h4>
<footer>
<div class="footer-copyright">

<p class="copyright">Copyright &copy; 2017 Horizon Video Technologies Inc. All rights reserved. Updated: 2017-07-09</p>
<p class="copyright">Copyright &copy; 2017 Horizon Video Technologies Inc. All rights reserved. Updated: 2017-11-18</p>


<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1333)</a>.</p>
Expand Down
2 changes: 1 addition & 1 deletion docs/Classes/HVTCameraController.html
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,7 @@ <h4 class="method-subtitle">Declared In</h4>
<footer>
<div class="footer-copyright">

<p class="copyright">Copyright &copy; 2017 Horizon Video Technologies Inc. All rights reserved. Updated: 2017-07-09</p>
<p class="copyright">Copyright &copy; 2017 Horizon Video Technologies Inc. All rights reserved. Updated: 2017-11-18</p>


<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1333)</a>.</p>
Expand Down
2 changes: 1 addition & 1 deletion docs/Classes/HVTSDK.html
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ <h4 class="method-subtitle">Declared In</h4>
<footer>
<div class="footer-copyright">

<p class="copyright">Copyright &copy; 2017 Horizon Video Technologies Inc. All rights reserved. Updated: 2017-07-09</p>
<p class="copyright">Copyright &copy; 2017 Horizon Video Technologies Inc. All rights reserved. Updated: 2017-11-18</p>


<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1333)</a>.</p>
Expand Down
2 changes: 1 addition & 1 deletion docs/Classes/HVTView.html
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ <h4 class="method-subtitle">Declared In</h4>
<footer>
<div class="footer-copyright">

<p class="copyright">Copyright &copy; 2017 Horizon Video Technologies Inc. All rights reserved. Updated: 2017-07-09</p>
<p class="copyright">Copyright &copy; 2017 Horizon Video Technologies Inc. All rights reserved. Updated: 2017-11-18</p>


<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1333)</a>.</p>
Expand Down
Loading

0 comments on commit bf5288a

Please sign in to comment.