Jump to content
  • Advertisement
Sign in to follow this  

Direct Show: ISampleGrabber callback slows down with time

This topic is 4031 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey everyone, I have the following problem: When I use ISampleGrabber to set callback to process incoming data from video capture card, everything works fine. Callback works, and I get 30 fps video. I set the callback this way: ------------------------------------------------------------------- class MySampleGrabber : public ISampleGrabberCB { .... HRESULT STDMETHODCALLTYPE SampleCB(double SampleTime, IMediaSample *pSample) { < process IMediaSample here; > return S_OK; } .... }; ------------------------------------------------------------------- ISampleGrabber *grabber; ..... grabber->SetCallback(m_mysamplegrabber, 0); ------------------------------------------------------------------- The problem is that with time callback gets called less and less frequetly and fps slowly goes down ( in an hour it becomes less than 1 fps). CPU usage goes down as well, so this makes me think that this problem is not related to the post processing of data that I do. If I restart application everything is fast again, until FPS drops again. I tried to reinitialize video source periodically from within my application, but this didn't help. FPS still goes down Did anyone face the same problem ? Any ideas what it can be ? Thanks in advance for any help.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!