Quote:
Originally Posted by dimzon
2 all devs
found such code:
Code:
// Directshowsource needs the FPS information to be supplied.
// Without a lot of restructuring of code this is the best way of finding the FPS
// If anyone knows a better way of obtaining Framerate info, change this.
AVIReader reader;
try
{
reader = new AVIReader(fileName);
}
catch (Exception) // Some files can't render because you have no VfW codec (like DV sources)
{
reader = null;
}
AFAIK DiresctShowSource reques explicit fps information in very rare cases. And can't believe AVIFile32 API can return fps for such rare cases at all (AFAIK it even can't read such files)
Correct me if I'm wrong, please! I'm suggesting to remove this code!
|
Why 2 local objects?
Code:
AVIReader *reader=new AVIReader(fileName);
if (!reader) blahblah