/*
 * class AviWriter
 *
 * $Date$
 * $Revision$
 *
 */

#ifndef AVI_WRITER_HH__
#define AVI_WRITER_HH__

#include "WImage/VideoWriter.hh"

/** 
 * @addtogroup WImage 
 * @{ */

/**
 * A AVI image file writer. 
 */
class 
AviWriter: public VideoWriter
{
public:
  
  /** Constructor. Only calls the mother class' constructor to initialize
   * the {\em ImageArray} reference and set the offset if necessary. 
   * @param name
   * the file name
   * @param arrays
   * the array of video arrays for the values  
   * @param channels
   * the number of color channels
   * @param fps
   * the frame rate per second */
  AviWriter (char const *name, VideoArray < coeff > *arrays[], int channels,
             double fps) 
    : VideoWriter (name, arrays, channels) { m_frameRate = fps ; }

protected: 
  /** Write a AVI video file. This is the method that does the actual
   * work. It will be called by the {\em write ()} method.
   * @return 
   * 0 if successful, -1 on write error. */
  virtual int writefmt (void);
  /** The frame rate */
  double m_frameRate;
}; /* class AviWriter */

/** @} */

#endif /* AVI_WRITER_HH__ */
