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
1 change: 1 addition & 0 deletions src/Constants.watch.cs.in
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ namespace ObjCRuntime {
// WatchOS 4.0
public const string CoreBluetoothLibrary = "/System/Library/Frameworks/CoreBluetooth.framework/CoreBluetooth";
public const string CoreMLLibrary = "/System/Library/Frameworks/CoreML.framework/CoreML";
public const string CoreVideoLibrary = "/System/Library/Frameworks/CoreVideo.framework/CoreVideo";
public const string VisionLibrary = "/System/Library/Frameworks/Vision.framework/Vision";
}
}
1 change: 1 addition & 0 deletions src/CoreVideo/CVBuffer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
namespace XamCore.CoreVideo {

// CVBuffer.h
[Watch (4,0)]
[iOS (4,0)]
public partial class CVBuffer : INativeObject
#if !COREBUILD
Expand Down
1 change: 1 addition & 0 deletions src/CoreVideo/CVImageBuffer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ namespace XamCore.CoreVideo {

// CVImageBuffer.h
[iOS (4,0)]
[Watch (4,0)]
public partial class CVImageBuffer : CVBuffer {
#if !COREBUILD
#if !XAMCORE_2_0
Expand Down
5 changes: 5 additions & 0 deletions src/CoreVideo/CVOpenGLESTexture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
// Copyright 2012-2015 Xamarin Inc
//
//

#if !WATCH

using System;
using System.Runtime.InteropServices;

Expand Down Expand Up @@ -133,3 +136,5 @@ public void GetCleanTexCoords (out float [] lowerLeft, out float [] lowerRight,
}

}

#endif
5 changes: 5 additions & 0 deletions src/CoreVideo/CVOpenGLESTextureCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
// Copyright 2012-2015 Xamarin Inc
//
//

#if !WATCH

using System;
using System.Runtime.InteropServices;

Expand Down Expand Up @@ -155,3 +158,5 @@ extern static CVReturn CVOpenGLESTextureCacheCreateTextureFromImage (
/* CVOpenGLESTextureRef __nullable * __nonnull */ out IntPtr textureOut);
}
}

#endif
1 change: 1 addition & 0 deletions src/CoreVideo/CVPixelBuffer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

namespace XamCore.CoreVideo {

[Watch (4,0)]
[iOS (4,0)]
public partial class CVPixelBuffer : CVImageBuffer {
#if !COREBUILD
Expand Down
5 changes: 4 additions & 1 deletion src/CoreVideo/CVPixelBufferAttributes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

namespace XamCore.CoreVideo {

[Watch (4,0)]
[iOS (6,0)]
public class CVPixelBufferAttributes : DictionaryContainer
{
Expand Down Expand Up @@ -192,7 +193,8 @@ public bool? AllocateWithIOSurface {
return GetNSDictionary (CVPixelBuffer.IOSurfacePropertiesKey) != null;
}
}


#if !WATCH
[iOS (6,0)]
public bool? OpenGLESCompatibility {
set {
Expand All @@ -212,6 +214,7 @@ public bool? MetalCompatibility {
return GetBoolValue (CVPixelBuffer.MetalCompatibilityKey);
}
}
#endif // !WATCH
#endif
#endif
}
Expand Down
1 change: 1 addition & 0 deletions src/CoreVideo/CVPixelBufferPool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
namespace XamCore.CoreVideo {

// CVPixelBufferPool.h
[Watch (4,0)]
[iOS (4,0)]
public partial class CVPixelBufferPool : INativeObject
#if !COREBUILD
Expand Down
2 changes: 2 additions & 0 deletions src/CoreVideo/CVPixelBufferPoolSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

namespace XamCore.CoreVideo {

[Watch (4,0)]
public class CVPixelBufferPoolSettings : DictionaryContainer
{
#if !COREBUILD
Expand Down Expand Up @@ -66,6 +67,7 @@ public double? MaximumBufferAgeInSeconds {
#endif
}

[Watch (4,0)]
public partial class CVPixelBufferPoolAllocationSettings : DictionaryContainer {
#if !COREBUILD
public CVPixelBufferPoolAllocationSettings ()
Expand Down
1 change: 1 addition & 0 deletions src/CoreVideo/CVPixelFormatDescription.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

namespace XamCore.CoreVideo {

[Watch (4,0)]
[iOS (4,0)]
public static class CVPixelFormatDescription {
#if !COREBUILD
Expand Down
1 change: 1 addition & 0 deletions src/CoreVideo/CVTime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
namespace XamCore.CoreVideo {

// CVBase.h
[Watch (4,0)]
public struct CVTime {

public /* int64_t */ long TimeValue;
Expand Down
17 changes: 17 additions & 0 deletions src/CoreVideo/CoreVideo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@
namespace XamCore.CoreVideo {

// uint32_t -> CVBuffer.h
[Watch (4,0)]
public enum CVAttachmentMode : uint {
ShouldNotPropagate = 0,
ShouldPropagate = 1,
}

[Flags]
[Watch (4,0)]
#if XAMCORE_4_0
public enum CVPixelBufferLock : ulong {
#else
Expand All @@ -51,29 +53,34 @@ public enum CVPixelBufferLock : uint_compat_int {
}

// CVPixelBuffer.h
[Watch (4,0)]
public struct CVPlanarComponentInfo {
public /* int32_t */ int Offset;
public /* uint32_t */ uint RowBytes;
}

// CVPixelBuffer.h
[Watch (4,0)]
public struct CVPlanarPixelBufferInfo {
public CVPlanarComponentInfo[] ComponentInfo;
}

// CVPixelBuffer.h
[Watch (4,0)]
public struct CVPlanarPixelBufferInfo_YCbCrPlanar {
public CVPlanarComponentInfo ComponentInfoY;
public CVPlanarComponentInfo ComponentInfoCb;
public CVPlanarComponentInfo ComponentInfoCr;
}

[Watch (4,0)]
public struct CVPlanarPixelBufferInfo_YCbCrBiPlanar {
public CVPlanarComponentInfo ComponentInfoY;
public CVPlanarComponentInfo ComponentInfoCbCr;
}

// int32_t -> CVReturn.h
[Watch (4,0)]
public enum CVReturn : int {
Success = 0,
First = -6660,
Expand All @@ -99,10 +106,12 @@ public enum CVReturn : int {


// uint64_t -> CVBase.h
[Watch (4,0)]
public enum CVOptionFlags : long {
None = 0,
}

[Watch (4,0)]
public struct CVTimeStamp {
public UInt32 Version;
public Int32 VideoTimeScale;
Expand All @@ -115,6 +124,7 @@ public struct CVTimeStamp {
public UInt64 Reserved;
}

[Watch (4,0)]
public struct CVSMPTETime {
public Int16 Subframes;
public Int16 SubframeDivisor;
Expand All @@ -128,11 +138,13 @@ public struct CVSMPTETime {
}

[Flags]
[Watch (4,0)]
public enum CVTimeFlags : int {
IsIndefinite = 1 << 0
}

[Flags]
[Watch (4,0)]
#if XAMCORE_2_0
public enum CVTimeStampFlags : ulong {
#else
Expand All @@ -150,11 +162,13 @@ public enum CVTimeStampFlags {
}

[Flags]
[Watch (4,0)]
public enum CVSMPTETimeFlags : uint_compat_int {
Valid = (1 << 0),
Running = (1 << 1)
}

[Watch (4,0)]
public enum CVSMPTETimeType : uint_compat_int {
Type24 = 0,
Type25 = 1,
Expand All @@ -166,15 +180,18 @@ public enum CVSMPTETimeType : uint_compat_int {
Type5994 = 7
}

[Watch (4,0)]
public struct CVFillExtendedPixelsCallBackData {
public nint /* CFIndex */ Version;
public CVFillExtendedPixelsCallBack FillCallBack;
public IntPtr UserInfo;
}

[Watch (4,0)]
public delegate bool CVFillExtendedPixelsCallBack (IntPtr pixelBuffer, IntPtr refCon);

// CVOptionFlags (uint64_t) -> CVPixelBufferPool.h
[Watch (4,0)]
[iOS (9,0)][Mac (10,11)]
public enum CVPixelBufferPoolFlushFlags : ulong {
FlushExcessBuffers = 1,
Expand Down
1 change: 0 additions & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,6 @@ WATCHOS_EXTRA_CORE_SOURCES = \
$(WATCH_BUILD_DIR)/Constants.cs \
$(WATCH_BUILD_DIR)/AssemblyInfo.cs \
$(IOS_OPENTK_1_0_CORE_SOURCES) \
CoreVideo/CVPixelFormatType.cs \
AudioToolbox/AudioType.cs \
$(SHARED_SYSTEM_DRAWING_SOURCES) \
$(MONO_PATH)/mcs/class/System.Drawing/System.Drawing/Color.cs \
Expand Down
3 changes: 3 additions & 0 deletions src/corevideo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,12 @@ interface CVPixelBuffer {
NSString PlaneAlignmentKey { get; }

#if !MONOMAC || !XAMCORE_2_0
[NoWatch]
[iOS (6,0)]
[Field ("kCVPixelBufferOpenGLESCompatibilityKey")]
NSString OpenGLESCompatibilityKey { get; }

[NoWatch]
[iOS (9,0)]
[Field ("kCVPixelBufferOpenGLESTextureCacheCompatibilityKey")]
NSString OpenGLESTextureCacheCompatibilityKey { get; }
Expand Down Expand Up @@ -301,6 +303,7 @@ interface CVPixelBufferPool : CVImageBuffer {
}

#if !MONOMAC
[NoWatch]
[Partial]
interface CVMetalTextureCache {
[Internal]
Expand Down
4 changes: 1 addition & 3 deletions src/frameworks.sources
Original file line number Diff line number Diff line change
Expand Up @@ -1573,6 +1573,7 @@ COMMON_FRAMEWORKS = \
CoreBluetooth \
CoreFoundation \
CoreML \
CoreVideo \
Foundation \
GameKit \
SceneKit \
Expand Down Expand Up @@ -1600,7 +1601,6 @@ MAC_FRAMEWORKS = \
CoreMidi \
CoreServices \
CoreText \
CoreVideo \
CoreWlan \
EventKit \
ExternalAccessory \
Expand Down Expand Up @@ -1676,7 +1676,6 @@ IOS_FRAMEWORKS = \
CoreSpotlight \
CoreTelephony \
CoreText \
CoreVideo \
DeviceCheck \
EventKit \
EventKitUI \
Expand Down Expand Up @@ -1777,7 +1776,6 @@ TVOS_FRAMEWORKS = \
CoreMedia \
CoreSpotlight \
CoreText \
CoreVideo \
DeviceCheck \
ExternalAccessory \
GLKit \
Expand Down