/*
 * AviFile.h
 *
 *  Created on: 08/mar/2022
 *      Author: chessaa
 */

#ifndef AVIFILE_H_
#define AVIFILE_H_

class AviFile
{
public:
	AviFile();
	virtual ~AviFile();

	bool open(const char* name, bool add_date=false);
	bool close();

	bool isOpen() const;

	bool openVideoStream(int rate,int w, int h, int key=50, int quality=-1);

    bool addVideoFrame(const void* data, bool invert=true);

	bool openAudioStream(int rate, int ch, int bytes_per_sample=1);
	bool addAudioSamples(int samples, const void* data);

	bool openAudioStream();
	bool audioCapture(bool enable);
	int audioFlush(bool diseregard=false);

private:
	class Implementation;
	Implementation& p_;
};


#endif /* AVIFILE_H_ */
