-
Notifications
You must be signed in to change notification settings - Fork 486
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
[ImageCaptureCore] Add missing binding #17424
[ImageCaptureCore] Add missing binding #17424
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No xtro todo changes?
[Export ("cameraDevice:didReceiveThumbnailForItem:")] | ||
void DidReceiveThumbnail (ICCameraDevice camera, ICCameraItem forItem); | ||
|
||
[Abstract] | ||
[Export ("cameraDevice:didReceiveThumbnail:forItem:error:")] | ||
void DidReceiveThumbnailForItem (ICCameraDevice camera, /* CGImageRef */ IntPtr thumbnail, ICCameraItem forItem, [NullAllowed] NSError error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we do CGImage here?
void DidReceiveThumbnailForItem (ICCameraDevice camera, /* CGImageRef */ IntPtr thumbnail, ICCameraItem forItem, [NullAllowed] NSError error); | |
void DidReceiveThumbnailForItem (ICCameraDevice camera, CGImage thumbnail, ICCameraItem forItem, [NullAllowed] NSError error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dalexsoto I thought about that, but after reading this and looking at how we handled CGImageRef in other parts of the codebase, I thought this implementation was better. But if the overall consensus is that using CGImage is a better option, I can change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dalexsoto we are dealing with a delegate in this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah also CGImageRef
and CGImage
seem not to be toll-free bridged so this is ok!
This comment has been minimized.
This comment has been minimized.
src/imagecapturecore.cs
Outdated
[Export ("cameraDevice:didReceiveThumbnailForItem:")] | ||
void DidReceiveThumbnail (ICCameraDevice camera, ICCameraItem forItem); | ||
|
||
[Abstract] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Abstract] | |
#if XAMCORE_5_0 | |
[Abstract] | |
#endif |
src/imagecapturecore.cs
Outdated
[Export ("cameraDevice:didReceiveThumbnailForItem:")] | ||
void DidReceiveThumbnail (ICCameraDevice camera, ICCameraItem forItem); | ||
|
||
[Abstract] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Abstract] | |
#if XAMCORE_5_0 | |
[Abstract] | |
#endif |
No, but with this, yes: #17417 |
So I just merged that PR, which means that if you merge main into your branch, you'll now have an xtro failure you need to fix as well. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ API diff for current PR / commitLegacy Xamarin (No breaking changes).NET (No breaking changes)✅ API diff vs stableLegacy Xamarin (No breaking changes).NET (No breaking changes)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
💻 [PR Build] Tests on macOS M1 - Mac Big Sur (11.5) passed 💻✅ All tests on macOS M1 - Mac Big Sur (11.5) passed. Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
[Export ("cameraDevice:didReceiveThumbnailForItem:")] | ||
void DidReceiveThumbnail (ICCameraDevice camera, ICCameraItem forItem); | ||
|
||
[Abstract] | ||
[Export ("cameraDevice:didReceiveThumbnail:forItem:error:")] | ||
void DidReceiveThumbnailForItem (ICCameraDevice camera, /* CGImageRef */ IntPtr thumbnail, ICCameraItem forItem, [NullAllowed] NSError error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah also CGImageRef
and CGImage
seem not to be toll-free bridged so this is ok!
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build] Test results 🚀Test results✅ All tests passed on VSTS: simulator tests. 🎉 All 225 tests passed 🎉 Tests counts✅ bcl: All 69 tests passed. [attempt 3] Html Report (VSDrops) Download Pipeline on Agent |
Deprecated "cameraDevice:didReceiveThumbnailForItem:" for macOS and macCatalyst platforms and added updated binding for "cameraDevice:didReceiveThumbnail:forItem:error:" method.
Refs:
Deprecated method
Updated method