diff --git a/src/Constants.tvos.cs.in b/src/Constants.tvos.cs.in index 91b97acb66e8..ce9c31ea4d79 100644 --- a/src/Constants.tvos.cs.in +++ b/src/Constants.tvos.cs.in @@ -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"; } } diff --git a/src/VideoToolbox/VTFrameSilo.cs b/src/VideoToolbox/VTFrameSilo.cs index d6ba2c848eb9..4ca25b60f077 100644 --- a/src/VideoToolbox/VTFrameSilo.cs +++ b/src/VideoToolbox/VTFrameSilo.cs @@ -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, IntPtr.Zero, out ret); @@ -154,7 +154,7 @@ static VTStatus BufferCallback (IntPtr callbackInfo, IntPtr sampleBufferPtr) public VTStatus ForEach (Func 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); callbackHandle.Free (); return foreachResult; } diff --git a/src/VideoToolbox/VTMultiPassStorage.cs b/src/VideoToolbox/VTMultiPassStorage.cs index 14da3351db38..0f238b71ac51 100644 --- a/src/VideoToolbox/VTMultiPassStorage.cs +++ b/src/VideoToolbox/VTMultiPassStorage.cs @@ -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, options == null ? IntPtr.Zero : options.Handle, out ret); diff --git a/src/frameworks.sources b/src/frameworks.sources index db63ecca96bc..d30bd9b9276a 100644 --- a/src/frameworks.sources +++ b/src/frameworks.sources @@ -1722,6 +1722,7 @@ TVOS_FRAMEWORKS = \ UIKit \ UserNotifications \ VideoSubscriberAccount \ + VideoToolbox \ # # Compute the SOURCES variables. diff --git a/tests/introspection/ApiCMAttachmentTest.cs b/tests/introspection/ApiCMAttachmentTest.cs index b3a3bfd3d71a..d4f312b5027b 100644 --- a/tests/introspection/ApiCMAttachmentTest.cs +++ b/tests/introspection/ApiCMAttachmentTest.cs @@ -24,6 +24,7 @@ using SystemConfiguration; using ObjCRuntime; using Security; +using VideoToolbox; using UIKit; #else using MonoTouch.AudioToolbox; @@ -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] @@ -383,7 +375,6 @@ 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); @@ -391,7 +382,6 @@ protected INativeObject GetINativeInstance (Type t) return VTFrameSilo.Create (); case "VTMultiPassStorage": return VTMultiPassStorage.Create (); -#endif case "CFString": return new CFString ("test"); case "DispatchQueue":