/*
 * See the files COPYING and README for copyright information and how to reach 
 * the author.
 *
 *  $Id: chain-dvd.h,v 1.2 2006/04/21 18:26:08 lordjaxom Exp $
 */

#ifndef VDR_BURN_CHAIN_DVD_H
#define VDR_BURN_CHAIN_DVD_H
 
#include "chain-vdr.h"
#include "jobs.h"

namespace vdr_burn
{

	class chain_dvd: public chain_vdr
	{
	public:
		enum step { build, burn };

		chain_dvd(job& job);

	protected:
		virtual bool initialize(void);
		virtual void process_line(const std::string& line);
		virtual bool finished(const proctools::process* proc);

		void create_files(void);
		void create_files(const recording& rec);

		bool prepare_job(void);
		void prepare_recording(void);
		bool prepare_device(void);
		bool prepare_burning(void);

	private:
		step                           m_step;
		recording_list::const_iterator m_current;
		int64_t                        m_totalSize;
		int64_t                        m_totalDone;
		double                         m_factor;
		int64_t                        m_videoSize;
		int64_t                        m_audioSize;
		int64_t                        m_lastRecSize;
		time_t                         m_lastProgress;
	};

}

#endif // VDR_BURN_CHAIN_DVD_H
