Closed halill1 closed 1 year ago
Hi @halilkarab The performance is good (I use this exact code for my macOS app Screegle)
Hope this helps.
Thanks a lot! Also do you think that can camerasample example be written in C++? I think that I don't need to convert cameraextension itself to C++, but will I be able to communicate with the virtual camera from C++?
I believe so because the Swift version uses the low level APIs to access the camera sink anyway.
okey. i almost done it, the only problem is how should i deactivate all the virtual cameras? for example now i have 1 activaetd camera and 1 physical usb cam, but it seems i have 3 cameras on the extension. (my computer crashed during a test and i couldnt deactivate it had to turn off by pressing power button)
Hi! You might need to reset your virtual cameras following these steps https://gist.github.com/ldenoue/ec4f1b5d2196835ba89de2020fd4ed7a
Thanks!
Hi,
From my understanding cameraextension , as its name suggests, is the one that handles low level stuff and I don't need to make changes on this part. My problem is I simply want to read a video frame by frame and push them to virtual camera. However, I need to do this because in C++ because I will do some operations on the frame and my framework is written in C++. I have a few questions, just to confirm:
1) Does cameraextension creates a virtual camera such as width, height, format etc. and has nothing to do with client side(zoom etc). It just creates a virtual camera and sends the incoming frame to whatever app wants at that moment.
2) The way you push the frame to virtual camera from samplecamera. Should I call enqueue function for each frame? Assume I successfully converted the code in C++ read frames from hardware camera, then after reading and operation I will call enqueue function with my result frame and it will call virtual camera and frame will be shown on the screen, cycle completed. Am I right?
3) I had tried several virtual cameras, the problem was they are too slow. Writing one frame takes 500ms so around 2FPS, which is terrible. Have you made any test to estimate performance..
Thanks a lot! Halil