I'm trying to add a feature to allow users to switch between multiple capture devices. The problem is osgART::video::close does not release the capture device. I check the source code in ARToolkitVideo.cpp and found a comment that said
/* Currently ar2VideoClose hangs on Windows when the DirectShow filter graph is
* stopped. Therefore the function will not be called here. It is only really
* needed if the video capture library is to be reloaded.
* Other platforms do not suffer from this problem.
So, I comment out #if define(_WIN32) until #else line. After that everything works fine. I can switch between multiple capture devices. However, when the program terminate, it still leave a process in windows task manager which I think it's what the comment suggest.
I tried to create a very small program to test this behavior by calling
The program works fine and terminate normally.
Anybody has ideas to solve this issue or are there any known workarounds to to add support for switching multiple capture devices. I'm working on windows XP, VS2003 .net.
Thank you for your help in advance.
Community support forum for users of the GPL-licensed osgART Standard Edition v1.0 and proprietary-licensed osgART Professional Edition v1.1
1 post • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests