diff src/win32/AVIWrite.h @ 1:f9f4f1b99eed

importing src directory
author Robert McIntyre <rlm@mit.edu>
date Sat, 03 Mar 2012 10:31:27 -0600
parents
children
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/win32/AVIWrite.h	Sat Mar 03 10:31:27 2012 -0600
     1.3 @@ -0,0 +1,54 @@
     1.4 +#ifndef VBA_WIN32_AVIWRITE_H
     1.5 +#define VBA_WIN32_AVIWRITE_H
     1.6 +
     1.7 +#if _MSC_VER > 1000
     1.8 +#pragma once
     1.9 +#endif // _MSC_VER > 1000
    1.10 +
    1.11 +#include <vfw.h>
    1.12 +
    1.13 +class AVIWrite {
    1.14 + public:
    1.15 +  AVIWrite();
    1.16 +  virtual ~AVIWrite();
    1.17 +
    1.18 +  bool Open(const char *filename);
    1.19 +  virtual bool AddFrame(const u8 *bmp);
    1.20 +  void SetFPS(int fps);
    1.21 +  void SetVideoFormat(BITMAPINFOHEADER *);
    1.22 +  bool IsSoundAdded();
    1.23 +  void SetSoundFormat(WAVEFORMATEX *);
    1.24 +  bool AddSound(const u8 *sound, int len);
    1.25 +  int videoFrames();
    1.26 +  void Pause(bool pause);
    1.27 +  bool IsPaused();
    1.28 +
    1.29 + private:
    1.30 +  int m_fps;
    1.31 +  WAVEFORMATEX m_soundFormat;
    1.32 +  BITMAPINFOHEADER m_bitmap;
    1.33 +  AVISTREAMINFO m_header;
    1.34 +  AVISTREAMINFO m_soundHeader;
    1.35 +  PAVIFILE m_file;
    1.36 +  PAVISTREAM m_stream;
    1.37 +  PAVISTREAM m_streamCompressed;
    1.38 +  PAVISTREAM m_streamSound;
    1.39 +  AVICOMPRESSOPTIONS m_options;
    1.40 +  AVICOMPRESSOPTIONS *m_arrayOptions[1];
    1.41 +  int m_videoFrames;
    1.42 +  int m_samplesSound;
    1.43 +  int m_videoFramesTotal;
    1.44 +  int m_samplesSoundTotal;
    1.45 +  LONG m_totalBytes;
    1.46 +  bool m_failed;
    1.47 +  int m_segmentNumber;
    1.48 +  bool m_usePrevOptions;
    1.49 +  bool m_pauseRecording;
    1.50 +  char m_aviFileName[MAX_PATH];
    1.51 +  char m_aviBaseName[MAX_PATH];
    1.52 +  char m_aviExtension[MAX_PATH];
    1.53 +  void CleanUp();
    1.54 +  bool NextSegment();
    1.55 +};
    1.56 +
    1.57 +#endif // VBA_WIN32_AVIWRITE_H