0

I have a DirectShow application written in Delphi 6 using the DSPACK component library and running on Windows XP. At the top of my filter graph is an audio capture filter. The capture filter is assigned to my VOIP phone and has a sample grabber filter immediately down streeam. In the sample grabber filter's callback method, I added code to report whenever I get two media samples in a row from the sample grabber filter with identical timestamps (SampleTime's). That condition is occurring quite frequently, sometimes nearly every time. Note, the capture filter has a buffer size of 100 milliseconds and a sample rate 8000 kHz. Logic tells me that I should never get two sample deliveries with identical sample times and that they should be always very close to 100 milliseconds apart. But that is not what's happening.

What does it mean when a DirectShow capture filter sends you 2 successive media samples with identical sample times? Should I ignore the second sample delivery that has the same sample time as a previous one? Or is there another problem somewhere that I need to address?

Note, I have no control over the sample times coming in to me. They are being generated by the capture filter.

Robert Oschler
  • 14,153
  • 18
  • 94
  • 227
  • 2
    Looks more like capture filter bug. – Roman R. Dec 03 '11 at 06:54
  • @RomanR. Is there any way to confirm that using Graph Edit or something so I can rule out my code as the problem? – Robert Oschler Dec 03 '11 at 12:26
  • 2
    Just make a dump of what you are getting (full media type + a few of media samples) and post it here. One of the easy ways to do it - using `DumpMediaSamples` utility, see http://alax.info/blog/574 – Roman R. Dec 03 '11 at 12:44
  • @RomanR. I went to that page and clicked on the link to get the zip file and got a 404 error for the link with anchor text "dumpmediasamples01.zip" – Robert Oschler Dec 03 '11 at 13:42
  • @RomanR. Thanks. I'll go grab it now. Turns out the problem was a mistake I was making calculating timestamps, but I'm glad I found out about the utility. – Robert Oschler Dec 03 '11 at 18:07

1 Answers1

0

The real error was a mistake I made in calculating timestamps. The capture filter was not responsible. I'd vote to close my post except there's a valuable comment to it about a utility called DumpMediaSample (see comments section to my original post).

Robert Oschler
  • 14,153
  • 18
  • 94
  • 227