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

macOS Catalina 10.15 issue #170

Open
erdemy opened this issue Aug 20, 2019 · 15 comments

Comments

@erdemy
Copy link

commented Aug 20, 2019

as we are using https://github.com/sarxos/webcam-capture library which . uses openimaj in default, it does not work with macOS Catalina.
as QTKit is deprecated, AvFoundation classes need to be used. may i ask if there is any ongoing work for this kind of change?

regards,

@jonhare

This comment has been minimized.

Copy link
Member

commented Aug 21, 2019

Ah, I didn't know about this - it's going to a a big priority for my teaching in 4-5 weeks time! I got most of the code converted last night, although it's not working yet (need to spend some time to debug why the delegate isn't being called). Will keep you posted.

@erdemy

This comment has been minimized.

Copy link
Author

commented Aug 21, 2019

thanks @jonhare for the quick reply and conversion. I can help with the Java JNI part if you can share the branch name.
regards

@jonhare

This comment has been minimized.

Copy link
Member

commented Aug 28, 2019

OK, this should be fixed in 940ed45, although it clearly needs testing. A snapshot is being built now (http://jenkins.ecs.soton.ac.uk/job/OpenIMAJ/5457/) and will be deployed to snapshots.openimaj.org immediately afterwards (assuming Jenkins builds without any problems!).

@erdemy any chance you can try the snapshot version of the jar in your project and see if it works for you?

@erdemy

This comment has been minimized.

Copy link
Author

commented Aug 29, 2019

@jonhare thanks for very quick action, glad to test the jar file, will update here with the results

@ademzumbul

This comment has been minimized.

Copy link

commented Aug 29, 2019

image

New version of the libray compiles fine on Catalina, it can bring list of camera, but I am having error when running on TestGrabber, it says No factory registered, what can be the reason ?

@jonhare

This comment has been minimized.

Copy link
Member

commented Aug 29, 2019

Hmm, I'm not sure. On Mojave it works fine for me, although it does print some CMIO warnings:

FaceTime HD Camera
2019-08-29 16:33:18.291326+0100 TestGrabber[17265:2502741] [] CMIO_Unit_ScopeElement.h:200:SafeGetElement Throwing err: -67454
2019-08-29 16:33:18.293496+0100 TestGrabber[17265:2502741] [] CMIOUnitFigBaseObjectImpl.c:246:CMIOUnitCreateFromDescription Invalid paramater
2019-08-29 16:33:18.316681+0100 TestGrabber[17265:2502741] [] CMIO_Unit_Input_Device.cpp:244:GetPropertyInfo CMIOUInputFromProcs::GetPropertyInfo() failed for id 102, Error: -67456
dev 0 : 0x107e2c000
done
dev 0 : 0x107e2c000
done
dev 0 : 0x107e2c000
done
dev 0 : 0x107e2c000
done
...

Any chance you can step through the startSession call in the debugger to try and see where it is returning from? That would help isolate the problem...

@ademzumbul

This comment has been minimized.

Copy link

commented Aug 29, 2019

It looks the warnings are printed here:

image

@ademzumbul

This comment has been minimized.

Copy link

commented Aug 29, 2019

After getting the above warning, it looks in my case session cannot be created due to authorization:

image

Do you know how to authorize it? I already allowed TestGrabber in Security settings:

image

@ademzumbul

This comment has been minimized.

Copy link

commented Aug 29, 2019

It looks in my case authorization status is 0 which means user hasnt done a choise, but not sure how to do it?

image

@jonhare

This comment has been minimized.

Copy link
Member

commented Aug 30, 2019

Two thoughts: 1.) you could try copying the info.plist file to the directory in which the TestGrabber executable is built & see if that makes a difference when running it; 2) you could try running 'tccutil reset Camera' and see if that makes a difference. In principle it should display a dialog box asking for permission...

I think I will change the logic in the code so that it doesn't fail in startSession if authorisation has not yet been granted - the documentation says that the system should just deliver blank frames until the user grants access anyway...

@erdemy erdemy changed the title macOS Catalina 10.16 issue macOS Catalina 10.15 issue Aug 30, 2019

@erdemy

This comment has been minimized.

Copy link
Author

commented Aug 30, 2019

Hi @jonhare, tested on macOS Mojave and it is working great. but when i test it on Catalina, i got the following error:

Caused by: java.lang.UnsatisfiedLinkError: org.openimaj.video.capture.OpenIMAJGrabber.getVideoDevices()Lorg/bridj/Pointer;
	at org.openimaj.video.capture.OpenIMAJGrabber.getVideoDevices(Native Method)
	at org.openimaj.video.capture.VideoCapture.getVideoDevices(VideoCapture.java:221)
	at com.github.sarxos.webcam.ds.openimaj.OpenImajDriver$GetDevicesTask.handle(OpenImajDriver.java:58)
	at com.github.sarxos.webcam.WebcamProcessor$AtomicProcessor.run(WebcamProcessor.java:81)

will investigate more on weekend.

@ademzumbul

This comment has been minimized.

Copy link

commented Sep 2, 2019

Hi @jonhare , I have done 2 things:
1-) run 'tccutil reset Camera' on console
2-) commented out "return 1" statement if startSession fails, so program continues althoug startSession fails

So now MacOS asks permission when taking picture and I can grant overthere, and it works that way.
But still something is random, so it cannot open camera in my every try. So it will be better if you can check this example in Catalina on your side.

@ademzumbul

This comment has been minimized.

Copy link

commented Sep 11, 2019

@jonhare, have you done any changes in the sources about the permission issue ?

@jonhare

This comment has been minimized.

Copy link
Member

commented Sep 16, 2019

@ademzumbul I made changes so that it didn't exit if permission hadn't been granted, but that's it. On Mojave it seems ok to me - asks permission the first time & then just works afterwards.

@ademzumbul

This comment has been minimized.

Copy link

commented Sep 16, 2019

@jonhare, ok, i will try the new version of the library and let you know if permission issue works on Catalina

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.