Closed anl13 closed 7 years ago
These are two separate issues. The first issue with V2 is that you are not currently receiving data. There is an API command to start and stop receiving called toggleReceivingData
. Check it out in the example code at http://aqueti.tv/api/#get-frames.
The second issue means the API was not installed correctly. Try uninstalling the mantis api debian package with sudo dpkg -r mantisapi
then reinstalling with sudo dpkg -i mantisapi-0.1.0.1_dev.deb
when you're in the directory that contains the .deb package. This should install _MantisPyAPI.so
and MantisPyAPI.py
in /usr/lib/python3/dist-packages/mantis
.
Thanks. I solved the second issue.
For the first issue, if I want to use toggleReceivingData
, I need to get a cameraList
to determine at least one camera for toggleReceivingData
. But after I use api.setNewCameraCallback(newCameraCallback)
just as the sample code do, the cameraList
is still empty. According to http://aqueti.tv/api/#get-frames, when I use setNewCameraCallback
, it
calls the callback function for each Mantis camera that has already been discovered at the time of setting the callback.
I have defined newCameraCallback
as the sample code do. And V2
is running.
So what's wrong with what I have done? And how to solve this problem?
It sounds like you're doing things right. Are you sure you're connecting to the correct IP and port on V2? The port is configurable as a command line parameter. I believe it defaults to 11000. Run ./V2 -h
to see the options.
My environment is Ubuntu16.04. Before I run V2, I use
to start cameras, and it succeed. And I use V1 to view the stitched image, it works well.
But when I run V2, I find that the server receives no data. The whole output is shown below:
What does these output indicate? And why it says 'No clip file found'? Is it common to get 'Currently receiving data: false'?
And after that, I run a simple example python script, shown below:
ConnectToCamera.py
is an example file under directorymantis
whereMantisPyAPI.py
exists. So why importError occurs?