Insta360Develop / CameraSDK-Cpp

CameraSDK-Cpp is a C++ library to control Insta360 cameras.
https://www.insta360.com
115 stars 16 forks source link

Error running: WSAEINTR 10004 #19

Open victoriastraberg opened 1 year ago

victoriastraberg commented 1 year ago

Hi! Im trying to run insta360 own sdk for windows on visual studio 17 2022. I have the ONE x2. I have installed Libubsk based on insta’s documentation. However, i get an error when running in vs, see attached image. Does anybody know how to solve this issue? Thanks in advance! WSAEINTR_10004

bouviervj commented 1 year ago

same problem here - I have no clue why we got those strange characters too. I have same problem when running outside of studio - I can run the demo on linux (on VirtualBox, Ubuntu) - so the camera seems to work.

victoriastraberg commented 1 year ago

@bouviervj How did you run the demo on Linux? See attached image for my errors when running the CameraSDK Linux...

error1
bouviervj commented 1 year ago

@victoriastraberg it seems that you are missing linking parameters when compiling, from the example folder: g++ -I ../include/ main.cc -L ../lib -lCameraSDK -ludev -o CameraSDKTest-compiled Should compile the app 'CameraSDKTest' from the SDK provided through their developer program. You have a pre-compiled version in that same folder also. To run the compiled or pre-compiled program do: sudo LD_LIBRARY_PATH=../lib/ ./CameraSDKTest The program needs to see the SDK pre-compiled library - i.e, the file - 'libCameraSDK.so'

victoriastraberg commented 1 year ago

@bouviervj Thanks, it worked! Im trying to include all of the libraries in the lib folder but the libnppial.so file cannot be open.. Does Cuda solve this? Do you have a solution for this?

libnppial_error
bouviervj commented 1 year ago

;-) at that point I'm not sure about your linux installation - please refer to this https://github.com/Insta360Develop/CameraSDK-Cpp/issues/22 - to me you shouldn't have to add more libs has I didn't had to with the provided example. In your case the library mentioned is installed in the package nvidia-cuda-toolkit version 10 being present on a Ubuntu focal version 20.04(LTS) => https://packages.ubuntu.com/source/focal/nvidia-cuda-toolkit Hope this helps.

victoriastraberg commented 1 year ago

@bouviervj hi again, see image below... EnableCuda does not seem to work when typing "sudo apt install nvidia-cuda-toolkit". I have combined the MediaSDK and the CameraSDK into CameraSDKTest :) Screenshot 2023-04-12 161823

bouviervj commented 1 year ago

;-) - I get the idea - but I can't debug your code - it seems that the declaration of the class doesn't match what your code wants. This is out of scope of this issue report btw ! You should open another issue for this

bouviervj commented 1 year ago

Ok finally get it running on Windows but I'm not able to identify the root issue - I started to take my project and compile it in release mode. And it started to run - I tested first the program that was provided with the SDK and it worked - I then recompiled my local project in release and voila, running fine.

I'll try to track if I can understand if why this debug mode produce the issue. Windows_App_Work

Tianweihaihaihai commented 1 year ago

pls use release mode to run but not debug mode on windows