Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/Constants.tvos.cs.in
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,8 @@ namespace ObjCRuntime {
public const string ReplayKitLibrary = "/System/Library/Frameworks/ReplayKit.framework/ReplayKit";
public const string UserNotificationsLibrary = "/System/Library/Frameworks/UserNotifications.framework/UserNotifications";
public const string VideoSubscriberAccountLibrary = "/System/Library/Frameworks/VideoSubscriberAccount.framework/VideoSubscriberAccount";

// tvOS 10.2
public const string VideoToolboxLibrary = "/System/Library/Frameworks/VideoToolbox.framework/VideoToolbox";
}
}
4 changes: 2 additions & 2 deletions src/VideoToolbox/VTFrameSilo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public static VTFrameSilo Create (NSUrl fileUrl = null, CMTimeRange? timeRange =
var status = VTFrameSiloCreate (
IntPtr.Zero,
fileUrl == null ? IntPtr.Zero : fileUrl.Handle,
timeRange ?? CMTimeRange.Invalid,
timeRange ?? CMTimeRange.InvalidRange,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great catch 👍

IntPtr.Zero,
out ret);

Expand Down Expand Up @@ -154,7 +154,7 @@ static VTStatus BufferCallback (IntPtr callbackInfo, IntPtr sampleBufferPtr)
public VTStatus ForEach (Func<CMSampleBuffer, VTStatus> callback, CMTimeRange? range = null)
{
callbackHandle = GCHandle.Alloc (callback);
var foreachResult = VTFrameSiloCallFunctionForEachSampleBuffer (handle, range ?? CMTimeRange.Invalid, GCHandle.ToIntPtr (callbackHandle), static_EachSampleBufferCallback);
var foreachResult = VTFrameSiloCallFunctionForEachSampleBuffer (handle, range ?? CMTimeRange.InvalidRange, GCHandle.ToIntPtr (callbackHandle), static_EachSampleBufferCallback);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great catch 👍

callbackHandle.Free ();
return foreachResult;
}
Expand Down
2 changes: 1 addition & 1 deletion src/VideoToolbox/VTMultiPassStorage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public static VTMultiPassStorage Create (
var status = VTMultiPassStorageCreate (
IntPtr.Zero,
fileUrl == null ? IntPtr.Zero : fileUrl.Handle,
timeRange ?? CMTimeRange.Invalid,
timeRange ?? CMTimeRange.InvalidRange,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great catch 👍

options == null ? IntPtr.Zero : options.Handle,
out ret);

Expand Down
1 change: 1 addition & 0 deletions src/frameworks.sources
Original file line number Diff line number Diff line change
Expand Up @@ -1722,6 +1722,7 @@ TVOS_FRAMEWORKS = \
UIKit \
UserNotifications \
VideoSubscriberAccount \
VideoToolbox \

#
# Compute the SOURCES variables.
Expand Down
14 changes: 2 additions & 12 deletions tests/introspection/ApiCMAttachmentTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
using SystemConfiguration;
using ObjCRuntime;
using Security;
using VideoToolbox;
using UIKit;
#else
using MonoTouch.AudioToolbox;
Expand All @@ -38,19 +39,10 @@
using MonoTouch.SystemConfiguration;
using MonoTouch.ObjCRuntime;
using MonoTouch.Security;
using MonoTouch.UIKit;
#endif

#if !__TVOS__

#if XAMCORE_2_0
using VideoToolbox;
#else
using MonoTouch.VideoToolbox;
using MonoTouch.UIKit;
#endif

#endif

namespace Introspection {

[TestFixture]
Expand Down Expand Up @@ -383,15 +375,13 @@ protected INativeObject GetINativeInstance (Type t)
return new UIFontFeature (CTFontFeatureNumberSpacing.Selector.ProportionalNumbers);
case "NetworkReachability":
return new NetworkReachability (IPAddress.Loopback, null);
#if !__TVOS__
case "VTCompressionSession":
case "VTSession":
return VTCompressionSession.Create (1024, 768, CMVideoCodecType.H264, (sourceFrame, status, flags, buffer) => { }, null, (CVPixelBufferAttributes) null);
case "VTFrameSilo":
return VTFrameSilo.Create ();
case "VTMultiPassStorage":
return VTMultiPassStorage.Create ();
#endif
case "CFString":
return new CFString ("test");
case "DispatchQueue":
Expand Down