Capture Source Filter kudos & bug fix

Tech-Archive recommends: Fix windows errors by optimizing your registry



First off, this completely saved my ass. I started, as many have done
before, going down the path of trying to modify AMCap in order to
create a virtual camera until someone took pity on me and directed me
to Vivek's invaluable sample.

So if you're reading this, Vivek, thanks a million.

However, I did find a small bug. The sample can crash with a division-
by-zero error when a client of the webcam sets the camera dimensions
to small values. I tracked down the problem to this initialization:

pvscc->OutputGranularityX = 0;
pvscc->OutputGranularityY = 0;

These are steps that are used to calculate the output dimensions under
certain conditions, and apparently DirectShow will try to divide
dimensions by these values even when they're zero. I was able to make
the crash go away completely by changing the code to:

pvscc->OutputGranularityX = 1;
pvscc->OutputGranularityY = 1;

- Scott
.



Relevant Pages

  • Re: Merge Times in a virtual cube?
    ... When cubes are in a batch(even if i process shared dimensions first) Every ... >> time to process and have caused things to crash. ...
    (microsoft.public.sqlserver.olap)
  • Re: Merge Times in a virtual cube?
    ... > Shared dimensions don't work well in our situation because they take more ... > time to process and have caused things to crash. ... both copies of a dimension in RAM if you have 2 private dimensions. ...
    (microsoft.public.sqlserver.olap)