/*****************************************************************************
 *
 *  mediasplitter.h -- Audio/Video file splitter.
 *
 *  Copyright (C) 2010 Starbuck <starbuck@labdv.com>
 *  All rights reserved.
 *
 *  This file is part of the JobManager module of the DVDx 4 application.
 *
 *  GNU Lesser General Public License Usage
 *  This file may be used under the terms of the GNU Lesser General
 *  Public License version 2.1 as published by the Free Software
 *  Foundation and appearing in the file LICENSE.LGPL included in the
 *  packaging of this file.  Please review the following information to
 *  ensure the GNU Lesser General Public License version 2.1 requirements
 *  will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 *
 *  GNU General Public License Usage
 *  Alternatively, this file may be used under the terms of the GNU
 *  General Public License version 3.0 as published by the Free Software
 *  Foundation and appearing in the file LICENSE.GPL included in the
 *  packaging of this file.  Please review the following information to
 *  ensure the GNU General Public License version 3.0 requirements will be
 *  met: http://www.gnu.org/copyleft/gpl.html.
 *
 *****************************************************************************/

#ifndef MEDIASPLITTER_H
#define MEDIASPLITTER_H

#include "ffmpeg.h"
#include "ffprobe.h"
#include "mencoder.h"
#include "mediaeditor.h"
#include <QObject>
#include <QList>
#include <QString>

class MediaSplitter : public MediaEditor 
{
	Q_OBJECT

public:
	MediaSplitter(JobManager *jobManager);
	//~MediaSplitter();

	void start(const QString &inputFileName, const int partNumber, const qint64 partSize);

signals:
	void finished();
	void started();

protected slots:
	void startNextJob();

protected:

protected:
	FFmpeg		*m_ffmpeg;
	FFprobe		*m_ffprobe;
	MEncoder	*m_mencoder;

	QString	m_currentOutputPath;
	int		m_currentPart;
	double	m_currentPosition;

	double	m_inputDuration;
	qint64	m_inputSize;
	QString	m_inputPath;
	QString m_outputBaseName;
	QString m_outputExtension;

	QString	m_partString;
	int		m_volumeNumber;
	qint64	m_volumeSize;
};

#endif
