DShowFile Class Reference

#include <dshowfile.h>

Inheritance diagram for DShowFile:

Inheritance graph
[legend]
Collaboration diagram for DShowFile:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual bool initialize ()
 initialized the video source.
virtual bool getFrame (IplImage *dst)
 get the next frame and convert it to the format described in "dst".
virtual void getSize (int &width, int &height)
 return width and height of images coming from the video source.
 DShowFile (const char *filename)
virtual ~DShowFile ()
virtual void start ()
 Start the video source: getFrame() will provide each time a different image.
virtual void stop ()
 Pause the source.
virtual bool isPlaying ()
 return false if the source is paused.
virtual int getId ()
 This method is usefull only for video files, not grabbing hardware.
virtual const char * getStreamName () const
 Returns a string describing the stream.
virtual const char * getStreamType () const
 Returns a string describing the type of the stream.


Detailed Description

Definition at line 97 of file dshowfile.h.


Constructor & Destructor Documentation

DShowFile::DShowFile ( const char *  filename  ) 

Definition at line 109 of file dshowfile.cpp.

DShowFile::~DShowFile (  )  [virtual]

Definition at line 117 of file dshowfile.cpp.


Member Function Documentation

bool DShowFile::getFrame ( IplImage *  dst  )  [virtual]

get the next frame and convert it to the format described in "dst".

The image will be deinterlaced, scaled, and color converted to match dst.

Parameters:
dst the image to copy the frame into.
Returns:
true on success, false on error.

Implements VideoSource.

Definition at line 283 of file dshowfile.cpp.

References CSampleGrabberCB::frameWanted, and stop().

virtual int DShowFile::getId (  )  [inline, virtual]

This method is usefull only for video files, not grabbing hardware.

It returns a the number of the last frame provided by getFrame().

Returns:
the unique frame number or -1 if the video source does not support frame counting.

Reimplemented from VideoSource.

Definition at line 107 of file dshowfile.h.

void DShowFile::getSize ( int &  width,
int &  height 
) [virtual]

return width and height of images coming from the video source.

Implements VideoSource.

Definition at line 329 of file dshowfile.cpp.

References CSampleGrabberCB::Height, and CSampleGrabberCB::Width.

virtual const char* DShowFile::getStreamName (  )  const [inline, virtual]

Returns a string describing the stream.

If the source comes from a file, the filename is returned.

Implements VideoSource.

Definition at line 108 of file dshowfile.h.

virtual const char* DShowFile::getStreamType (  )  const [inline, virtual]

Returns a string describing the type of the stream.

For example: BmpFile, AviFile, DShowCB...

Implements VideoSource.

Definition at line 109 of file dshowfile.h.

bool DShowFile::initialize (  )  [virtual]

initialized the video source.

Has to be called before any other method.

Returns:
true on success, false on error.

Implements VideoSource.

Definition at line 122 of file dshowfile.cpp.

References GetInPin(), GetOutPin(), CSampleGrabberCB::Height, CSampleGrabberCB::image, and CSampleGrabberCB::Width.

Referenced by DShowFileFactory::construct().

virtual bool DShowFile::isPlaying (  )  [inline, virtual]

return false if the source is paused.

Implements VideoSource.

Definition at line 106 of file dshowfile.h.

void DShowFile::start (  )  [virtual]

Start the video source: getFrame() will provide each time a different image.

After calling initialize(), the video source is playing.

Implements VideoSource.

Definition at line 335 of file dshowfile.cpp.

void DShowFile::stop (  )  [virtual]

Pause the source.

The getFrame() method will always provide the current frame.

Implements VideoSource.

Definition at line 340 of file dshowfile.cpp.

Referenced by getFrame().


The documentation for this class was generated from the following files:

Generated on Tue Mar 30 15:53:25 2010 for Polyora by  doxygen 1.5.9