Skip to content
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

Merged
merged 5 commits into from
Feb 4, 2023

Conversation

haritha-mohan
Copy link
Contributor

Deprecated "cameraDevice:didReceiveThumbnailForItem:" for macOS and macCatalyst platforms and added updated binding for "cameraDevice:didReceiveThumbnail:forItem:error:" method.

Refs:
Deprecated method
Updated method

Copy link
Member

@mandel-macaque mandel-macaque left a 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);
Copy link
Member

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?

Suggested change
void DidReceiveThumbnailForItem (ICCameraDevice camera, /* CGImageRef */ IntPtr thumbnail, ICCameraItem forItem, [NullAllowed] NSError error);
void DidReceiveThumbnailForItem (ICCameraDevice camera, CGImage thumbnail, ICCameraItem forItem, [NullAllowed] NSError error);

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Member

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!

@vs-mobiletools-engineering-service2

This comment has been minimized.

[Export ("cameraDevice:didReceiveThumbnailForItem:")]
void DidReceiveThumbnail (ICCameraDevice camera, ICCameraItem forItem);

[Abstract]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
[Abstract]
#if XAMCORE_5_0
[Abstract]
#endif

[Export ("cameraDevice:didReceiveThumbnailForItem:")]
void DidReceiveThumbnail (ICCameraDevice camera, ICCameraItem forItem);

[Abstract]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
[Abstract]
#if XAMCORE_5_0
[Abstract]
#endif

@rolfbjarne
Copy link
Member

@mandel-macaque

No xtro todo changes?

No, but with this, yes: #17417

@rolfbjarne
Copy link
Member

@haritha-mohan

@mandel-macaque

No xtro todo changes?

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.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ API diff for current PR / commit

Legacy Xamarin (No breaking changes)
  • iOS (no change detected)
  • tvOS (no change detected)
  • watchOS (no change detected)
  • macOS: vsdrops gist (No breaking changes)
.NET (No breaking changes)
  • iOS: (empty diff detected)
  • tvOS: (empty diff detected)
  • MacCatalyst: (empty diff detected)
  • macOS: vsdrops gist (No breaking changes)

✅ API diff vs stable

Legacy Xamarin (No breaking changes)
.NET (No breaking changes)
Legacy Xamarin (stable) vs .NET

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: 44fc64564b7e949b0d5d9c9be7e9540bc4bbec85 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [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
Hash: 44fc64564b7e949b0d5d9c9be7e9540bc4bbec85 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

📚 [PR Build] Artifacts 📚

Packages generated

View packages

Pipeline on Agent XAMBOT-1043.Monterey'
Hash: 44fc64564b7e949b0d5d9c9be7e9540bc4bbec85 [PR build]

@vs-mobiletools-engineering-service2

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);
Copy link
Member

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!

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🚀 [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
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests: All 1 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 7 tests passed. Html Report (VSDrops) Download
✅ framework: All 8 tests passed. Html Report (VSDrops) Download
✅ generator: All 2 tests passed. Html Report (VSDrops) Download
✅ interdependent_binding_projects: All 7 tests passed. Html Report (VSDrops) Download
✅ install_source: All 1 tests passed. Html Report (VSDrops) Download
✅ introspection: All 8 tests passed. Html Report (VSDrops) Download
✅ linker: All 65 tests passed. Html Report (VSDrops) Download
✅ mac_binding_project: All 1 tests passed. Html Report (VSDrops) Download
✅ mmp: All 2 tests passed. Html Report (VSDrops) Download
✅ mononative: All 12 tests passed. Html Report (VSDrops) Download
✅ monotouch: All 25 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ mtouch: All 1 tests passed. Html Report (VSDrops) Download
✅ xammac: All 3 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ xcframework: All 8 tests passed. Html Report (VSDrops) Download
✅ xtro: All 2 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: 44fc64564b7e949b0d5d9c9be7e9540bc4bbec85 [PR build]

@haritha-mohan haritha-mohan merged commit c814120 into xamarin:main Feb 4, 2023
@haritha-mohan haritha-mohan deleted the update-thumbnail-binding branch February 4, 2023 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants