I get the video from USB2.0 carame in directshow.However,because of it's high resolution,the fram rate decrease after video datas pass the transform filter.
the camera supports resolution of 1920*1080 30fps,by testing the time spending in transform filter,i known it costs 15ms.Why the frame rate is only 1000/(33.3+15)=20.7 rather 30.It seems that processing data and fetching data are performed synchronously.I want to acheive that the filter fetch data during the transform filter processes the video datas.
I'm not sure if i describe the question clearly.I'm really thanks your help!
What I have tried:
I try to use Multithreading to solve it but failed.
[EDIT CHill60 - OP code from comment]
HRESULT CCsSobelV2::Transform(IMediaSample *pIn, IMediaSample *pOut)
{
HRESULT hr = Copy(pIn, pOut); if (FAILED(hr))
return hr;
return Transform(pOut);
}
the code above is
Transform()
function which has been override.The truth is if
Transform(Pout)
costs 10ms,the frame rate will be 1000/(33.3+10)fps.PS:my camera provides 1920*1080 video at 30fps