-
Notifications
You must be signed in to change notification settings - Fork 511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMSampleAttachmentKey should be public #4688
Comments
@lobrien what about the following: var att = new CMSampleBufferAttachmentSettings (sampleBuffer.GetAttachments (CMAttachmentMode.ShouldNotPropagate));
var matrix = att.CameraIntrinsicMatrix; I'm not sure about the mode, but you can create the CMSampleBufferAttachmentSettings from the NSDictionary and then used them. (could we have a performance hit?) |
I think what @mandel-macaque should work but that's a convoluted way to achieve what you want here. Also there's kinda no point having It doesn't cost us to open up (remove Note: we could make a smart enum out of |
…#4688 We have an issue when the user wants to use the CMAttachmentSample, ideally, the user will want to do: var cameraIntrinsicData = CMAttachmentBearer.GetAttachment(CMSampleAttachmentKey.CameraIntrinsicMatrixKey, sampleBuffer ); Instead of the current workaround: var att = new CMSampleBufferAttachmentSettings (sampleBuffer.GetAttachments (CMAttachmentMode.ShouldNotPropagate)); var matrix = att.CameraIntrinsicMatrix; With this push, we can allow the user use the first example provided in this commit. Fixes xamarin#4688
…#4688 We have an issue when the user wants to use the CMAttachmentSample, ideally, the user will want to do: var cameraIntrinsicData = CMAttachmentBearer.GetAttachment(CMSampleAttachmentKey.CameraIntrinsicMatrixKey, sampleBuffer ); Instead of the current workaround: var att = new CMSampleBufferAttachmentSettings (sampleBuffer.GetAttachments (CMAttachmentMode.ShouldNotPropagate)); var matrix = att.CameraIntrinsicMatrix; With this push, we can allow the user use the first example provided in this commit. Fixes xamarin#4688
…#4688 We have an issue when the user wants to use the CMAttachmentSample, ideally, the user will want to do: var cameraIntrinsicData = CMAttachmentBearer.GetAttachment(CMSampleAttachmentKey.CameraIntrinsicMatrixKey, sampleBuffer ); Instead of the current workaround: var att = new CMSampleBufferAttachmentSettings (sampleBuffer.GetAttachments (CMAttachmentMode.ShouldNotPropagate)); var matrix = att.CameraIntrinsicMatrix; With this push, we can allow the user use the first example provided in this commit. Fixes xamarin#4688
…4841) * [CoreMedia] Expose the CMSampleAttachmentKey interface. Fixes #4688 We have an issue when the user wants to use the CMAttachmentSample, ideally, the user will want to do: var cameraIntrinsicData = CMAttachmentBearer.GetAttachment(CMSampleAttachmentKey.CameraIntrinsicMatrixKey, sampleBuffer ); Instead of the current workaround: var att = new CMSampleBufferAttachmentSettings (sampleBuffer.GetAttachments (CMAttachmentMode.ShouldNotPropagate)); var matrix = att.CameraIntrinsicMatrix; With this push, we can allow the user use the first example provided in this commit. Fixes #4688
Apple samples use
kCMSampleBufferAttachmentKey_CameraIntrinsicMatrix
, which AFAICT is not publicly available in Xamarin.iOSSteps to Reproduce
captureOutput
and line 462:Expected Behavior
The code compiles.
Actual Behavior
The compiler says "CMSampleAttachmentKey is inaccessible due to its protection level."
Workaround
Use the hardcoded value "CameraIntrinsicMatrix"
Environment
=== Visual Studio Community 2017 for Mac (Preview) ===
Version 7.6 Preview (7.6 build 1773)
Installation UUID: 6b94f136-026d-4a5a-bf6d-af2c0d8dc019
Runtime:
Mono 5.12.0.273 (2018-02/f59eac4c0f1) (64-bit)
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 4.4.1.178 (master / eeaeb7e)
=== NuGet ===
Version: 4.3.1.4445
=== .NET Core ===
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
2.1.1
2.0.5
2.0.3
2.0.0
SDK: /usr/local/share/dotnet/sdk/2.1.301/Sdks
SDK Versions:
2.1.301
2.1.4
2.0.3
2.0.0
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/msbuild/15.0/bin/Sdks
=== Xamarin.Profiler ===
Version: 1.6.3
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
=== Xamarin.Android ===
Version: 8.4.0.1 (Visual Studio Community)
Android SDK: /Users/larryobrien/Library/Android/sdk
Supported Android versions:
4.1 (API level 16)
5.0 (API level 21)
6.0 (API level 23)
7.0 (API level 24)
7.1 (API level 25)
8.0 (API level 26)
8.1 (API level 27)
SDK Tools Version: 26.1.1
SDK Platform Tools Version: 25.0.3
SDK Build Tools Version: 27.0.3
Java SDK: /usr
java version "1.8.0_162"
Java(TM) SE Runtime Environment (build 1.8.0_162-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode)
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
=== Xamarin Inspector ===
Version: 1.4.0
Hash: b3f92f9
Branch: master
Build date: Fri, 19 Jan 2018 22:00:34 GMT
Client compatibility: 1
=== Apple Developer Tools ===
Xcode 10.0 (14313.2)
Build 10L213o
=== Xamarin.Mac ===
Version: 4.99.3.344 (Visual Studio Community)
Hash: 0b72651
Branch:
Build date: 2018-08-09 10:37:58-0400
=== Xamarin.iOS ===
Version: 11.99.3.224 (Visual Studio Community)
Hash: 0b72651
Branch: HEAD
Build date: 2018-08-09 10:37:57-0400
=== Build Information ===
Release ID: 706001773
Git revision: e5958ff9015312c81fc3b1b6b6413585575ca869
Build date: 2018-06-19 12:19:27+00
Build branch: release-7.6
Xamarin extensions: 6910f36b43e7d559ff40ae268e73ae26c30a2a6b
=== Operating System ===
Mac OS X 10.13.6
Darwin 17.7.0 Darwin Kernel Version 17.7.0
Thu Jun 21 22:53:14 PDT 2018
root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64
=== Enabled user installed extensions ===
AddinMaker 1.4.2
Larry's F# Templates 2.0.8
MicroFramework 1.0.3
Internet of Things (IoT) development (Preview) 7.5.3
The text was updated successfully, but these errors were encountered: