We use opencv to capture camera. In most computer it can open the usb camera correctly. But for a few of computer it can not open the camera. We debug the code and find the error is at :
hr = VD->pCaptureGraph->RenderStream(&PIN_CATEGORY_PREVIEW, &MEDIATYPE_Video, VD->pVideoInputFilter, VD->pGrabberF, VD->pDestFilter);
Then, we thought that could be the problem of OS, so we repair the system using DISM and SFC to repair the os. We also use several tools to check and repair the directshow and codec in the systems. But it still does not work.
Then we use GraphEdt to simulate the RenderStream, BUT we can not list the directshow filters list when Inserting filters. And the GraphEdt will close instantly.
In some other computer We can list directshow filters using GraphEdt, but we can not run the RenderStream correctly.
So,now we encounter two questions:
1. Why do we open camere using opencv correctly, which is failed at RenderStream? how could we to debug this question? Does it relate to directshow error or codec error?
2. Why does the GraphEdt close instantly when listing the directshow filters list?