Hi there,
i've experienced the same issue with our own dshow capture code with a
VRMagic USB2 cam.
Reducing the capture pixelrate by setting a lower PixelClock helped (the
driver's capture queue stalls when it gets too much data without processing
it).
Here is the code snipped to do it - g_pStrFilter is the camera device
pointer. There is also an example in the SDK supplied with the cam (or
available from VRMagic website)
#ifdef VRMAGIC_SUPPORT
#include <vrmagic/dshow/vrmcapturedevicecontrol.h>
#endif
...
#ifdef VRMAGIC_SUPPORT
IVrmCaptureDevideControl* gp_vrmCaptureDeviceControl = 0;
if (g_pSrcFilter->QueryInterface(IID_IVrmCaptureDevideControl, (void
**)&gp_vrmCaptureDeviceControl)<0)
{
printf("VRMagic stuff is offline\n");
}
else
{
printf("GOT VRMAGIC STUFF \n");
gp_vrmCaptureDeviceControl->SetPixelClockMHz(m_pixelClock);
gp_vrmCaptureDeviceControl->SetExposureTime(m_exposure);
}
#endif
Hope this helps,
Michael
----- Original Message -----
From: "Daniele Pagliani" <postadani@h ..........>
To: <artoolkit@h ..................>
Sent: Thursday, April 08, 2004 5:27 PM
Subject: Problem with DsVideo.lib
> Hi,
> I'm using an USB 2.0 Video Camera. This camera is recognized by DSVideolib
> but not handled in the right way. The frame rate falls down ramdomly and
> comes back to an excellent rate after a while (ramdomly) and so on. If I
use
> Graph Edit or I write an application in order to render into a standard
> video renderer all is fine. A special decoder is selected (thanks to
> DirectShow intelligent connect), but if I modify the DsVideolib method
> CGraphManager::BuildGraph(DS_MEDIA_FORMAT mf) in order to load the
> VideoDecoder I receive NULL. Can somone help me?
>
> Can I find the CLSID of the decoder into the Graph Edit?
>
> This is where I try to insert the correct decoder (see DsVideoLib.cpp
> CGraphManager::BuildGraph):
>
> ...
> if (mf.inputDevice == WDM_VIDEO_CAPTURE_FILTER) {
> /*
> CComPtr<IBaseFilter> pSpy;
> hr = CoCreateInstance(CLSID_SpyTrIpFilter, NULL, CLSCTX_INPROC_SERVER,
> IID_IBaseFilter, (void**)&(pSpy));
> if(FAILED(hr)) return(hr);
> hr = graphBuilder->AddFilter(pSpy, L"Debug SPY");
>
> hr = ConnectFilters(pVideoSource,1,pVideoDecoder,1);
> hr = ConnectFilters(pVideoDecoder,1,pSpy,1);
> hr = ConnectFilters(pSpy,1,pVideoRenderer,1);
> */
>
> hr = CoCreateInstance(CLSID_RightCodec, NULL, CLSCTX_INPROC_SERVER,
> IID_IBaseFilter, (void**)&(pVideoDecoder));
> if(hr == 0x80040154) printf("class not registered\n");// class not
> registered
>
> hr = captureGraphBuilder->RenderStream (NULL,
> &MEDIATYPE_Video, pVideoSource, pVideoDecoder, pVideoRenderer);
> ..
>
>
>
> where CLSID_RightCodec is the CLSID of the Decoder I need. I receive the
> message "class not registered"
>
>
> thanks
>
> Daniele
>
> _________________________________________________________________
> Blocca le pop-up pubblicitarie con MSN Toolbar! http://toolbar.msn.it/
>
>
|