![]() ![]() ![]() Hr = SetResolution(width_, height_, pPin) While (S_OK = pEnum->Next(1, &pPin, NULL)) Connecting Source (CameraF) and Sample Grabber Hr = pGrabberF->QueryInterface(IID_PPV_ARGS(&pSGrabber)) Hr = pGraph->AddFilter(pGrabberF, L"Sample Grabber") Hr = CoCreateInstance(CLSID_SampleGrabber, NULL, CLSCTX_INPROC_SERVER, Create an instance of the Sample Grabber Filter Hr = pGraph->AddFilter(CameraF, L"Capture Source") Add web camera to graph as source filter (because first?) Hr = pGraph->QueryInterface(IID_PPV_ARGS(&pEvent)) Hr = pGraph->QueryInterface(IID_PPV_ARGS(&pControl)) ![]() Query for the IMediaControl and IMediaEventEx interfaces Hr = CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&pGraph)) Hr = pMon->BindToObject(0, 0, IID_IBaseFilter, (void**)&CameraF) Hr = pSysDevEnum->CreateClassEnumerator(CLSID_VideoInputDeviceCategory, Obtain a class enumerator for the video compressor category. ![]() IID_ICreateDevEnum, (void **)&pSysDevEnum) Hr = CoCreateInstance(CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC_SERVER, The resolution I am trying to set to the camera is 1280x720 and I do know that the device can support it.īelow I am attaching part of my code regarding the capturing function: ICreateDevEnum *pSysDevEnum = 0 In this case I am getting an error "libtbd error data is not tagged properly" just when I am trying to use ConnectFilters function, after setting the resolution of the camera. However, I do have some problems in using it with an Asus T100 tablet. In general the driver works just fine using my PCs webcam. My source code is based in the SampleGrabber application which is available in the Windows SDK samples. I am a newbie in DirectShow programming and I am trying to create a sample grabber application in order to frequently grab frames (i.e every 100 msec) from a video capture device. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |