contrib/mul/mvl2/mvl2_video_to_avi_windows.h
Go to the documentation of this file.
00001 #ifndef mvl2_video_to_avi_windows_h_
00002 #define mvl2_video_to_avi_windows_h_
00003 //:
00004 // \file
00005 // \brief A class for writing videos
00006 // \author Franck Bettinger
00007 
00008 #include <mvl2/mvl2_video_writer.h>
00009 
00010 
00011 //: A class for writing videos
00012 class mvl2_video_to_avi: public mvl2_video_writer
00013 {
00014  public:
00015 
00016     //: Dflt ctor
00017   mvl2_video_to_avi();
00018  
00019     //: Destructor
00020   ~mvl2_video_to_avi();
00021 
00022     //: Set the video codec fourcc
00023   bool  set_codec(char, char, char, char); 
00024  
00025     //: Initialize the file (format can be Grey, RGB, or more complex)
00026   bool  open( int width, int height, 
00027               vcl_string format, vcl_string file_name);
00028  
00029     //: Tidy up and close the file
00030   void  close();
00031  
00032     //: Check whether camera is initialised
00033   bool  is_opened() const {return is_initialized_;}
00034  
00035     //: Return width of image (in pixels)
00036   int get_width() const;
00037  
00038     //: Return height of image (in pixels)
00039   int get_height() const;
00040  
00041     //: Return the frame rate in frames per second
00042   double get_frame_rate() const {return frame_rate_;}
00043  
00044     //: Set the frame rate in frames per second
00045   void set_frame_rate(double frame_rate);
00046  
00047     //: Set the quality of the recorded movie
00048   void set_quality(int qual);
00049  
00050     //: Put frame data into the given image
00051   void write_frame(vil_image_view<vxl_byte>& image); 
00052 
00053     //: Name of the class
00054   vcl_string is_a() const;
00055  
00056     //: Create a copy on the heap and return base class pointer
00057   mvl2_video_writer* clone() const;
00058 };
00059  
00060 #endif // mvl2_video_to_avi_windows_h_