Closed antimodular closed 8 years ago
ok. taking out the following line made it work.
img = std::make_shared<ofImage>();
but i am not sure how stable it will be. what do you think?
You should be able to just call IPVideoGrabber::setUseTexture()
on your instance to disable texture use for non-main-thread use.
thanks. just tried
ipCamGrabber = std::make_shared<Video::IPVideoGrabber>();
ipCamGrabber->setUseTexture(false);
ipCamGrabber->setUsername(cam_user);
ipCamGrabber->setPassword(cam_password);
but it prints out
[ error ] IPVideoGrabber: update() may not be called from outside the main thread.
because your addon checks
if(!isMainThread())
Aha. That's something that would be pretty easy to fix.
great. i tried by commenting out code some code and it did make it work inside a separate thread. but the video got pretty slow.
Removed if (!isMainThread()) because it is not longer part of ofThread.
hello again.
with the old version for of 0.8.4 i was able to change your addon to also work inside a thread other than the main one. basically did this in multiple locations
but your new addon does this
which i think ignore my setUseTexture call.
do you think there is a way to have this run in a separate thread?