ofTheo / videoInput

A video capture library for windows.
http://muonics.net/school/spring05/videoInput/
358 stars 176 forks source link

Problems using USB Grabber (probably others too) and a possible solution #30

Open MickaMickaMicka opened 8 years ago

MickaMickaMicka commented 8 years ago

I had problems using USB analog-2-digital Grabber devices like Hauppauge WinTV USB Live2 Grabber. It worked on VLC and DirectShow GraphStudio but not on VideoInput (and OpenCV which uses VideoInput).

I had to change

hr = VD->pCaptureGraph->RenderStream(&PIN_CATEGORY_PREVIEW, &MEDIATYPE_Video, VD->pVideoInputFilter, VD->pGrabberF, VD->pDestFilter);

to

hr = VD->pCaptureGraph->RenderStream(&CAPTURE_MODE, &MEDIATYPE_Video, VD->pVideoInputFilter, VD->pGrabberF, VD->pDestFilter);

to get it working.

Probably this is a logical change because CAPTURE_MODE was set to PIN_CATEGORY_PREVIEW previously, if PIN_CATEGORY_PREVIEW is possible. Please verify that the change is ok and update if that's true.

Best regards, Michael