-
Notifications
You must be signed in to change notification settings - Fork 329
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
Use PTP API of macOS (ImageCaptureCore) as backend #351
Comments
As begin, |
A little update. I looked through the code. It seems to me a new port type (added to libgphoto2_port) for ImageCaptureCore (ICC) seems more appropiate. The reason is that in order to communicate with the camera with ICC one has to connect to the camera through the API. You can not specify a USB port or something like this. Then, in I will also enable the port by default on macOS and prefer it over USB if available. It seems the USB port can not be deactivated. I am not sure if I made this clear in my issue: Are you interested in adding the code to libgphoto2? It will involve a few lines of Objective-C code. |
I just wanted to file a similar issue, but found that this might be more or less a duplicate: I just wanted to add that on recent MacOS version, there is a |
so far I have no access to a Mac , so its hard to do for me. |
I don't think it's in scope for libgphoto2 anyway. |
Hi,
as you might know macOS has its own implemetation of PTP (in the ImageCaptureCore framework), but it only covers basic features. The API though provides a way to send custom mesages.
I am interested in implementing this API as a PTP transport backend for libgphoto2 on macOS. The single advantage would be, that it is no longer necessary to kill the PTPCamera processes. According to the API documentation of Canon, this is also the way EDSDK is implemented.
What do you think? I would try to bridge the current libgphoto2 PTP API to ImageCaptureCore. Do you support this idea? How can I start?
Edit: My first idea is to add a compile flag for macOS, which marks certain ptp functions as weak. Also, a library is linked, which replaces the weak functions with implementations for the macOS backend. This would involve minimal code changes on the core library and reflect the experimental quality of this feature. A cleaner solution would separate the ptp functions into their own object files and then link to the corresponding version. I still have to figure out how painful the bridge code will be.
The text was updated successfully, but these errors were encountered: